Skip to content

Commit 538a1bc

Browse files
author
Kristan Kenney
committed
Improve error logging during service restart
1 parent a942bae commit 538a1bc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/v-restart-service

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ elif [ "$service" = "iptables" ]; then
4343
fi
4444
else
4545
systemctl restart $service > /dev/null 2>&1
46+
if [ $? -ne 0 ]; then
47+
check_result $E_RESTART "ERROR: Restart of $service failed."
48+
log_history "Restart of $service failed."
49+
fi
4650
fi
4751

4852
#----------------------------------------------------------#

0 commit comments

Comments
 (0)