update script: error check restarting service

basic error check with descriptive output in update_server.sh
pull/122/head
Rob Loranger 6 years ago
parent 0c44fe1c2e
commit f6ba1fc9c8
No known key found for this signature in database
GPG Key ID: D6F1633A4F0903B8
  1. 8
      scripts/upgrade-server.sh

@ -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…
Cancel
Save