diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2024-03-12 06:07:07 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2024-03-12 06:08:54 -0700 |
commit | dd64f64db665840b35cd980291f1c14711ac42d2 (patch) | |
tree | 1498a05fa0e9acd659dba3136d0b093686fdbfeb /systemd | |
parent | Revision bump. (diff) | |
download | fifo-cronolog-dd64f64db665840b35cd980291f1c14711ac42d2.tar.gz fifo-cronolog-dd64f64db665840b35cd980291f1c14711ac42d2.tar.bz2 fifo-cronolog-dd64f64db665840b35cd980291f1c14711ac42d2.zip |
feat: systemd supportv1.2.0
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/README.md | 4 | ||||
-rw-r--r-- | systemd/fifo-cronolog@.service | 10 | ||||
-rw-r--r-- | systemd/fifo-cronolog@example.service.env | 4 |
3 files changed, 18 insertions, 0 deletions
diff --git a/systemd/README.md b/systemd/README.md new file mode 100644 index 0000000..1d88021 --- /dev/null +++ b/systemd/README.md @@ -0,0 +1,4 @@ +1. Put env into `/etc/systemd-env/`, using the entire name of the unit, with instance suffix, and an extra `.env`, + e.g. `/etc/systemd-env/fifo-cronolog@example.service.env` +2. `systemctl enable fifo-cronolog@example` +3. Use systemd overrides if you need to add dependencies. diff --git a/systemd/fifo-cronolog@.service b/systemd/fifo-cronolog@.service new file mode 100644 index 0000000..0ab0962 --- /dev/null +++ b/systemd/fifo-cronolog@.service @@ -0,0 +1,10 @@ +[Unit] +Description=fifo-cronolog.%i +[Service] +Type=forking +EnvironmentFile=/etc/systemd-env/%n.env +PIDFile=/run/%N.pid +ExecStartPre=/usr/sbin/fifo-cronolog-setup $FIFO $FIFO_OWNER $FIFO_PERMS +ExecStart=/usr/sbin/fifo-cronolog /run/%N.pid $FIFO $LOGS +[Install] +WantedBy=multi-user.target diff --git a/systemd/fifo-cronolog@example.service.env b/systemd/fifo-cronolog@example.service.env new file mode 100644 index 0000000..370d157 --- /dev/null +++ b/systemd/fifo-cronolog@example.service.env @@ -0,0 +1,4 @@ +FIFO="/tmp/example.fifo" +FIFO_OWNER="somebody:somegroup" +FIFO_PERMS="0600" +LOGS="/var/log/example/%Y%m%d.log" |