bruh moment(space)

This commit is contained in:
Shihaam Abdul Rahman 2022-06-02 00:36:52 +05:00
parent 7549cf69ad
commit 63e402aaac
Signed by: shihaam
GPG Key ID: 16ADCF6871CB2A56

View File

@ -9,7 +9,7 @@ IP_OLD=$(grep -A0 '#DYNAMIC' $CONFIG | awk '{print $2}' | cut -f1 -d ';')
if [ "$IP" != "$IP_OLD" ]
then
NGINX_STATUS=$(nginx -t 2>&1 | tail -n 1 | awk '{print $7}')
if [ "$NGINX_STATUS" = "successful"]
if [ "$NGINX_STATUS" = "successful" ]
then
sed -i "s/$IP_OLD/$IP/" $CONFIG
systemctl restart nginx