jacksonliam / mjpg-streamer

Fork of http://sourceforge.net/projects/mjpg-streamer/
3.01k stars 1.23k forks source link

defaults and init.d script issues #319

Open berkinet opened 3 years ago

berkinet commented 3 years ago

1. Thank you for this work!!

The camera and www options are handled differently in the defaults and init.d scripts. Also, there is no support for the WWW port option. Also. "sh" did not like the [[ test "./mjpg-streamer: 22: ./mjpg-streamer: [[: not found

I suggest: diff ./mjpg-streamer.default /etc/default/mjpg-streamer

4c4
< MJPG_STREAMER_USER=webcam
---
> MJPG_STREAMER_USER=root
17c17
< WWW_ROOT=/var/local/www
---
> # WWW_ROOT=/var/mailcam/www
29,30c29,30
< # WWW directory.
< WWW_ROOT=/var/local/www
---
> # WWW options.
> WWW_OPTIONS="-w /var/mailcam/www "  # port can no be included here

And: diff ./mjpg-streamer.init /etc/init.d/mjpg-streamer

1c1
< #!/bin/sh
---
> #!/bin/bash
107c107
<        --umask $UMASK -- -i "${INPUT_UVC_LIB} ${CAMERA_OPTIONS}" -o "${OUTPUT_HTTP_LIB} -w ${WWW_ROOT}"
---
>        --umask $UMASK -- -i "${INPUT_UVC_LIB} ${CAMERA_OPTIONS}" -o "${OUTPUT_HTTP_LIB} ${WWW_OPTIONS}"
hvr001 commented 2 years ago

Excuse me, but would you say (just one more character):

WWW_OPTIONS="-w /var/mailcam/www " # port can now be included here instead of: WWW_OPTIONS="-w /var/mailcam/www " # port can no be included here

THen an example might also helpful:

WWW_OPTIONS="-p 8888 -w /var/mailcam/www " # port 8888 is included now