mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
Add redhat init reload & logrotate config
This commit is contained in:
@@ -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
|
||||
|
||||
8
etc/redhat-el6/inbucket.logrotate
Normal file
8
etc/redhat-el6/inbucket.logrotate
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user