[misc] move server-ce scripts into a module in web

This commit is contained in:
Jakob Ackermann 2021-07-13 17:03:14 +01:00
parent afe2c9934d
commit 77cd7690fb
2 changed files with 9 additions and 11 deletions

14
server-ce/bin/grunt Normal file → Executable file
View file

@ -5,25 +5,23 @@ set -e
TASK="$1"
shift 1
cd /var/www/sharelatex/web/modules/server-ce-scripts/scripts
case "$TASK" in
user:create-admin)
cd /var/www/sharelatex/web
node scripts/server-ce/create-admin "$@"
node create-admin "$@"
;;
user:delete)
cd /var/www/sharelatex/web
node scripts/server-ce/delete-user "$@"
node delete-user "$@"
;;
check:mongo)
cd /var/www/sharelatex/web
node scripts/server-ce/check-mongodb
node check-mongodb
;;
check:redis)
cd /var/www/sharelatex/web
node scripts/server-ce/check-redis
node check-redis
;;
*)

View file

@ -2,7 +2,7 @@
set -e
echo "Checking can connect to mongo and redis"
cd /var/www/sharelatex/web
node scripts/server-ce/check-mongodb
node scripts/server-ce/check-redis
cd /var/www/sharelatex/web/modules/server-ce-scripts/scripts
node check-mongodb
node check-redis
echo "All checks passed"