Autostop fixes.
This commit is contained in:
parent
3da3e86007
commit
85f3ff81c9
|
@ -15,7 +15,7 @@ start() {
|
||||||
export LD_LIBRARY_PATH=/usr/lib/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib
|
export LD_LIBRARY_PATH=/usr/lib/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib
|
||||||
start-stop-daemon --start --quiet --background --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
|
start-stop-daemon --start --quiet --background --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
(snail.autostop &>/dev/null)&
|
(nohup snail.autostop &>/dev/null)&
|
||||||
eend $status
|
eend $status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
LOCK_FILE=/tmp/.snail.nvrun.lock
|
LOCK_FILE=/tmp/.snail.nvrun.lock
|
||||||
NVRUN=/usr/local/bin/nvrun
|
NVRUN=snail.nvrun
|
||||||
|
|
||||||
(
|
(
|
||||||
for i in `seq 16`; do
|
for i in `seq 16`; do
|
||||||
|
@ -16,7 +16,6 @@ NVRUN=/usr/local/bin/nvrun
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo sleep 1
|
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -44,11 +43,10 @@ snail.nvrun "$@"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo sleep 1 aaa
|
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
pgrep -f $NVRUN &>/dev/null
|
pgrep $NVRUN &>/dev/null
|
||||||
|
|
||||||
if [ 0 -eq $? ]; then
|
if [ 0 -eq $? ]; then
|
||||||
echo "Other applications still use nVidia chip. So we aren't switching off it, just exiting..."
|
echo "Other applications still use nVidia chip. So we aren't switching off it, just exiting..."
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
model=`sudo snail.dmidecode`
|
model=`sudo snail.dmidecode`
|
||||||
|
|
||||||
let retry=5
|
let retry=8
|
||||||
while [ $retry -ne 0 ]; do
|
while [ $retry -ne 0 ]; do
|
||||||
|
|
||||||
case "$model" in
|
case "$model" in
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
model=`sudo snail.dmidecode`
|
model=`sudo snail.dmidecode`
|
||||||
|
|
||||||
let retry=5
|
let retry=8
|
||||||
while [ $retry -ne 0 ]; do
|
while [ $retry -ne 0 ]; do
|
||||||
|
|
||||||
case "$model" in
|
case "$model" in
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
LOCK_FILE=/tmp/.snail.nvrun.lock
|
LOCK_FILE=/tmp/.snail.nvrun.lock
|
||||||
NVRUN=/usr/local/bin/nvrun
|
NVRUN=nvrun
|
||||||
|
|
||||||
while [ 1 ]; do
|
while [ 1 ]; do
|
||||||
pgrep -f $NVRUN &>/dev/null
|
pgrep "$NVRUN" &>/dev/null
|
||||||
|
|
||||||
if [ 0 -ne $? ]; then
|
if [ 0 -ne $? ]; then
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ while [ 1 ]; do
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo sleep 1
|
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -32,7 +31,6 @@ while [ 1 ]; do
|
||||||
) 9>$LOCK_FILE ; exit $?
|
) 9>$LOCK_FILE ; exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo sleep 1
|
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue