mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
Add S10sysctl init script
This commit is contained in:
parent
a7056fef64
commit
2fe50addcf
36
board/common/overlay/etc/init.d/S10sysctl
Executable file
36
board/common/overlay/etc/init.d/S10sysctl
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
SYS_CONF="/etc/sysctl.conf"
|
||||
BOOT_CONF="/boot/sysctl.conf"
|
||||
CONF="/data/etc/sysctl.conf"
|
||||
|
||||
PROG="/sbin/sysctl"
|
||||
|
||||
|
||||
test -n "${OS_VERSION}" || source /etc/init.d/base
|
||||
|
||||
if [[ ! -f ${CONF} && ! -f ${SYS_CONF} && ! -f ${BOOT_CONF} ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
msg_begin "Applying sysctl parameters"
|
||||
test -f ${SYS_CONF} && sysctl -q -p ${SYS_CONF}
|
||||
test -f ${CONF} && sysctl -q -p ${CONF}
|
||||
test -f ${BOOT_CONF} && sysctl -q -p ${BOOT_CONF}
|
||||
msg_done
|
||||
;;
|
||||
|
||||
stop)
|
||||
true
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
Loading…
x
Reference in New Issue
Block a user