mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-02 17:05:55 +01:00
Compare commits
3 Commits
exit_code_
...
refactor/n
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4aa0426445 | ||
|
|
c1a03efb65 | ||
|
|
18491bd49d |
14
ct/n8n.sh
14
ct/n8n.sh
@@ -27,7 +27,11 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
ensure_dependencies graphicsmagick
|
|
||||||
|
ensure_dependencies graphicsmagick
|
||||||
|
NODE_VERSION="24" setup_nodejs
|
||||||
|
|
||||||
|
msg_info "Updating n8n"
|
||||||
if [ ! -f /opt/n8n.env ]; then
|
if [ ! -f /opt/n8n.env ]; then
|
||||||
sed -i 's|^Environment="N8N_SECURE_COOKIE=false"$|EnvironmentFile=/opt/n8n.env|' /etc/systemd/system/n8n.service
|
sed -i 's|^Environment="N8N_SECURE_COOKIE=false"$|EnvironmentFile=/opt/n8n.env|' /etc/systemd/system/n8n.service
|
||||||
mkdir -p /opt
|
mkdir -p /opt
|
||||||
@@ -37,14 +41,12 @@ N8N_PORT=5678
|
|||||||
N8N_PROTOCOL=http
|
N8N_PROTOCOL=http
|
||||||
N8N_HOST=$LOCAL_IP
|
N8N_HOST=$LOCAL_IP
|
||||||
EOF
|
EOF
|
||||||
|
systemctl daemon-reload
|
||||||
fi
|
fi
|
||||||
|
|
||||||
NODE_VERSION="22" setup_nodejs
|
$STD npm update -g n8n
|
||||||
|
|
||||||
msg_info "Updating ${APP} LXC"
|
|
||||||
rm -rf /usr/lib/node_modules/.n8n-* /usr/lib/node_modules/n8n
|
|
||||||
$STD npm install -g n8n --force
|
|
||||||
systemctl restart n8n
|
systemctl restart n8n
|
||||||
|
msg_ok "Updated n8n"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,22 +15,19 @@ update_os
|
|||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
ca-certificates \
|
|
||||||
build-essential \
|
build-essential \
|
||||||
python3 \
|
python3 \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
graphicsmagick
|
graphicsmagick
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="24" setup_nodejs
|
||||||
|
|
||||||
msg_info "Installing n8n (Patience)"
|
msg_info "Installing n8n (Patience)"
|
||||||
$STD npm install --global patch-package
|
$STD npm install -g n8n
|
||||||
$STD npm install --global n8n
|
|
||||||
msg_ok "Installed n8n"
|
msg_ok "Installed n8n"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
mkdir -p /opt
|
|
||||||
cat <<EOF >/opt/n8n.env
|
cat <<EOF >/opt/n8n.env
|
||||||
N8N_SECURE_COOKIE=false
|
N8N_SECURE_COOKIE=false
|
||||||
N8N_PORT=5678
|
N8N_PORT=5678
|
||||||
|
|||||||
Reference in New Issue
Block a user