From de632f9ab72c590538a2f4193f7e40e4f58e5657 Mon Sep 17 00:00:00 2001 From: Pierre Dubouilh Date: Sun, 7 Nov 2021 20:21:20 +0100 Subject: [PATCH] add service example --- support/readme.md | 18 +++++++++++++++++- support/service | 9 +++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 support/service diff --git a/support/readme.md b/support/readme.md index 3aa348e..3c7d90c 100644 --- a/support/readme.md +++ b/support/readme.md @@ -1,4 +1,20 @@ -## docker +## run as a service + +use the `service` file provided here to use as a systemd service. + +```sh +# edit service file + +# copy over our service, and start. Notice no sudo with systemctl command ! +% mkdir -p ~/.config/systemd/user/ +% cp service ~/.config/systemd/user/gossa.service +% systemctl --user start gossa + +# enable at boot time +% systemctl --user start gossa +``` + +## run with docker the master branch is automatically built and pushed to [dockerhub](https://hub.docker.com/r/pldubouilh/gossa) under `pldubouilh/gossa`. diff --git a/support/service b/support/service new file mode 100644 index 0000000..2000262 --- /dev/null +++ b/support/service @@ -0,0 +1,9 @@ +[Unit] +Description=Gossa service for mytestfolder + +# note: its better to use absolute paths here +[Service] +ExecStart=gossa /home/joe/mytestfolder + +[Install] +WantedBy=multi-user.target \ No newline at end of file