aboutsummaryrefslogtreecommitdiffstats
path: root/package/uhttpd/files/uhttpd.init
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-05-03 17:19:22 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-05-03 17:19:22 +0000
commitc84a22dde3abc22b94d4ddfcae192bb1b0d89baf (patch)
tree529563447601c506de1f59ca01c4230d4e4e28f1 /package/uhttpd/files/uhttpd.init
parentadae4ff72c5c855054e67991c3564b6828f4ce1b (diff)
downloadupstream-c84a22dde3abc22b94d4ddfcae192bb1b0d89baf.tar.gz
upstream-c84a22dde3abc22b94d4ddfcae192bb1b0d89baf.tar.bz2
upstream-c84a22dde3abc22b94d4ddfcae192bb1b0d89baf.zip
[package] uhttpd: display errors in init script, code formatting changes, bump package version
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31572 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/uhttpd/files/uhttpd.init')
-rwxr-xr-xpackage/uhttpd/files/uhttpd.init5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/uhttpd/files/uhttpd.init b/package/uhttpd/files/uhttpd.init
index c370f90109..d4037a1b98 100755
--- a/package/uhttpd/files/uhttpd.init
+++ b/package/uhttpd/files/uhttpd.init
@@ -108,6 +108,11 @@ start_instance()
SERVICE_PID_FILE=/var/run/uhttpd_${cfg}.pid
service_start $UHTTPD_BIN -f $UHTTPD_ARGS
+
+ # Check if daemon is running, if not then
+ # re-execute in foreground to display error.
+ sleep 1 && service_check $UHTTPD_BIN || \
+ $UHTTPD_BIN -f $UHTTPD_ARGS
}
stop_instance()