Skip to content

Commit

Permalink
Add restart command to archivesspace.sh
Browse files Browse the repository at this point in the history
this is required for the postrotate option in log rotate. Adding the restart option to the script removes the need for a helper script to call stop and start, or rebooting the server.
  • Loading branch information
MichaelRBond committed Jan 14, 2017
1 parent 80af425 commit cbb1d82
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions launcher/archivesspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function readlink_dash_f {
i=$[i + 1]
done

# Compute the canonicalized name by finding the physical path
# Compute the canonicalized name by finding the physical path
# for the directory we're in and appending the target file.
result="`pwd -P`/$target_file"

Expand Down Expand Up @@ -165,12 +165,16 @@ case "$1" in
echo "Couldn't find a running instance to stop"
fi
;;
restart)
$0 stop
$0 start
;;
"")
# Run in foreground mode
(cd "$ASPACE_LAUNCHER_BASE"; bash -c "$startup_cmd 2>&1 | tee '$ARCHIVESSPACE_LOGS'")
;;
*)
echo "Usage: $0 [start|stop]"
echo "Usage: $0 [start|stop|restart]"
exit 1
;;

Expand Down

0 comments on commit cbb1d82

Please sign in to comment.