NginxProxyManager/nginx-proxy-manager

Cannot update to latest version v2.13.1

Closed this issue · 2 comments

Try to upgrade to
✔️ Downloaded NPM v2.13.1

But I always get the following error:

Done in 24.88s.
  ✔️   Built Frontend
  ✔️   Stopped Services
  ✔️   Cleaned Old Files
  ⏳   Setting up Environmentcp: cannot stat 'frontend/app-images/*': No such file or directory

[ERROR] in line 123: exit code 0: while executing command cp -r frontend/app-images/* /app/frontend/images

This fixed it for me:

curl -fsSL -o npm-update.sh https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/nginxproxymanager.sh

chmod +x npm-update.sh

awk '{
  if ($0 ~ /cp -r frontend\/app-images\/\* \/app\/frontend\/images/) {
    print "if [ -d frontend/app-images ] && [ \"$(ls -A frontend/app-images)\" ]; then";
    print "  cp -r frontend/app-images/* /app/frontend/images";
    print "else";
    print "  echo \"⚠️  No app-images to copy, skipping...\"";
    print "fi";
  } else {
    print $0
  }
}' npm-update.sh > npm-update-fixed.sh && chmod +x npm-update-fixed.sh
awk '{
  if ($0 ~ /cp -r global\/\* \/app\/global/) {
    print "if [ -d global ] && [ \"$(ls -A global)\" ]; then";
    print "  cp -r global/* /app/global";
    print "else";
    print "  echo \"⚠️  No global-files to copy, skipping...\"";
    print "fi";
  } else {
    print $0
  }
}' npm-update-fixed.sh > npm-update-fixed2.sh && chmod +x npm-update-fixed2.sh

bash npm-update-fixed2.sh