From 4ff4b904909f7203541b6b546edf4382b4c0b8ef Mon Sep 17 00:00:00 2001 From: Willi Junga Date: Sat, 26 Oct 2024 15:48:40 +0200 Subject: [PATCH] package installer includes service now --- package-debian.sh | 13 +++++++------ wkd.service | 12 ++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 wkd.service diff --git a/package-debian.sh b/package-debian.sh index d931844..51c2f00 100644 --- a/package-debian.sh +++ b/package-debian.sh @@ -1,8 +1,9 @@ #!/bin/sh -mkdir wkd -cp entrypoint.sh wkd -cp example.config.toml wkd/config.toml -cp -R assets wkd/assets -cp simple-wkd-executable wkd/wkd +mkdir /srv/wkd +#cp entrypoint.sh /srv/wkd +cp example.config.toml /srv/wkd/config.toml +cp -R assets /srv/wkd/assets +cp simple-wkd-executable /srv/wkd/wkd +cp wkd.service /etc/systemd/system/wkd.service useradd --no-create-home wkd -chown -R wkd:wkd wkd +chown -R wkd:wkd /srv/wkd diff --git a/wkd.service b/wkd.service new file mode 100644 index 0000000..e9daddf --- /dev/null +++ b/wkd.service @@ -0,0 +1,12 @@ +[Unit] +Description=WKD Service +After=network.target + +[Service] +User=wkd +ExecStart=/srv/wkd/wkd +Restart=always +WorkingDirectory=/srv/wkd + +[Install] +WantedBy=multi-user.target