[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" TASK="$1"
shift 1 shift 1
cd /var/www/sharelatex/web/modules/server-ce-scripts/scripts
case "$TASK" in case "$TASK" in
user:create-admin) user:create-admin)
cd /var/www/sharelatex/web node create-admin "$@"
node scripts/server-ce/create-admin "$@"
;; ;;
user:delete) user:delete)
cd /var/www/sharelatex/web node delete-user "$@"
node scripts/server-ce/delete-user "$@"
;; ;;
check:mongo) check:mongo)
cd /var/www/sharelatex/web node check-mongodb
node scripts/server-ce/check-mongodb
;; ;;
check:redis) check:redis)
cd /var/www/sharelatex/web node check-redis
node scripts/server-ce/check-redis
;; ;;
*) *)

View file

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