Signed-off-by: Samuele-StackUser <ceo@steamware.net>
Added iob-pi states for raspberry
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Gestione pacchetti base x raspberry
|
||||
log2ram-installer:
|
||||
cmd.script:
|
||||
- name: /root/log2ramInstall.sh
|
||||
- source: salt://log2ramInstall.sh
|
||||
|
||||
|
||||
# aggiunta pacchetti IOB-PI per MAPO
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# Archiviazione eventuali cartelle MAPO precedenti...
|
||||
|
||||
# creo archivio
|
||||
mkdir -p /home/pi/bck/
|
||||
tar cfz /home/pi/bck/steamware-`date +%F`.tgz /home/pi/steamware
|
||||
|
||||
# cancello old
|
||||
rm -rdf /home/pi/steamware
|
||||
@@ -19,6 +19,11 @@ mc:
|
||||
links2:
|
||||
pkg:
|
||||
- installed
|
||||
|
||||
etckeeper:
|
||||
pkg:
|
||||
- installed
|
||||
|
||||
locate:
|
||||
pkg:
|
||||
- installed
|
||||
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Purpose: Display the ARM CPU and GPU temperature of Raspberry Pi 2/3
|
||||
# -------------------------------------------------------
|
||||
cpu=$(</sys/class/thermal/thermal_zone0/temp)
|
||||
echo "$(date) | GPU => $(/opt/vc/bin/vcgencmd measure_temp) | CPU => $((cpu/1000))'C" >> /var/log/temperature.log
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# Purpose: fix permission + crontab setup
|
||||
# -------------------------------------------------------
|
||||
|
||||
# fix permission
|
||||
chmod +x /usr/local/bin/checkTemp.sh
|
||||
|
||||
# fix crontab... #write out current crontab
|
||||
crontab -l > mycron
|
||||
#echo new cron into cron file
|
||||
echo "0/30 * * * * /usr/local/bin/checkTemp.sh" >> mycron
|
||||
#install new cron file
|
||||
crontab mycron
|
||||
rm mycron
|
||||
@@ -0,0 +1,29 @@
|
||||
# eseguo install del SW!
|
||||
iob-pi-dos2unix:
|
||||
cmd.run:
|
||||
- name: dos2unix /home/pi/steamware/*
|
||||
|
||||
iob-pi-pre:
|
||||
cmd.run:
|
||||
- name: chmod +x /home/pi/steamware/install-RPI-IOB.sh >> /var/log/MapoInstall.log
|
||||
|
||||
iob-pi-setup:
|
||||
cmd.run:
|
||||
- name: /home/pi/steamware/install-RPI-IOB.sh >> /var/log/MapoInstall.log
|
||||
|
||||
iob-pi-setup-01:
|
||||
cmd.run:
|
||||
- name: chmod +x /etc/init.d/*IOB
|
||||
|
||||
iob-pi-setup-02:
|
||||
cmd.run:
|
||||
- name: systemctl enable sendRebootIOB
|
||||
|
||||
iob-pi-setup-03:
|
||||
cmd.run:
|
||||
- name: systemctl enable MapoIOB
|
||||
|
||||
iob-pi-setup-04:
|
||||
cmd.run:
|
||||
- name: systemctl daemon-reload
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# aggiunta pacchetti IOB-PI per MAPO
|
||||
iob-pi-download:
|
||||
file.managed:
|
||||
- name: /home/pi/src/Mapo.zip
|
||||
- source: http://nexus.steamware.net/repository/utility/MAPO/IOB-PI/Mapo.zip
|
||||
- makedirs: True
|
||||
- source_hash: http://nexus.steamware.net/repository/utility/MAPO/IOB-PI/Mapo.zip.md5
|
||||
|
||||
# se ci fosse vecchia install --> zip & compact...
|
||||
archive-old:
|
||||
cmd.script:
|
||||
- name: /root/IobPiArchiveOld.sh
|
||||
- source: salt://IobPiArchiveOld.sh
|
||||
|
||||
|
||||
# Ora estraggo files in directory...
|
||||
extract-IOB-MAN:
|
||||
archive.extracted:
|
||||
- name: /home/pi/steamware/
|
||||
- source: /home/pi/src/Mapo.zip
|
||||
- source_hash: http://nexus.steamware.net/repository/utility/MAPO/IOB-PI/Mapo.zip.md5
|
||||
- enforce_toplevel: False
|
||||
- overwrite: True
|
||||
|
||||
# aggiungo sw specifico (python)
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
# esegue install log2ram includendo repo apt + installazione
|
||||
|
||||
echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list
|
||||
wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -
|
||||
apt update
|
||||
apt install log2ram
|
||||
@@ -0,0 +1,18 @@
|
||||
# Gestione pacchetti base x raspberry
|
||||
log2ram-installer:
|
||||
cmd.script:
|
||||
- name: /root/log2ramInstall.sh
|
||||
- source: salt://log2ramInstall.sh
|
||||
|
||||
# conf log temperatura
|
||||
templog-download:
|
||||
file.managed:
|
||||
- name: /usr/local/bin/checkTemp.sh
|
||||
- source: salt://checkTemp.sh
|
||||
- makedirs: true
|
||||
|
||||
templog-setup:
|
||||
cmd.script:
|
||||
- source: salt://checkTempSetup.sh
|
||||
|
||||
|
||||
@@ -13,6 +13,15 @@ base:
|
||||
- editors
|
||||
- users
|
||||
|
||||
'os:Raspbian':
|
||||
- match: grain
|
||||
- sanitize
|
||||
- raspberry
|
||||
- base
|
||||
- utils
|
||||
- editors
|
||||
- users
|
||||
|
||||
'roles:developer':
|
||||
- match: grain
|
||||
- utilsWin
|
||||
@@ -57,6 +66,11 @@ base:
|
||||
- match: grain
|
||||
- baseHV
|
||||
|
||||
'roles:iob-pi':
|
||||
- match: grain
|
||||
- iob-pi
|
||||
- iob-pi-setup
|
||||
|
||||
# 'roles:ubuVpnSrv':
|
||||
# - match: grain
|
||||
# - ubuVpnSrv
|
||||
|
||||
Reference in New Issue
Block a user