diff options
author | Hubert Plociniczak <hubert@lshift.net> | 2008-09-09 12:48:35 +0100 |
---|---|---|
committer | Hubert Plociniczak <hubert@lshift.net> | 2008-09-09 12:48:35 +0100 |
commit | 579778ee3cc8ffbae8f6e13c2aeeeb104a5d12a0 (patch) | |
tree | ed6ecb0693c756cd77b325bef72fd3c421cff6ef | |
parent | 300855b22d31305bf385293d5504a9271136a3f8 (diff) | |
download | rabbitmq-server-579778ee3cc8ffbae8f6e13c2aeeeb104a5d12a0.tar.gz |
Renamed startup.log, .err to startup_log, _err
to avoid logrotation problems. This also removes
the problem when the node is called startup.
Same situation for shutdown logs.
-rw-r--r-- | packaging/RPMS/Fedora/init.d | 10 | ||||
-rw-r--r-- | packaging/debs/Debian/debian/init.d | 15 |
2 files changed, 13 insertions, 12 deletions
diff --git a/packaging/RPMS/Fedora/init.d b/packaging/RPMS/Fedora/init.d index dc0c2698..a79765cc 100644 --- a/packaging/RPMS/Fedora/init.d +++ b/packaging/RPMS/Fedora/init.d @@ -43,16 +43,16 @@ cd / start_rabbitmq () { set +e - su $USER -s /bin/sh -c "$DAEMON start_all ${NODE_COUNT}" > /var/log/rabbitmq/startup.log 2> /var/log/rabbitmq/startup.err + su $USER -s /bin/sh -c "$DAEMON start_all ${NODE_COUNT}" > /var/log/rabbitmq/startup_log 2> /var/log/rabbitmq/startup_err case "$?" in 0) echo SUCCESS && touch $LOCK_FILE ;; 1) - echo TIMEOUT - check /var/log/rabbitmq/startup.\{log,err\} + echo TIMEOUT - check /var/log/rabbitmq/startup_\{log,err\} ;; *) - echo FAILED - check /var/log/rabbitmq/startup.log, .err + echo FAILED - check /var/log/rabbitmq/startup_log, _err RETVAL=1;; esac set -e @@ -60,10 +60,10 @@ start_rabbitmq () { stop_rabbitmq () { set +e - su $USER -s /bin/sh -c "$DAEMON stop_all" > /var/log/rabbitmq/shutdown.log 2> /var/log/rabbitmq/shutdown.err + su $USER -s /bin/sh -c "$DAEMON stop_all" > /var/log/rabbitmq/shutdown_log 2> /var/log/rabbitmq/shutdown_err if [ $? != 0 ] ; then - echo FAILED - check /var/log/rabbitmq/shutdown.log, .err + echo FAILED - check /var/log/rabbitmq/shutdown_log, _err RETVAL=$? else rm -rf $LOCK_FILE diff --git a/packaging/debs/Debian/debian/init.d b/packaging/debs/Debian/debian/init.d index c3c180a8..7c192c51 100644 --- a/packaging/debs/Debian/debian/init.d +++ b/packaging/debs/Debian/debian/init.d @@ -24,19 +24,20 @@ if [ -f /etc/default/rabbitmq ] ; then . /etc/default/rabbitmq fi +RETVAL=0 set -e cd / start_rabbitmq () { set +e - su $USER -s /bin/sh -c "$DAEMON start_all ${NODE_COUNT}" > /var/log/rabbitmq/startup.log 2> /var/log/rabbitmq/startup.err + su $USER -s /bin/sh -c "$DAEMON start_all ${NODE_COUNT}" > /var/log/rabbitmq/startup_log 2> /var/log/rabbitmq/startup_err case "$?" in 0) echo SUCCESS;; 1) - echo TIMEOUT - check /var/log/rabbitmq/startup.\{log,err\};; + echo TIMEOUT - check /var/log/rabbitmq/startup_\{log,err\};; *) - echo FAILED - check /var/log/rabbitmq/startup.log, .err + echo FAILED - check /var/log/rabbitmq/startup_log, _err exit 1;; esac set -e @@ -44,9 +45,9 @@ start_rabbitmq () { stop_rabbitmq () { set +e - su $USER -s /bin/sh -c "$DAEMON stop_all" > /var/log/rabbitmq/shutdown.log 2> /var/log/rabbitmq/shutdown.err + su $USER -s /bin/sh -c "$DAEMON stop_all" > /var/log/rabbitmq/shutdown_log 2> /var/log/rabbitmq/shutdown_err if [ $? != 0 ] ; then - echo FAILED - check /var/log/rabbitmq/shutdown.log, .err + echo FAILED - check /var/log/rabbitmq/shutdown_log, _err exit 0 fi set -e @@ -83,8 +84,8 @@ case "$1" in ;; *) echo "Usage: $0 {start|stop|rotate-logs|restart|force-reload}" >&2 - exit 1 + RETVAL=1 ;; esac -exit 0 +exit RETVAL |