mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
Raspberry Pi (all): rename S09cpufreq to S05cpufreq
This commit is contained in:
parent
de60e956fe
commit
ee6a72badc
52
board/raspberrypi4/overlay/etc/init.d/S84streameye
Executable file
52
board/raspberrypi4/overlay/etc/init.d/S84streameye
Executable file
@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
MOTIONEYE_CONF_DIR="/data/etc/"
|
||||||
|
|
||||||
|
|
||||||
|
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||||
|
|
||||||
|
enabled() {
|
||||||
|
test $(ls -1 ${MOTIONEYE_CONF_DIR}/camera-*.conf 2>/dev/null| wc -l) == 1 || return 1
|
||||||
|
|
||||||
|
grep '# @proto mjpeg' ${MOTIONEYE_CONF_DIR}/camera-1.conf &>/dev/null || return 1
|
||||||
|
|
||||||
|
grep -E '# @url http://(.*)127.0.0.1:' ${MOTIONEYE_CONF_DIR}/camera-1.conf &>/dev/null || return 1
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
enabled || exit 0
|
||||||
|
|
||||||
|
start() {
|
||||||
|
msg_begin "Starting streameye"
|
||||||
|
streameye.sh start
|
||||||
|
test $? == 0 && msg_done || msg_fail
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
msg_begin "Stopping streameye"
|
||||||
|
streameye.sh stop
|
||||||
|
test $? == 0 && msg_done || msg_fail
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
|
||||||
|
restart)
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $?
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user