diff options
Diffstat (limited to 'package/uhttpd/files')
-rwxr-xr-x | package/uhttpd/files/uhttpd.init | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/package/uhttpd/files/uhttpd.init b/package/uhttpd/files/uhttpd.init index c370f90..d4037a1 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() |