~sircmpwn/gmni-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 3

[PATCH] Add systemd service file

Details
Message ID
<A96MO1cCyh6h6I93EOHEhPCzFWJYqwPHQM3RHssEjeo@cp4-web-034.plabs.ch>
DKIM signature
pass
Download raw message
Patch: +27 -0
---
 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
Details
Message ID
<C9GGTWE58TOL.29OZOKTPWLXML@taiga>
In-Reply-To
<A96MO1cCyh6h6I93EOHEhPCzFWJYqwPHQM3RHssEjeo@cp4-web-034.plabs.ch> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
NACK
Details
Message ID
<rCPQl2vIjWmpwyKN0vxfmqx9OWT0VjdRCuLcQmVoCA@cp4-web-027.plabs.ch>
In-Reply-To
<C9GGTWE58TOL.29OZOKTPWLXML@taiga> (view parent)
DKIM signature
pass
Download raw message
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
Details
Message ID
<C9GIAAVTDKNN.24H2UG1JBL3MP@zach-macbookpro121>
In-Reply-To
<rCPQl2vIjWmpwyKN0vxfmqx9OWT0VjdRCuLcQmVoCA@cp4-web-027.plabs.ch> (view parent)
DKIM signature
missing
Download raw message
On Tue Feb 23, 2021 at 12:33 AM EST,  wrote:
> 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/
Details
Message ID
<vklx521CGeaNuxIenejzQs2rtFRCjDhfRyF0vqDKZg@cp4-web-037.plabs.ch>
In-Reply-To
<C9GIAAVTDKNN.24H2UG1JBL3MP@zach-macbookpro121> (view parent)
DKIM signature
pass
Download raw message
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.
Reply to thread Export thread (mbox)