Benjamin Renard commited on 2013-08-14 10:56:46
Showing 4 changed files, with 18 additions and 3 deletions.
| ... | ... |
@@ -13,6 +13,7 @@ DAEMON_BIN=/usr/bin/wifidog |
| 13 | 13 |
WDCTL_BIN=/usr/bin/wdctl |
| 14 | 14 |
DAEMON_DEFS=/etc/default/wifidog-gateway |
| 15 | 15 |
DAEMON_CONF=/etc/wifidog.conf |
| 16 |
+LOG_FILE=/var/log/wifidog |
|
| 16 | 17 |
LOG_LEVEL=6 |
| 17 | 18 |
OPTIONS="" |
| 18 | 19 |
NAME=wifidog-gateway |
| ... | ... |
@@ -30,12 +31,12 @@ DAEMON_OPTS="-c $DAEMON_CONF -s -d $LOG_LEVEL" |
| 30 | 31 |
case "$1" in |
| 31 | 32 |
start) |
| 32 | 33 |
log_daemon_msg "Starting $DESC" "$NAME" |
| 33 |
- start-stop-daemon --start --oknodo --quiet --exec "$DAEMON_BIN" -- $DAEMON_OPTS |
|
| 34 |
+ start-stop-daemon --start --oknodo --quiet --exec "$DAEMON_BIN" -- $DAEMON_OPTS > $LOG_FILE 2>&1 |
|
| 34 | 35 |
log_end_msg "$?" |
| 35 | 36 |
;; |
| 36 | 37 |
stop) |
| 37 | 38 |
log_daemon_msg "Stopping $DESC" "$NAME" |
| 38 |
- start-stop-daemon --stop --oknodo --quiet --exec "$DAEMON_BIN" |
|
| 39 |
+ start-stop-daemon --stop --oknodo --quiet --exec "$DAEMON_BIN" > $LOG_FILE 2>&1 |
|
| 39 | 40 |
log_end_msg "$?" |
| 40 | 41 |
;; |
| 41 | 42 |
restart|reload|force-reload) |