File tree Expand file tree Collapse file tree
src/backend/shell_scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,8 +14,14 @@ echo "Restarting... $arg1"
1414
1515sudo docker restart $arg1
1616
17- # Re-enable nginx routing if it was previously stopped
18- if [ ! -f " /etc/nginx/sites-enabled/$arg1 .conf" ] && [ -f " /etc/nginx/sites-available/$arg1 .conf" ]; then
17+ # Re-enable nginx routing (check for .conf suffix)
18+ if [ ! -L " /etc/nginx/sites-enabled/ $arg1 .conf " ] && [ ! - f " /etc/nginx/sites-enabled/$arg1 .conf" ] && [ -f " /etc/nginx/sites-available/$arg1 .conf" ]; then
1919 sudo ln -s /etc/nginx/sites-available/$arg1 .conf /etc/nginx/sites-enabled/$arg1 .conf
20- sudo systemctl reload nginx
2120fi
21+
22+ # Re-enable nginx routing (check for no suffix)
23+ if [ ! -L " /etc/nginx/sites-enabled/$arg1 " ] && [ ! -f " /etc/nginx/sites-enabled/$arg1 " ] && [ -f " /etc/nginx/sites-available/$arg1 " ]; then
24+ sudo ln -s /etc/nginx/sites-available/$arg1 /etc/nginx/sites-enabled/$arg1
25+ fi
26+
27+ sudo systemctl reload nginx
Original file line number Diff line number Diff line change @@ -15,7 +15,12 @@ echo "Stopping... $arg1"
1515sudo docker stop $arg1
1616
1717# Disable nginx routing for this domain so it doesn't return 502
18- if [ -f " /etc/nginx/sites-enabled/$arg1 .conf" ]; then
18+ if [ -L " /etc/nginx/sites-enabled/ $arg1 .conf " ] || [ - f " /etc/nginx/sites-enabled/$arg1 .conf" ]; then
1919 sudo rm /etc/nginx/sites-enabled/$arg1 .conf
20- sudo systemctl reload nginx
2120fi
21+
22+ if [ -L " /etc/nginx/sites-enabled/$arg1 " ] || [ -f " /etc/nginx/sites-enabled/$arg1 " ]; then
23+ sudo rm /etc/nginx/sites-enabled/$arg1
24+ fi
25+
26+ sudo systemctl reload nginx
You can’t perform that action at this time.
0 commit comments