#|/bin/bash #installa il necessario per RPI-3-IOB partendo dal contenuto della folder /home/pi/steamware #step 1: creo file di log nuovi rm /var/log/log*.txt rm /var/log/MapoIOB* rm /home/pi/steamware/log*.txt touch /var/log/logReboot.txt touch /var/log/logTemp.txt touch /var/log/MapoIOB.log ln -sf /var/log/logReboot.txt /home/pi/steamware/logReboot.txt ln -sf /var/log/logTemp.txt /home/pi/steamware/logTemp.txt ln -sf /var/log/MapoIOB.log /home/pi/steamware/logfile.txt chown pi:pi /home/pi -R chmod 666 /var/log/log*.txt chmod 666 /var/log/MapoIOB.log #step 2: copio files in /usr/local/bin cd /home/pi/steamware chmod +x *.sh cp *.sh /usr/local/bin/ #step 3: copio files x logrotate... cd /home/pi/steamware cp MapoIOB_logrot /etc/logrotate.d/ # step 4: copio target systemd in avvio... cp -f sendRebootIOB /etc/init.d/sendRebootIOB cp -f sendRebootIOB.service /etc/systemd/system/sendRebootIOB.service #echo "" #echo "-----------------------------------------------" #echo "Completare registrazione servizio avvio: digitare i seguenti comandi" #echo "systemctl enable sendRebootIOB" #echo "systemctl daemon-reload" #echo "systemctl status sendRebootIOB" #echo "-----------------------------------------------" #echo "" # step 5: copio target MapoIOB in avvio... cp -f MapoIOB /etc/init.d/MapoIOB cp -f MapoIOB.service /etc/systemd/system/MapoIOB.service #echo "" #echo "" #echo "-----------------------------------------------" #echo "Infine creare voce crontab che salvi temperatura CPU/GPU ogni 20 minuti..." #echo "crontab -e" #echo "*/20 * * * * /usr/local/bin/saveTemp.sh" #echo "-----------------------------------------------"