Pandaboard Installation - Jiajun-Liu/Snippets GitHub Wiki

##Cron jobs

*/1 * * * * /root/daemon.sh
*/1 * * * * /root/autossh.sh
0 4 * * * /sbin/shutdown -r now

##daemon.sh ---looks after the actual script---target.py for instance

#!/usr/bin/env bash
path='/root/'
output=`ps aux | grep 'target.p[y]'`
set -- $output 

if [ -z "$2" ]
then
    date >> $path/log.txt
    echo 'starting $path/target.py' >> $path/log.txt
    cd $path
    ./target.py &
fi

autossh.sh -- initiate ssh reverse tunnels

#!/usr/bin/env bash
output=`ps aux | grep 'ssh -N -f -[R]'`
set -- $output 

if [ -z "$2" ]
then
    echo 'starting ssh'
    ssh -N -f -R 20000:localhost:22  [email protected] sleep 365d  >> /root/log.txt
fi

time synchronisation

make sure internet is up

ntpdate pool.ntp.org #better add this to /etc/cron.daily/ntp

and copy /usr/share/zoneinfo/posix to panda board, and use add export TZ='Australia/Brisbane' to .bashrc

⚠️ **GitHub.com Fallback** ⚠️