git.cweiske.de
/
auerswald-callnotifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c60f343
)
make init script actually run on startup and log output
author
Christian Weiske
<cweiske@cweiske.de>
Sun, 2 Nov 2014 18:58:26 +0000
(19:58 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Sun, 2 Nov 2014 18:58:26 +0000
(19:58 +0100)
scripts/init.d/auerswald-callnotifier
patch
|
blob
|
history
diff --git
a/scripts/init.d/auerswald-callnotifier
b/scripts/init.d/auerswald-callnotifier
index 3256b26949de93c0e36d736fc6b8d312ff6b5a35..3d384512ee6bd7fbb8d4c5c888ae9a7bb137ac14 100755
(executable)
--- a/
scripts/init.d/auerswald-callnotifier
+++ b/
scripts/init.d/auerswald-callnotifier
@@
-1,11
+1,12
@@
#! /bin/sh
#! /bin/sh
+
### BEGIN INIT INFO
# Provides: auerswald-callnotifier
### BEGIN INIT INFO
# Provides: auerswald-callnotifier
-# Required-Start: $local_fs $network
-# Required-Stop: $local_fs $network
+# Required-Start: $local_fs $network
$syslog mysql slapd
+# Required-Stop: $local_fs $network
$syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description:
Run the c
all notification program
+# Short-Description:
C
all notification program
### END INIT INFO
# Author: Christian Weiske <cweiske@cweiske.de>
### END INIT INFO
# Author: Christian Weiske <cweiske@cweiske.de>
@@
-13,7
+14,7
@@
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Run auerswald callnotifier"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Run auerswald callnotifier"
-NAME=callnotifier
+NAME=
auerswald-
callnotifier
DAEMON=/usr/bin/php
DAEMON_ARGS="/usr/local/src/auerswald-callnotifier/callnotifier.php"
PIDFILE=/var/run/$NAME.pid
DAEMON=/usr/bin/php
DAEMON_ARGS="/usr/local/src/auerswald-callnotifier/callnotifier.php"
PIDFILE=/var/run/$NAME.pid
@@
-37,10
+38,11
@@
do_start()
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
+ || return 1
+ start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE\
+ --startas /bin/bash -- -c "exec $DAEMON $DAEMON_ARGS >> /var/log/$NAME.log 2>&1" \
+ || return 2
+ #--exec $DAEMON -- $DAEMON_ARGS \
}
do_stop()
}
do_stop()