~sircmpwn/gmni-devel

Add systemd service file v1 REJECTED

ReK2: 1
 Add systemd service file

 2 files changed, 27 insertions(+), 0 deletions(-)
I am guessing that means there is no need of a service startup/shutdown
file? thats ok, I did it for my server, and thought maybe giving back
upstream.

Cheers
> I am guessing that means there is no need of a service startup/shutdown
> file?
It just means Drew doesn't want to have to maintain it upstream.
(similar to the rationale for not including a .desktop file: it's not necessary).

It would make more sense to have this type of file in the package repository of a systemd-using distribution.
e.g. This AUR already has a gmnisrv.service file: https://aur.archlinux.org/packages/gmnisrv-git/
oh, that makes total sense, and I had no idea of the AUR package, it
will had saved me some time.. O_o hopefully I can find a way to help
in another way. 
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/gmni-devel/patches/20463/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Add systemd service file Export this patch

---
 Makefile        |  1 +
 gmnisrv.service | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 gmnisrv.service

diff --git a/Makefile b/Makefile
index d1141da..920dafb 100644
--- a/Makefile
+++ b/Makefile
@@ -46,5 +46,6 @@ install: all
	install -Dm644 $(SRCDIR)/config.ini $(DESTDIR)$(SHAREDIR)/gmnisrv/gmnisrv.ini
	install -Dm644 doc/gmnisrv.1 $(DESTDIR)$(MANDIR)/man1/gmnisrv.1
	install -Dm644 doc/gmnisrvini.5 $(DESTDIR)$(MANDIR)/man5/gmnisrv.ini.5
	install -Dm644 $(SRCDIR)/gmnisrv.service /etc/systemd/system/gmnisrv.service

.PHONY: clean distclean docs install
diff --git a/gmnisrv.service b/gmnisrv.service
new file mode 100644
index 0000000..051ef5f
--- /dev/null
+++ b/gmnisrv.service
@@ -0,0 +1,26 @@
# Change Restart, User & Group etc. to your needs..
# Place it in /etc/system/systemd/
# Enable service via systemctl enable gmnisrv
# Check if service started without errors via systemctl status gmnisrv


[Unit]
Description=gmnisrv a gemini server
After=network.target

[Service]
Type=simple
WorkingDirectory=/usr
ExecStart=/usr/bin/gmnisrv
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=gmnisrv
User=root
Group=root
Environment=PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin


[Install]
WantedBy=multi-user.target
-- 
2.30.1
NACK