[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 44e78fca38
commit 2b5fb67461
No known key found for this signature in database
GPG key ID: 30C56800FCA3828A
2 changed files with 9 additions and 11 deletions

14
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"