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
|
||||
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}')
|
||||
mkdir -p /opt
|
||||
cat <<EOF >/opt/n8n.env
|
||||
|
@ -14,8 +14,7 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
ca-certificates
|
||||
$STD apt-get install -y ca-certificates
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
@ -41,12 +40,13 @@ Description=n8n
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile="/opt/n8n.env"
|
||||
EnvironmentFile=/opt/n8n.env
|
||||
ExecStart=n8n start
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
$STD systemctl enable --now n8n
|
||||
systemctl enable -q --now n8n
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
|
Loading…
x
Reference in New Issue
Block a user