Update n8n.sh (#7176)
This commit is contained in:
parent
941457b392
commit
c6864c74bc
@ -27,13 +27,6 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then
|
|
||||||
if ! command -v npm >/dev/null 2>&1; then
|
|
||||||
echo "Installing NPM..."
|
|
||||||
$STD apt-get install -y npm
|
|
||||||
echo "Installed NPM..."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
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
|
||||||
HOST_IP=$(hostname -I | awk '{print $1}')
|
HOST_IP=$(hostname -I | awk '{print $1}')
|
||||||
@ -45,6 +38,7 @@ N8N_PROTOCOL=http
|
|||||||
N8N_HOST=$HOST_IP
|
N8N_HOST=$HOST_IP
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
NODE_VERSION="22" setup_nodejs
|
||||||
|
|
||||||
msg_info "Updating ${APP} LXC"
|
msg_info "Updating ${APP} LXC"
|
||||||
$STD npm update -g n8n
|
$STD npm update -g n8n
|
||||||
|
Loading…
x
Reference in New Issue
Block a user