Skip to content

Commit

Permalink
fix(maintenance): sudo the nginx config generation
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienjoly committed Nov 23, 2019
1 parent 491b77b commit 38ebe59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ NGINX_AVAIL=/etc/nginx/sites-available
NGINX_ENBLD=/etc/nginx/sites-enabled
NEW_PORT=`cat $ROOT_DIR/.port` || port=$PORT_A

# Generate nginx configuration files based on template
sed -E "s/{{PORT}}/$PORT_A/g;" $ROOT_DIR/config/nginx-site-template > $NGINX_AVAIL/openwhyd.org_$PORT_A
sed -E "s/{{PORT}}/$PORT_B/g;" $ROOT_DIR/config/nginx-site-template > $NGINX_AVAIL/openwhyd.org_$PORT_B
echo "🤖 Generate nginx configuration files based on template..."
sudo sed -E "s/{{PORT}}/$PORT_A/g;" $ROOT_DIR/config/nginx-site-template > $NGINX_AVAIL/openwhyd.org_$PORT_A
sudo sed -E "s/{{PORT}}/$PORT_B/g;" $ROOT_DIR/config/nginx-site-template > $NGINX_AVAIL/openwhyd.org_$PORT_B

echo "👋 Deployment starting on port $NEW_PORT..."

Expand Down

0 comments on commit 38ebe59

Please sign in to comment.