diff --git a/init.d/codedeploy-agent b/init.d/codedeploy-agent index beecad05..d4eadf42 100755 --- a/init.d/codedeploy-agent +++ b/init.d/codedeploy-agent @@ -40,6 +40,13 @@ stop() { exit $? } +restart() { + echo -n $"Restarting $prog:" + cd $AGENT_ROOT + nohup $BIN restart >/dev/null &1 # Try to restart the server + exit $? +} + status() { cd $AGENT_ROOT $BIN status # Status of the server @@ -67,8 +74,7 @@ case "$1" in stop ;; restart) - stop - start + restart ;; force-reload) stop