forked from rand256/valetudo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
valetudo.conf
40 lines (35 loc) · 1.08 KB
/
valetudo.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!upstart
description "Valetudo"
start on started rrwatchdoge
stop on stopping rrwatchdoge
oom score 1000
pre-stop script
# just stop immediately, don't irritate watchdog timers
killall -9 valetudo
end script
script
# give roborock software some time to initialize if started at boot or right after them
wdp=`pidof WatchDoge`
if [ `cut -d. -f1 /proc/uptime` -lt 300 ]; then
echo -n "Waiting for 30 sec after boot..."
sleep 30
echo " done."
elif [ -n "$wdp" -a $(date +%s --date="now - `stat -c%X /proc/$wdp` seconds") -lt 60 ]; then
echo -n "Waiting for 15 sec after watchdoge launch..."
sleep 15
echo " done."
fi
# check data partition to be mounted before doing anything
while ! /bin/mountpoint -q /mnt/data
do
echo "Data mountpoint isn't ready, can't run yet. Retrying in 5 sec..."
sleep 5
done
# disable core dumps on this system, we're in production
echo '|/bin/false' > /proc/sys/kernel/core_pattern
# finally run valetudo
exec /usr/bin/chrt -i 0 /usr/bin/ionice -c3 /usr/local/bin/valetudo
end script
respawn
respawn limit 10 90
limit as 209715200 209715200