proxmox-reverseProxy/lxc/nginx-proxy-manager/setup.sh

33 lines
664 B
Bash
Raw Normal View History

2020-11-04 16:50:28 +00:00
#!/usr/bin/env sh
TMP=/tmp/npm_install.sh
2021-08-12 08:47:54 +00:00
URL=https://raw.githubusercontent.com/ej52/proxmox-scripts/main/lxc/nginx-proxy-manager/install
if [ "$(uname)" != "Linux" ]; then
echo "OS NOT SUPPORTED"
exit 1
fi
DISTRO=$(cat /etc/*-release | grep -w ID | cut -d= -f2 | tr -d '"')
2022-01-16 17:27:05 +00:00
if [ "$DISTRO" != "alpine" ] && [ "$DISTRO" != "ubuntu" ] && [ "$DISTRO" != "debian" ]; then
echo "DISTRO NOT SUPPORTED"
exit 1
fi
2020-11-04 16:50:28 +00:00
2022-01-16 17:27:05 +00:00
INSTALL_SCRIPT=$DISTRO
if [ "$DISTRO" = "ubuntu" ]; then
INSTALL_SCRIPT="debian"
fi
rm -rf $TMP
2022-01-16 17:27:05 +00:00
wget -O "$TMP" "$URL/$INSTALL_SCRIPT.sh"
2020-11-04 16:50:28 +00:00
chmod +x "$TMP"
if [ "$(command -v bash)" ]; then
2022-01-16 17:27:05 +00:00
$(command -v sudo) bash "$TMP"
else
sh "$TMP"
fi
2020-11-04 16:50:28 +00:00