X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=package%2Fuhttpd%2Ffiles%2Fuhttpd.init;fp=package%2Fuhttpd%2Ffiles%2Fuhttpd.init;h=d4037a1b981b0800a3047fe948d7b14ff0ff1e3f;hb=276ec59b70550991e9035c50550dd006799f79a3;hp=c370f901099b6456ede8d2acb8abbd0e1d40c498;hpb=91562e0921fda533150cece427714d2f67195d3b;p=openwrt%2Fsvn-archive%2Farchive.git 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()