Revert "debug; set -x to config"
[aiccu.git] / doc / aiccu.init.gentoo
blob42bc11218e449c00075aa932ab9d14c0ba9f6199
1 #!/sbin/runscript
3 depend() {
4         need net
5         after ntp-client
8 checkconfig() {
9         # Verify that the configuration file exists
10         if [ ! -f /etc/aiccu.conf ]; then
11                 eerror "AICCU Configuration file /etc/aiccu.conf doesn't exist"
12                 return 1
13         fi
14         
15         # Verify that the configuration is correct
16         if [ `grep -c "^username" /etc/aiccu.conf 2>/dev/null` -ne 1 ]; then
17                 eerror "AICCU is not configured, edit /etc/aiccu.conf first"
18                 return 1
19         fi
23 start() {
24         checkconfig || return 1
25         ebegin "Starting aiccu"
26         start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/aiccu -- start
27         eend $?
31 stop() {
32         ebegin "Stopping aiccu"
33         start-stop-daemon --stop --oknodo --quiet --exec /usr/sbin/aiccu -- stop
34         eend $?