mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
Add S97dyndns init script
This commit is contained in:
parent
354c7872ff
commit
0d9d4089e4
27
board/common/overlay/etc/init.d/S97dyndns
Executable file
27
board/common/overlay/etc/init.d/S97dyndns
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
PROG="/usr/sbin/dyndns-update"
|
||||
SCRIPT="/data/etc/dyndns-update.sh"
|
||||
|
||||
|
||||
test -s ${SCRIPT} || exit 0
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
msg_begin "Updating dynamic DNS"
|
||||
${PROG} &>/dev/null
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
;;
|
||||
|
||||
stop)
|
||||
true
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
@ -8,3 +8,4 @@ fi
|
||||
|
||||
logger -t dyndns "updating dynamic DNS"
|
||||
bash "${SCRIPT}" 2>&1 | logger -t dyndns
|
||||
exit ${PIPESTATUS[0]}
|
||||
|
Loading…
x
Reference in New Issue
Block a user