This commit is contained in:
Esteban Mackay Q 2024-01-03 14:24:00 -05:00
parent 7a7e2b89c8
commit 4e611a5d00
2 changed files with 23 additions and 15 deletions

View File

@ -88,21 +88,6 @@ echo "Instalación completa."
####################
sudo timedatectl set-timezone America/Panama
####################################################################################
# swap raspberry
####################################################################################
if [ "$(cat /proc/cpuinfo | grep 'Raspberry')" != "" ]; then
sudo systemctl stop dphys-swapfile.service
sudo systemctl disable dphys-swapfile.service
sudo update-rc.d dphys-swapfile remove
sudo chmod -x /etc/init.d/dphys-swapfile
sudo dphys-swapfile swapoff
sudo swapoff -a
sudo rm /var/swap
sudo dphys-swapfile uninstall
sudo sed -i 's/CONF_SWAPSIZE=.*/CONF_SWAPSIZE=0/' /etc/dphys-swapfile
fi
######################################################################################################################
# Cronedit
######################################################################################################################
@ -135,6 +120,7 @@ rm /opt/curl-final.txt
fi
####################
echo iniciando instalacion
bash -c "$(curl -fsSLk https://gitlab.com/hp3icc/emq-TE1/-/raw/main/install/rpiswap.sh)" &&
bash -c "$(curl -fsSLk https://gitlab.com/hp3icc/emq-TE1/-/raw/main/install/rm.sh)" &&
bash -c "$(curl -fsSLk https://gitlab.com/hp3icc/emq-TE1/-/raw/main/install/dvswitch.sh)" &&
bash -c "$(curl -fsSLk https://gitlab.com/hp3icc/emq-TE1/-/raw/main/install/direwolf.sh)" &&

22
install/rpiswap.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Nombre del script
SCRIPT_NAME="rpiswap.sh"
# Registra el inicio en /opt/curl.txt
echo "Inicio: $SCRIPT_NAME" >> /opt/curl.txt
####################################################################################
# swap raspberry
####################################################################################
if [ "$(cat /proc/cpuinfo | grep 'Raspberry')" != "" ]; then
sudo systemctl stop dphys-swapfile.service
sudo systemctl disable dphys-swapfile.service
sudo update-rc.d dphys-swapfile remove
sudo chmod -x /etc/init.d/dphys-swapfile
sudo dphys-swapfile swapoff
sudo swapoff -a
sudo rm /var/swap
sudo dphys-swapfile uninstall
sudo sed -i 's/CONF_SWAPSIZE=.*/CONF_SWAPSIZE=0/' /etc/dphys-swapfile
fi
echo "Finalizado: $SCRIPT_NAME" >> /opt/curl.txt