28 lines
504 B
Bash
Executable File
28 lines
504 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# frode klevstul : start 25.05.11 : restart pcloud, as that program hangs quire frequently
|
|
|
|
# 900 sec = 15 minutes
|
|
secs=900
|
|
|
|
while true
|
|
do
|
|
|
|
if pidof pcloud ; then
|
|
echo "kill pcloud"
|
|
pkill -15 pcloud
|
|
sleep 30
|
|
else
|
|
echo "pCloud is not running, so no killing is neccessary (this time around…)"
|
|
sleep 1
|
|
fi
|
|
|
|
echo "start pcloud"
|
|
pcloud &
|
|
sleep 10
|
|
|
|
echo "sleep for ${secs} seconds, wake up, repeat (ctrl+c to stop)"
|
|
sleep ${secs}
|
|
|
|
done
|