mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 21:56:31 +00:00
some config files are now looked up in /boot as well
This commit is contained in:
parent
1589076e76
commit
de4775cab7
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
sys_conf="/etc/os.conf"
|
||||
boot_conf="/boot/os.conf"
|
||||
conf="/data/etc/os.conf"
|
||||
|
||||
test -n "$os_version" || source /etc/init.d/base
|
||||
@ -10,8 +11,12 @@ mount_fs() {
|
||||
/bin/mount -a
|
||||
test $? == 0 && msg_done || msg_fail
|
||||
|
||||
if [ -f $sys_conf ] && ! [ -f $conf ]; then
|
||||
cp $sys_conf $conf
|
||||
if ! [ -f $conf ]; then
|
||||
if [ -f $boot_conf ]; then
|
||||
cp $boot_conf $conf
|
||||
elif [ -f $sys_conf ]; then
|
||||
cp $sys_conf $conf
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f $conf ]; then
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
sys_hostname_file="/etc/hostname"
|
||||
boot_hostname_file="/boot/hostname"
|
||||
hostname_file="/data/etc/hostname"
|
||||
|
||||
test -n "$os_version" || source /etc/init.d/base
|
||||
@ -9,10 +10,16 @@ case "$1" in
|
||||
start)
|
||||
msg_begin "Setting hostname"
|
||||
|
||||
if ! [ -f $hostname_file ]; then
|
||||
if [ -f $boot_hostname_file ]; then
|
||||
cp $boot_hostname_file $hostname_file
|
||||
elif [ -f $sys_hostname_file ]; then
|
||||
cp $sys_hostname_file $hostname_file
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f $hostname_file ]; then
|
||||
hostname=$(cat $hostname_file)
|
||||
elif [ -f $sys_hostname_file ]; then
|
||||
hostname=$(cat $sys_hostname_file)
|
||||
else
|
||||
hostname="$os_prefix-$board_sn"
|
||||
fi
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
sys_conf="/etc/wpa_supplicant.conf"
|
||||
boot_conf="/boot/wpa_supplicant.conf"
|
||||
conf="/data/etc/wpa_supplicant.conf"
|
||||
|
||||
log="/var/log/wpa_supplicant.log"
|
||||
@ -9,19 +10,28 @@ iface=wlan0
|
||||
driver=wext
|
||||
|
||||
sys_watch_conf="/etc/watch.conf"
|
||||
boot_watch_conf="/etc/watch.conf"
|
||||
watch_conf="/data/etc/watch.conf"
|
||||
|
||||
link_watch=yes
|
||||
link_watch_timeout=20
|
||||
|
||||
if [ -f $sys_watch_conf ] && ! [ -f $watch_conf ]; then
|
||||
cp $sys_watch_conf $watch_conf
|
||||
if ! [ -f $watch_conf ]; then
|
||||
if [ -f $boot_watch_conf ]; then
|
||||
cp $boot_watch_conf $watch_conf
|
||||
elif [ -f $sys_watch_conf ]; then
|
||||
cp $sys_watch_conf $watch_conf
|
||||
fi
|
||||
fi
|
||||
|
||||
test -f $watch_conf && source $watch_conf
|
||||
|
||||
if [ -f $sys_conf ] && ! [ -f $conf ]; then
|
||||
cp $sys_conf $conf
|
||||
if ! [ -f $conf ]; then
|
||||
if [ -f $boot_conf ]; then
|
||||
cp $boot_conf $conf
|
||||
elif [ -f $sys_conf ]; then
|
||||
cp $sys_conf $conf
|
||||
fi
|
||||
fi
|
||||
|
||||
test -f $conf || exit 0
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
sys_conf="/etc/ppp/default"
|
||||
boot_conf="/boot/ppp/default"
|
||||
conf="/data/etc/ppp"
|
||||
|
||||
prog="/usr/sbin/pppd"
|
||||
@ -11,8 +12,12 @@ watch_conf="/data/etc/watch.conf"
|
||||
|
||||
test -f $watch_conf && source $watch_conf
|
||||
|
||||
if [ -d $sys_conf ] && ! [ -d $conf ]; then
|
||||
cp -r $sys_conf $conf
|
||||
if ! [ -d $conf ]; then
|
||||
if [ -d $boot_conf ]; then
|
||||
cp -r $boot_conf $conf
|
||||
elif [ -d $sys_conf ]; then
|
||||
cp -r $sys_conf $conf
|
||||
fi
|
||||
fi
|
||||
|
||||
test -f $conf/modem || exit 0
|
||||
|
@ -3,6 +3,7 @@
|
||||
mkdir -p /var/lib/dhcp
|
||||
dh_conf="/var/cache/dhclient.conf"
|
||||
sys_static_conf="/etc/static_ip.conf"
|
||||
boot_static_conf="/boot/static_ip.conf"
|
||||
static_conf="/data/etc/static_ip.conf"
|
||||
watch_conf="/data/etc/watch.conf"
|
||||
|
||||
@ -17,8 +18,12 @@ wlan=wlan0
|
||||
|
||||
test -r $watch_conf && source $watch_conf
|
||||
|
||||
if [ -f $sys_static_conf ] && ! [ -f $static_conf ]; then
|
||||
cp $sys_static_conf $static_conf
|
||||
if ! [ -f $static_conf ]; then
|
||||
if [ -f $boot_static_conf ]; then
|
||||
cp $boot_static_conf $static_conf
|
||||
elif [ -f $sys_static_conf ]; then
|
||||
cp $sys_static_conf $static_conf
|
||||
fi
|
||||
fi
|
||||
|
||||
test -r $static_conf && source $static_conf
|
||||
|
@ -1,10 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
sys_conf="/etc/date.conf"
|
||||
boot_conf="/boot/date.conf"
|
||||
conf="/data/etc/date.conf"
|
||||
|
||||
if [ -f $sys_conf ] && ! [ -f $conf ]; then
|
||||
cp $sys_conf $conf
|
||||
if ! [ -f $conf ]; then
|
||||
if [ -f $boot_conf ]; then
|
||||
cp $boot_conf $conf
|
||||
elif [ -f $sys_conf ]; then
|
||||
cp $sys_conf $conf
|
||||
fi
|
||||
fi
|
||||
|
||||
test -f $conf || exit 0
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
sys_conf="/etc/motioneye.conf"
|
||||
boot_conf="/boot/motioneye.conf"
|
||||
conf="/data/etc/motioneye.conf"
|
||||
motion_conf="/data/etc/motion.conf"
|
||||
watch_conf="/data/etc/watch.conf"
|
||||
@ -10,8 +11,12 @@ meyewatch_disable=""
|
||||
dev_v4l_by_id="/dev/v4l/by-id/"
|
||||
media_dir="/data/output"
|
||||
|
||||
if [ -f $sys_conf ] && ! [ -f $conf ]; then
|
||||
cp $sys_conf $conf
|
||||
if ! [ -f $conf ]; then
|
||||
if [ -f $boot_conf ]; then
|
||||
cp $boor_conf $conf
|
||||
elif [ -f $sys_conf ]; then
|
||||
cp $sys_conf $conf
|
||||
fi
|
||||
fi
|
||||
|
||||
test -f "$conf" || exit 0
|
||||
|
@ -12,7 +12,7 @@ echo "---- shutting down $os_name $os_version ----" >> $boot_log
|
||||
(for i in $(ls -r /etc/init.d/S??*); do
|
||||
[ ! -x "$i" ] && continue
|
||||
[ -f /data/etc/no_$(basename $i) ] && continue
|
||||
$i stop || break
|
||||
$i stop
|
||||
done& echo $! > $pid_file) | tee -a $boot_log &
|
||||
|
||||
pid=$(cat $pid_file)
|
||||
|
@ -53,7 +53,7 @@ function start() {
|
||||
|
||||
function stop() {
|
||||
# stop the streameye background watch process
|
||||
ps | grep streameye | grep -v $$ | grep -v S94streameye| grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
ps | grep streameye.sh | grep -v $$ | grep -v S94streameye| grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
|
||||
# stop the raspimjpeg process
|
||||
pid=$(ps | grep raspimjpeg.py | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1)
|
||||
|
@ -53,7 +53,7 @@ function start() {
|
||||
|
||||
function stop() {
|
||||
# stop the streameye background watch process
|
||||
ps | grep streameye | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
ps | grep streameye.sh | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
|
||||
# stop the raspimjpeg process
|
||||
pid=$(ps | grep raspimjpeg.py | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1)
|
||||
|
@ -53,7 +53,7 @@ function start() {
|
||||
|
||||
function stop() {
|
||||
# stop the streameye background watch process
|
||||
ps | grep streameye | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
ps | grep streameye.sh | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill
|
||||
|
||||
# stop the raspimjpeg process
|
||||
pid=$(ps | grep raspimjpeg.py | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user