summaryrefslogtreecommitdiffstats
path: root/sbin/init.d/echelogd
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/init.d/echelogd')
-rwxr-xr-xsbin/init.d/echelogd11
1 files changed, 6 insertions, 5 deletions
diff --git a/sbin/init.d/echelogd b/sbin/init.d/echelogd
index e4eada7..9ad6426 100755
--- a/sbin/init.d/echelogd
+++ b/sbin/init.d/echelogd
@@ -5,9 +5,14 @@
option bin reserved_option /opt/echelog/sbin/echelogd
option config standard_option /etc/echelog/echelog.conf
option runas standard_option echelogc:daemon
-option cmdline reserved_option '$bin -C $opt_config'
+option cmdline reserved_option 'echelogd_wrapper -C $opt_config'
#option check_interval reserved_option 60
+# start echelog daemon with input, output et error redirect to /dev/null
+function echelogd_wrapper {
+ eval "$bin ${cmdline#echelogd_wrapper}" < /dev/null >&0 2>&0
+}
+
# assign default values to options and variables before parsing the cfg file
function fct_pre_start {
local path=$( dirname $opt_config )
@@ -179,9 +184,5 @@ function do_install {
fi
}
-function do_check {
- echo "$HOSTNAME $1.$2 $(date +%s) RUNNING 0 OK"
-}
-
load_config