update script: error check restarting service
basic error check with descriptive output in update_server.sh
This commit is contained in:
parent
0c44fe1c2e
commit
f6ba1fc9c8
|
@ -84,5 +84,9 @@ cp -r $tempdir/{pages,static,templates,writefreely} .
|
|||
|
||||
# restart service
|
||||
echo "Restarting writefreely systemd service.."
|
||||
`systemctl restart writefreely`
|
||||
echo "Done, version has been upgraded to $latest."
|
||||
if `systemctl restart writefreely`; then
|
||||
echo "Success, version has been upgraded to $latest."
|
||||
else
|
||||
echo "Upgrade complete, but failed to restart service"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue