mirror of https://gitlab.com/hp3icc/emq-TE1.git
root msg
This commit is contained in:
parent
644e806ed5
commit
910a41bb08
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Detectar el sistema operativo y su versión
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ SCRIPT_NAME="asl-wizard.sh"
|
|||
|
||||
# Registra el inicio en /opt/curl.txt
|
||||
echo "Inicio: $SCRIPT_NAME" >> /opt/curl.txt
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Este script debe ejecutarse como root."
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
# REPO DVS
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "Docker Install" --msgbox "Debe ejecutar este script como usuario ROOT" 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
(crontab -l | grep -v "sync ; echo 3 > /proc/sys/vm/drop_caches >/dev/null 2>&1") | crontab -
|
||||
#!/bin/bash
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ SCRIPT_NAME="p25.sh"
|
|||
# Registra el inicio en /opt/curl.txt
|
||||
echo "Inicio: $SCRIPT_NAME" >> /opt/curl.txt
|
||||
# Verificar si el usuario tiene permisos de root
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "Este script debe ejecutarse como usuario ROOT"
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ SCRIPT_NAME="p25cross.sh"
|
|||
|
||||
# Registra el inicio en /opt/curl.txt
|
||||
echo "Inicio: $SCRIPT_NAME" >> /opt/curl.txt
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Este script debe ejecutarse como root."
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
# REPO DVS
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ echo "Inicio: $SCRIPT_NAME" >> /opt/curl.txt
|
|||
# Verificar si el usuario tiene permisos de root
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
WHO=$(whoami)
|
||||
if [ "$WHO" != "root" ]
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ echo "Inicio: $SCRIPT_NAME" >> /opt/curl.txt
|
|||
# Verificar si el usuario tiene permisos de root
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
# Lista de aplicaciones para verificar e instalar
|
||||
#apps=("wget" "git" "sudo" "python3-pip" "python3-distutils" "python3-twisted" "python3-bitarray" "python3-dev" "rrdtool" "openssl" "libssl-dev" "python3-websockets" "python3-psutil")
|
||||
|
|
|
|||
24
menu/menu
24
menu/menu
|
|
@ -3,9 +3,9 @@
|
|||
if [ ! "$(cat /proc/cpuinfo | grep 'Raspberry')" != "" ]; then
|
||||
sudo cat > /bin/menu <<- "EOFX2"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "sudo su" --msgbox "Se requieren privilegios de superusuario. Ejecute 'sudo su' antes de ingresar al menú." 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
while : ; do
|
||||
choix=$(whiptail --title "Proyecto emq-TE1+ Rev: R00ab / Scrip Proyect by HP3ICC 73." --menu "Suba o Baje con las flechas del teclado y seleccione el número de opción:" 22 75 13 \
|
||||
|
|
@ -129,9 +129,9 @@ if [ ! "$(cat /proc/cpuinfo | grep 'Raspberry')" != "" ]; then
|
|||
if [ -d "/etc/asterisk" ]; then
|
||||
sudo cat > /bin/menu <<- "EOFX2"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "sudo su" --msgbox "Se requieren privilegios de superusuario. Ejecute 'sudo su' antes de ingresar al menú." 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
while : ; do
|
||||
choix=$(whiptail --title "Proyecto emq-TE1+ Rev: R00ab / Scrip Proyect by HP3ICC 73." --menu "Suba o Baje con las flechas del teclado y seleccione el número de opción:" 22 75 13 \
|
||||
|
|
@ -258,9 +258,9 @@ fi
|
|||
if [ "$(cat /proc/cpuinfo | grep 'Raspberry')" != "" ]; then
|
||||
sudo cat > /bin/menu <<- "EOFX1"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "sudo su" --msgbox "Se requieren privilegios de superusuario. Ejecute 'sudo su' antes de ingresar al menú." 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
while : ; do
|
||||
choix=$(whiptail --title "Proyecto emq-TE1+ Rev: R00ab / Scrip Proyect by HP3ICC 73." --menu "Suba o Baje con las flechas del teclado y seleccione el número de opción:" 22 75 13 \
|
||||
|
|
@ -387,9 +387,9 @@ if [ "$(cat /proc/cpuinfo | grep 'Raspberry')" != "" ]; then
|
|||
if [ -d "/etc/asterisk" ]; then
|
||||
sudo cat > /bin/menu <<- "EOFX1"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "sudo su" --msgbox "Se requieren privilegios de superusuario. Ejecute 'sudo su' antes de ingresar al menú." 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
while : ; do
|
||||
choix=$(whiptail --title "Proyecto emq-TE1+ Rev: R00ab / Scrip Proyect by HP3ICC 73." --menu "Suba o Baje con las flechas del teclado y seleccione el número de opción:" 22 75 13 \
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash
|
||||
cat > /bin/menu-asl <<- "EOF"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "root" --msgbox "Cambie a usuario root / Change to user root" 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -d "/etc/asterisk" ]; then
|
||||
whiptail --title "Easy-ASL" --msgbox "AllStarLink not Found / AllStarLink no instalado" 0 50
|
||||
|
|
@ -44,9 +44,9 @@ EOF
|
|||
if [ -d "/etc/nginx" ]; then
|
||||
cat > /bin/menu-asl <<- "EOF"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "root" --msgbox "Cambie a usuario root / Change to user root" 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -d "/etc/asterisk" ]; then
|
||||
whiptail --title "Easy-ASL" --msgbox "AllStarLink not Found / AllStarLink no instalado" 0 50
|
||||
|
|
@ -90,9 +90,9 @@ exit 0
|
|||
EOF
|
||||
cat > /bin/menu-allmon3 <<- "EOFA"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "root" --msgbox "Cambie a usuario root / Change to user root" 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -d "/etc/asterisk" ]; then
|
||||
whiptail --title "Easy-ASL" --msgbox "AllStarLink not Found / AllStarLink no instalado" 0 50
|
||||
|
|
@ -515,9 +515,9 @@ EOF
|
|||
fi
|
||||
cat > /bin/menu-asle <<- "EOF"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "root" --msgbox "Cambie a usuario root / Change to user root" 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -d "/etc/asterisk" ]; then
|
||||
whiptail --title "Easy-ASL" --msgbox "AllStarLink not Found / AllStarLink no instalado" 0 50
|
||||
|
|
@ -889,9 +889,9 @@ EOF
|
|||
#############################################################
|
||||
cat > /bin/menu-aslb <<- "EOF"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "root" --msgbox "Cambie a usuario root / Change to user root" 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -d "/etc/asterisk" ]; then
|
||||
whiptail --title "Easy-ASL" --msgbox "AllStarLink not Found / AllStarLink no instalado" 0 50
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ EOFX
|
|||
fi
|
||||
sudo cat > /bin/menu-fdmr-b <<- "EOF"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
while : ; do
|
||||
choix=$(whiptail --title "Raspbian Proyect HP3ICC FreeDMR-Bridge" --menu "move up or down with the keyboard arrows and select your option by pressing enter:" 23 56 13 \
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash
|
||||
sudo cat > /bin/menu-ysf2ysf <<- "EOF"
|
||||
#!/bin/bash
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 0
|
||||
if [ $EUID -ne 0 ]; then
|
||||
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while : ; do
|
||||
|
|
|
|||
Loading…
Reference in New Issue