1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

Add redhat init reload & logrotate config

This commit is contained in:
James Hillyerd
2012-11-05 13:43:54 -08:00
parent ac807ed0b0
commit 09b8534b9b
2 changed files with 22 additions and 1 deletions

View File

@@ -29,7 +29,7 @@
RETVAL=0
program=/opt/inbucket/inbucket
prog=${program##*/}
config=/opt/inbucket/etc/inbucket.conf
config=/etc/opt/inbucket.conf
runas=inbucket
lockfile=/var/lock/subsys/$prog
@@ -77,6 +77,15 @@ stop() {
return $RETVAL
}
reload() {
[ "$EUID" != "0" ] && exit 4
echo -n $"Reloading $prog: "
killproc -p "$pidfile" "$program" -HUP
RETVAL=$?
echo
return $RETVAL
}
# See how we were called.
case "$1" in
start)
@@ -87,6 +96,10 @@ case "$1" in
[ -e $lockfile ] || exit 0
stop
;;
reload)
[ -e $lockfile ] || exit 0
reload
;;
restart|force-reload)
stop
start

View File

@@ -0,0 +1,8 @@
/var/log/inbucket.log {
missingok
notifempty
create 0644 inbucket inbucket
postrotate
[ -e /etc/init.d/inbucket ] && /etc/init.d/inbucket reload >/dev/null 2>&1 || true
endscript
}