summaryrefslogtreecommitdiff
path: root/package/uhttpd/files/uhttpd.init
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-05-03 17:19:22 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-05-03 17:19:22 +0000
commitd0f3681e1e384dd7f11bc8ce8cd43c4fdff897d9 (patch)
tree529563447601c506de1f59ca01c4230d4e4e28f1 /package/uhttpd/files/uhttpd.init
parent37f687e09940b8aea678b166750b54cd90d34e55 (diff)
[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()