Commit 03e5c464 authored by German Leon's avatar German Leon
Browse files

sigo...

parent 3c3d9bc6
cp $HOME/startup_script_noactivo.sh $HOME/startup_script.sh
cp $HOME/startup_script_stop.sh $HOME/startup_script.sh
#!/bin/bash
function reset
{
$comando
killall iamalive_ini; echo "Enable watchdog";sudo shutdown -r now
}
trap 'reset' INT
function downcounter {
sudo killall -9 test.sh
sudo killall -2 test.py
for i in $(seq 3 -1 1); do echo -en "Cuenta atras para shutdown $i \r"; sleep 1; done
}
comando=$1
pgrep -x test.py > /dev/null && downcounter
reset
#!/bin/bash
trap 'killall iamalive_ini; echo "Enable watchdog"' INT
sudo killall -2 test.py
#sudo shutdown -r now
for i in $(seq 120 -1 1); do echo 'Cuenta atras para shutdown $i \r'; sleep 1; done
$HOME/bin/reset_test $HOME/bin/activo
#!/bin/bash
$HOME/bin/noactivo
$HOME/bin/reset_test $HOME/bin/noactivo
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment