Compare commits

..

No commits in common. "main" and "develop" have entirely different histories.

4 changed files with 18 additions and 18 deletions

View File

@ -19,7 +19,7 @@ curl -sL https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-man
| --id | $nextid | container id |
| --bridge | vmbr0 | bridge used for eth0 |
| --cores | 1 | number of cpu cores |
| --disksize | 2G | size of disk |
| --disksize | 2GB | size of disk |
| --hostname | nginx-proxy-manager | hostname of the container |
| --memory | 512 | amount of memory |
| --storage | local-lvm | storage location for container disk |
@ -41,7 +41,7 @@ There is no login required to access the console from the Proxmox web UI. If you
If you are not using proxmox or want to install this on a existing Alpine box, you can run the setup script itself.
***Note:*** _Only Alpine, Debian and Ubuntu are currently supported by this script_
***Note:*** _Only Alpine and Ubuntu are currently supported by this script_
```bash
wget --no-cache -qO - https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/setup.sh | sh
@ -49,4 +49,4 @@ wget --no-cache -qO - https://raw.githubusercontent.com/ej52/proxmox/main/lxc/ng
## Thanks
- [whiskerz007](https://github.com/whiskerz007?tab=repositories)
- [whiskerz007](https://github.com/whiskerz007?tab=repositories)

View File

@ -34,7 +34,7 @@ function error {
_raw_base="https://raw.githubusercontent.com/ej52/proxmox-scripts/main/lxc/nginx-proxy-manager"
# Operating system
_os_type=alpine
_os_version=3.18
_os_version=3.12
# System architecture
_arch=$(dpkg --print-architecture)
@ -142,7 +142,7 @@ pveam download $_storage_template $_template &>/dev/null \
# Create variables for container disk
_storage_type=$(pvesm status -storage $_storage 2>/dev/null | awk 'NR>1 {print $2}')
case $_storage_type in
btrfs|dir|nfs)
dir|nfs)
_disk_ext=".raw"
_disk_ref="$_ctid/"
;;

View File

@ -14,11 +14,11 @@ cd $TEMPDIR
touch $TEMPLOG
# Helpers
log() {
logs=$(cat $TEMPLOG | sed -e "s/34/32/g" | sed -e "s/info/success/g");
clear && printf "\033c\e[3J$logs\n\e[34m[info] $*\e[0m\n" | tee $TEMPLOG;
log() {
logs=$(cat $TEMPLOG | sed -e "s/34/32/g" | sed -e "s/info/success/g");
clear && printf "\033c\e[3J$logs\n\e[34m[info] $*\e[0m\n" | tee $TEMPLOG;
}
runcmd() {
runcmd() {
LASTCMD=$(grep -n "$*" "$0" | sed "s/[[:blank:]]*runcmd//");
if [[ "$#" -eq 1 ]]; then
eval "$@" 2>$TEMPERR;
@ -28,13 +28,13 @@ runcmd() {
}
trapexit() {
status=$?
if [[ $status -eq 0 ]]; then
logs=$(cat $TEMPLOG | sed -e "s/34/32/g" | sed -e "s/info/success/g")
clear && printf "\033c\e[3J$logs\n";
elif [[ -s $TEMPERR ]]; then
logs=$(cat $TEMPLOG | sed -e "s/34/31/g" | sed -e "s/info/error/g")
err=$(cat $TEMPERR | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' | rev | cut -d':' -f1 | rev | cut -d' ' -f2-)
err=$(cat $TEMPERR | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' | rev | cut -d':' -f1 | rev | cut -d' ' -f2-)
clear && printf "\033c\e[3J$logs\e[33m\n$0: line $LASTCMD\n\e[33;2;3m$err\e[0m\n"
else
printf "\e[33muncaught error occurred\n\e[0m"
@ -78,7 +78,7 @@ _repository_version=$(printf "$_repository_version\n$_alpine_version" | sort -V
_repository="http://openresty.org/package/alpine/v$_repository_version/main"
# Update/Insert openresty repository
grep -q 'openresty.org' /etc/apk/repositories &&
grep -q 'openresty.org' /etc/apk/repositories &&
sed -i "/openresty.org/c\\$_repository/" /etc/apk/repositories || echo $_repository >> /etc/apk/repositories
# Update container OS
@ -102,7 +102,7 @@ runcmd pip3 install --no-cache-dir cffi certbot
log "Checking for latest NPM release"
# Get latest version information for nginx-proxy-manager
runcmd 'wget $WGETOPT -O ./_latest_release $NPMURL/releases/latest'
_latest_version=$(basename $(cat ./_latest_release | grep -wo "expanded_assets/v.*\d") | cut -d'v' -f2)
_latest_version=$(basename $(cat ./_latest_release | grep -wo "NginxProxyManager/.*.tar.gz") .tar.gz | cut -d'v' -f2)
# Download nginx-proxy-manager source
log "Downloading NPM v$_latest_version"
@ -210,7 +210,7 @@ cat << 'EOF' > /etc/init.d/npm
#!/sbin/openrc-run
description="Nginx Proxy Manager"
command="/usr/bin/node"
command="/usr/bin/node"
command_args="index.js --abort_on_uncaught_exception --max_old_space_size=250"
command_background="yes"
directory="/app"
@ -256,4 +256,4 @@ log "Installation complete
\e[0mNginx Proxy Manager should be reachable at the following URL.
http://${IP}:81
"
"

View File

@ -99,14 +99,14 @@ runcmd apt-get update && apt-get install -y -q --no-install-recommends openresty
# Install nodejs
log "Installing nodejs"
runcmd wget -qO - https://deb.nodesource.com/setup_16.x | bash -
runcmd wget -qO - https://deb.nodesource.com/setup_14.x | bash -
runcmd apt-get install -y -q --no-install-recommends nodejs
runcmd npm install --global yarn
# Get latest version information for nginx-proxy-manager
log "Checking for latest NPM release"
runcmd 'wget $WGETOPT -O ./_latest_release $NPMURL/releases/latest'
_latest_version=$(cat ./_latest_release | grep -Po '(?<=expanded_assets/v)[^"]+')
_latest_version=$(basename $(cat ./_latest_release | grep -wo "NginxProxyManager/.*.tar.gz") .tar.gz | cut -d'v' -f2)
# Download nginx-proxy-manager source
log "Downloading NPM v$_latest_version"
@ -241,4 +241,4 @@ log "Installation complete
\e[0mNginx Proxy Manager should be reachable at the following URL.
http://${IP}:81
"
"