mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-01 13:19:35 +02:00
Compare commits
3 Commits
2026-05-31
...
fix/npm-ce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2af5c2941c | ||
|
|
26377b7a7f | ||
|
|
151cd6581f |
@@ -470,6 +470,8 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-06-01
|
||||
|
||||
## 2026-05-31
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
@@ -216,6 +216,12 @@ EOF
|
||||
msg_ok "Initialized Backend"
|
||||
|
||||
msg_info "Starting Services"
|
||||
CERTBOT_VER=$(/opt/certbot/bin/certbot --version 2>&1 | awk '{print $NF}')
|
||||
if grep -q "Environment=CERTBOT_VERSION" /lib/systemd/system/npm.service; then
|
||||
sed -i "s|Environment=CERTBOT_VERSION=.*|Environment=CERTBOT_VERSION=${CERTBOT_VER}|" /lib/systemd/system/npm.service
|
||||
else
|
||||
sed -i "/Environment=NODE_ENV=production/a Environment=CERTBOT_VERSION=${CERTBOT_VER}" /lib/systemd/system/npm.service
|
||||
fi
|
||||
sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf
|
||||
sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager
|
||||
systemctl daemon-reload
|
||||
|
||||
@@ -160,7 +160,8 @@ $STD yarn install --network-timeout 600000
|
||||
msg_ok "Initialized Backend"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<'EOF' >/lib/systemd/system/npm.service
|
||||
CERTBOT_VER=$(/opt/certbot/bin/certbot --version 2>&1 | awk '{print $NF}')
|
||||
cat <<EOF >/lib/systemd/system/npm.service
|
||||
[Unit]
|
||||
Description=Nginx Proxy Manager
|
||||
After=network.target
|
||||
@@ -169,6 +170,7 @@ Wants=openresty.service
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=NODE_ENV=production
|
||||
Environment=CERTBOT_VERSION=${CERTBOT_VER}
|
||||
ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge
|
||||
ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250
|
||||
WorkingDirectory=/app
|
||||
|
||||
@@ -41,12 +41,12 @@ cat <<EOF >/etc/caddy/Caddyfile
|
||||
}
|
||||
EOF
|
||||
usermod -aG www-data caddy
|
||||
msg_ok "Configured Caddy"
|
||||
|
||||
systemctl enable -q --now php${PHP_VER}-fpm
|
||||
systemctl restart caddy
|
||||
msg_ok "Configured Caddy"
|
||||
|
||||
msg_info "Automating Webtrees Setup"
|
||||
cd /opt/webtrees
|
||||
WT_ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c15)
|
||||
$STD sudo -u www-data php /opt/webtrees/index.php config-ini \
|
||||
--dbhost=127.0.0.1 \
|
||||
|
||||
Reference in New Issue
Block a user