n8n: Fix service file (#6362)
* Update n8n-install.sh * Update * Update * Update * Update
This commit is contained in:
parent
c7aac080ac
commit
05d11bf66d
@ -35,7 +35,7 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
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}')
|
||||||
mkdir -p /opt
|
mkdir -p /opt
|
||||||
cat <<EOF >/opt/n8n.env
|
cat <<EOF >/opt/n8n.env
|
||||||
|
@ -14,8 +14,7 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y ca-certificates
|
||||||
ca-certificates
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="22" setup_nodejs
|
||||||
@ -41,12 +40,13 @@ Description=n8n
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
EnvironmentFile="/opt/n8n.env"
|
EnvironmentFile=/opt/n8n.env
|
||||||
ExecStart=n8n start
|
ExecStart=n8n start
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
$STD systemctl enable --now n8n
|
systemctl enable -q --now n8n
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user