|
|
@@ -43,11 +43,15 @@ for service in $service_list; do
|
|
|
if [ "$service" = "iptables" ]; then
|
|
|
$BIN/v-update-firewall
|
|
|
else
|
|
|
- systemctl start $service > /dev/null 2>&1
|
|
|
- $BIN/v-log-action "system" "Error" "System" "Service started (Name: $service)."
|
|
|
+ systemctl start $service
|
|
|
+ result=$?
|
|
|
+ if [ "$result" -ne 0 ]; then
|
|
|
+ $BIN/v-log-action "system" "Error" "System" "Service failed to start (Name: $service)."
|
|
|
+ else
|
|
|
+ $BIN/v-log-action "system" "Info" "System" "Service started (Name: $service)."
|
|
|
+ fi
|
|
|
fi
|
|
|
check_result $? "ERROR: $service start failed" $E_RESTART
|
|
|
- check_result $? $BIN/v-log-action "system" "Error" "System" "Service failed to start (Name: $service)."
|
|
|
done
|
|
|
|
|
|
|