improvements to the auto upgrade script

* change how the channel is passed
* restart rather than stop/start when upgrading
* add safe mode for forcing a stop/start on upgrade
This commit is contained in:
Adam Cooke
2017-06-01 14:07:25 +01:00
parent 42ba1bb9f2
commit e443a3addb
2 changed files with 38 additions and 12 deletions
+3 -3
View File
@@ -16,11 +16,11 @@ fi
if [ $SHOULD_SUDO == "yes" ] && [ $USER != "postal" ]; then
run() {
HOME=/opt/postal
eval "sudo -u postal $1"
eval "sudo -u postal $@"
}
else
run() {
eval $1
eval $@
}
fi
@@ -87,7 +87,7 @@ case "$1" in
;;
auto-upgrade)
run "ruby script/auto_upgrade.rb $2"
run "ruby script/auto_upgrade.rb $@"
;;
make-user)