update script: error check restarting service

basic error check with descriptive output in update_server.sh
This commit is contained in:
Rob Loranger 2019-06-14 10:05:08 -07:00
parent 0c44fe1c2e
commit f6ba1fc9c8
No known key found for this signature in database
GPG Key ID: D6F1633A4F0903B8
1 changed files with 6 additions and 2 deletions

View File

@ -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