diff --git a/scripts/debian/init.d/shairport b/scripts/debian/init.d/shairport index 213df20c..8be3f5e8 100755 --- a/scripts/debian/init.d/shairport +++ b/scripts/debian/init.d/shairport @@ -72,6 +72,11 @@ do_stop() --retry=TERM/10/KILL/5 } +do_reload() +{ + [ -f $PIDFILE ] && kill -HUP $(cat $PIDFILE) || return 1 +} + case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" @@ -83,6 +88,11 @@ case "$1" in do_stop log_end_msg $? ;; + reload) + log_daemon_msg "Reloading $DESC" "$NAME" + do_reload + log_end_msg $? + ;; status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; diff --git a/scripts/debian/logrotate.d/shairport b/scripts/debian/logrotate.d/shairport new file mode 100644 index 00000000..247255db --- /dev/null +++ b/scripts/debian/logrotate.d/shairport @@ -0,0 +1,16 @@ +/var/log/shairport.log +/var/log/shairport.err +{ + daily + missingok + rotate 52 + compress + delaycompress + notifempty + create 0660 root nogroup + sharedscripts + + postrotate + /etc/init.d/shairport reload + endscript +}