From cef1a19058aea74da0d5f5aca7c6535e9cd35b64 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 24 Jun 2025 14:44:00 +0200 Subject: [PATCH] Update Caddy service --- install/notesnook-install.sh | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/install/notesnook-install.sh b/install/notesnook-install.sh index 2b4bf545..c457d4bc 100644 --- a/install/notesnook-install.sh +++ b/install/notesnook-install.sh @@ -48,25 +48,10 @@ Restart=on-failure [Install] WantedBy=multi-user.target EOF - -cat </etc/systemd/system/caddy.service -[Unit] -Description=Caddy Service -After=network-online.target notesnook.service -Requires=notesnook.service - -[Service] -Type=simple -User=root -WorkingDirectory=/opt/notesnook -ExecStart=/usr/bin/caddy reverse-proxy --from https://$LOCAL_IP --to localhost:3000 -Restart=on-failure - -[Install] -WantedBy=multi-user.target -EOF +sed -i "s|^ExecStart=.*|ExecStart=/usr/bin/caddy reverse-proxy --from https://$LOCAL_IP --to localhost:3000|" /lib/systemd/system/caddy.service +systemctl daemon-reload +systemctl restart caddy systemctl enable -q --now notesnook -systemctl enable -q --now caddy msg_ok "Created Service" motd_ssh