init and logrotate file added.

This commit is contained in:
Roland Jax
2014-05-15 21:08:49 +02:00
parent ad200cc6b9
commit 0821a7d31b
14 changed files with 53 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: ebus-daemon
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Start ebus-daemon
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
. /lib/lsb/init-functions
DAEMON=/usr/bin/ebus-daemon
PIDFILE=/var/run/ebus-daemon.pid
test -x $DAEMON || exit 5
case $1 in
start)
log_daemon_msg "Starting ebus-daemon" "ebus-daemon"
start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON
status=$?
log_end_msg $status
;;
stop)
log_daemon_msg "Stopping ebus-daemon" "ebus-daemon"
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
log_end_msg $?
rm -f $PIDFILE
;;
restart|force-reload)
$0 stop && sleep 2 && $0 start
;;
status)
status_of_proc $DAEMON "ebus-daemon"
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}"
exit 2
;;
esac
+9
View File
@@ -0,0 +1,9 @@
/var/log/ebus-daemon.log {
rotate 7
size 1M
copytruncate
compress
missingok
notifempty
daily
}