mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
update startscript
This commit is contained in:
parent
8b51486564
commit
8ba1f48157
@ -3,8 +3,8 @@
|
|||||||
# Find current directory & configure paths
|
# Find current directory & configure paths
|
||||||
SCRIPT_PATH=$(realpath $0)
|
SCRIPT_PATH=$(realpath $0)
|
||||||
SCRIPT_DIR=$(dirname $SCRIPT_PATH)
|
SCRIPT_DIR=$(dirname $SCRIPT_PATH)
|
||||||
LOCK_FILE=$SCRIPT_PATH/update.lock
|
LOCK_FILE=$SCRIPT_DIR/update.lock
|
||||||
UPDATE_HTML=$SCRIPT_DIR/update-page/updating.html
|
UPDATE_HTML=$SCRIPT_DIR/nginx/update-page/updating.html
|
||||||
PROJECT_ROOT=$SCRIPT_DIR/../../
|
PROJECT_ROOT=$SCRIPT_DIR/../../
|
||||||
|
|
||||||
# Load .env or .env.dist if not present
|
# Load .env or .env.dist if not present
|
||||||
@ -27,7 +27,7 @@ touch $LOCK_FILE
|
|||||||
UPDATE_SITE_CONFIG=stage1_updating
|
UPDATE_SITE_CONFIG=stage1_updating
|
||||||
|
|
||||||
# Create a new updating.html from the template
|
# Create a new updating.html from the template
|
||||||
\cp $SCRIPT_DIR/update-page/updating.html.template $UPDATE_HTML
|
\cp $SCRIPT_DIR/nginx/update-page/updating.html.template $UPDATE_HTML
|
||||||
|
|
||||||
# configure nginx for the update-page
|
# configure nginx for the update-page
|
||||||
echo 'Configuring nginx to serve the update-page<br>' >> $UPDATE_HTML
|
echo 'Configuring nginx to serve the update-page<br>' >> $UPDATE_HTML
|
||||||
@ -88,8 +88,8 @@ pm2 save
|
|||||||
|
|
||||||
# let nginx showing gradido
|
# let nginx showing gradido
|
||||||
echo 'Configuring nginx to serve gradido again<br>' >> $UPDATE_HTML
|
echo 'Configuring nginx to serve gradido again<br>' >> $UPDATE_HTML
|
||||||
ln -s /etc/nginx/sites-available/gradido.conf /etc/nginx/sites-enabled/
|
sudo ln -s /etc/nginx/sites-available/gradido.conf /etc/nginx/sites-enabled/
|
||||||
rm /etc/nginx/sites-enabled/update-page.conf
|
sudo rm /etc/nginx/sites-enabled/update-page.conf
|
||||||
sudo /etc/init.d/nginx restart
|
sudo /etc/init.d/nginx restart
|
||||||
|
|
||||||
#release lock
|
#release lock
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user