mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-08-15 17:32:22 +00:00
Update install_proxmenux.sh
This commit is contained in:
parent
882ff6bccb
commit
71106ba6f6
@ -3,7 +3,10 @@
|
|||||||
# Configuración
|
# Configuración
|
||||||
REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"
|
REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"
|
||||||
INSTALL_DIR="/usr/local/bin"
|
INSTALL_DIR="/usr/local/bin"
|
||||||
|
LANG_DIR="/usr/local/share/proxmenux/lang"
|
||||||
|
VERSION_FILE="/usr/local/share/proxmenux/version.txt"
|
||||||
MENU_SCRIPT="menu.sh"
|
MENU_SCRIPT="menu.sh"
|
||||||
|
DEFAULT_LANGUAGE="es"
|
||||||
|
|
||||||
# Verificar que se ejecute como root
|
# Verificar que se ejecute como root
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
@ -11,6 +14,11 @@ if [ "$(id -u)" -ne 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Crear directorios necesarios
|
||||||
|
echo "Creando directorios necesarios..."
|
||||||
|
mkdir -p "$INSTALL_DIR"
|
||||||
|
mkdir -p "$LANG_DIR"
|
||||||
|
|
||||||
# Descargar el script menu.sh desde GitHub
|
# Descargar el script menu.sh desde GitHub
|
||||||
echo "Descargando el script principal..."
|
echo "Descargando el script principal..."
|
||||||
wget -qO "$INSTALL_DIR/$MENU_SCRIPT" "$REPO_URL/$MENU_SCRIPT"
|
wget -qO "$INSTALL_DIR/$MENU_SCRIPT" "$REPO_URL/$MENU_SCRIPT"
|
||||||
@ -21,7 +29,25 @@ if [ $? -ne 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Asignar permisos de ejecución
|
# Descargar archivos de idioma predeterminados
|
||||||
|
echo "Descargando archivos de idioma..."
|
||||||
|
for LANG in es en; do
|
||||||
|
wget -qO "$LANG_DIR/$LANG.lang" "$REPO_URL/lang/$LANG.lang"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error al descargar el archivo de idioma '$LANG.lang'. Verifica la URL y tu conexión a Internet." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Descargar el archivo de versión inicial
|
||||||
|
echo "Descargando archivo de versión inicial..."
|
||||||
|
wget -qO "$VERSION_FILE" "$REPO_URL/version.txt"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error al descargar el archivo de versión. Verifica la URL y tu conexión a Internet." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Asignar permisos de ejecución al script principal
|
||||||
chmod +x "$INSTALL_DIR/$MENU_SCRIPT"
|
chmod +x "$INSTALL_DIR/$MENU_SCRIPT"
|
||||||
|
|
||||||
# Confirmación
|
# Confirmación
|
||||||
|
Loading…
x
Reference in New Issue
Block a user