
|
If you were logged in you would be able to see more operations.
|
|
|
hourly, daily, and weekly scripts just try to run the relevant admin scripts directly, rather than using carton exec
Munger from IRC solved this problem with a little wrapper script: http://paste.pocoo.org/show/553669/
|
|
Description
|
hourly, daily, and weekly scripts just try to run the relevant admin scripts directly, rather than using carton exec
Munger from IRC solved this problem with a little wrapper script: http://paste.pocoo.org/show/553669/ |
Show » |
Sort Order:
|
I'm using this to start/stop the server and call the cron scripts :-
=======
#!/bin/bash
CARTON=$(which carton)
[ -x "${CARTON}" ] || exit 1
LOG=/var/log/musicbrainz
PIDFILE=$HOME/MusicBrainz.pid
cd $HOME/musicbrainz-server
case "$1" in
start)
if [ -f "${PIDFILE}" ]; then
echo "${PIDFILE}" exists. Is the server already running?
exit 1
fi
$CARTON exec – plackup -Ilib -r >> $LOG/server.log 2>&1 &
PID=$!
echo $PID > "${PIDFILE}"
echo "Server started with PID=$PID"
;;
stop)
if [ -f "${PIDFILE}" ]; then
PID=$(cat "${PIDFILE}")
kill $PID
rm "${PIDFILE}"
echo "Server stopped."
else
echo "Can't find ${PIDFILE}. Is the server running?"
fi
;;
hourly)
$CARTON exec – ./admin/cron/hourly.sh >> $LOG/hourly.log 2>&1
;;
daily)
$CARTON exec – ./admin/cron/daily.sh >> $LOG/daily.log 2>&1
;;
weekly)
$CARTON exec – ./admin/cron/weekly.sh >> $LOG/weekly.log 2>&1
;;
*)
echo $"Usage: $0 {start|stop|hourly|daily|weekly}"
exit 1
esac
exit 0