2022-06-22 10:33:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
COMMAND=$1 && shift 1
|
|
|
|
|
|
|
|
case "$COMMAND" in
|
|
|
|
'start-web' )
|
2023-11-10 11:20:21 +00:00
|
|
|
exec node docker/entrypoint-server.js
|
2022-06-22 10:33:00 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
'start-worker' )
|
2023-11-10 11:20:21 +00:00
|
|
|
exec node docker/entrypoint-worker.js
|
2022-06-22 10:33:00 +00:00
|
|
|
;;
|
|
|
|
|
2022-12-19 11:49:52 +00:00
|
|
|
'cleanup' )
|
2023-11-10 11:20:21 +00:00
|
|
|
exec node docker/entrypoint-cleanup.js
|
2022-12-19 11:49:52 +00:00
|
|
|
;;
|
|
|
|
|
2022-12-20 07:11:10 +00:00
|
|
|
'stats' )
|
2023-11-10 11:20:21 +00:00
|
|
|
exec node docker/entrypoint-stats.js
|
2022-12-19 14:19:43 +00:00
|
|
|
;;
|
|
|
|
|
2022-06-22 10:33:00 +00:00
|
|
|
'email-daily-backup' )
|
2023-11-10 11:20:21 +00:00
|
|
|
exec node docker/entrypoint-backup.js daily
|
2022-06-22 10:33:00 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
'email-weekly-backup' )
|
2023-11-10 11:20:21 +00:00
|
|
|
exec node docker/entrypoint-backup.js weekly
|
2022-06-22 10:33:00 +00:00
|
|
|
;;
|
|
|
|
|
2022-08-10 09:18:01 +00:00
|
|
|
'email-backup' )
|
2022-08-10 09:19:42 +00:00
|
|
|
EMAIL=$1 && shift 1
|
2023-11-10 11:20:21 +00:00
|
|
|
exec node docker/entrypoint-user-email-backup.js $EMAIL
|
2022-08-10 09:18:01 +00:00
|
|
|
;;
|
|
|
|
|
2023-12-14 11:31:19 +00:00
|
|
|
'fix-quota' )
|
|
|
|
EMAIL=$1 && shift 1
|
|
|
|
exec node docker/entrypoint-fix-quota.js $EMAIL
|
|
|
|
;;
|
|
|
|
|
2023-12-29 10:07:51 +00:00
|
|
|
'fix-roles' )
|
|
|
|
exec node docker/entrypoint-fix-roles.js
|
|
|
|
;;
|
|
|
|
|
2023-11-08 10:21:00 +00:00
|
|
|
'delete-accounts' )
|
|
|
|
FILE_NAME=$1 && shift 1
|
|
|
|
MODE=$1 && shift 1
|
2023-11-10 11:20:21 +00:00
|
|
|
exec node docker/entrypoint-delete-accounts.js $FILE_NAME $MODE
|
2023-11-08 10:21:00 +00:00
|
|
|
;;
|
|
|
|
|
2022-06-22 10:33:00 +00:00
|
|
|
* )
|
2022-12-06 13:12:48 +00:00
|
|
|
echo "[Docker] Unknown command"
|
2022-06-22 10:33:00 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exec "$@"
|