diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-10-18 14:51:39 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-10-18 14:51:39 -0400 |
commit | 883ac3063f6005c4c7ab481a77e7064a97c5cd28 (patch) | |
tree | bffe325fd9aa4ba1d31f17a070e25ce7e4086bd9 | |
parent | a2bdcb74d46c3b1002df03365330772a049c5173 (diff) | |
download | keysafe-883ac3063f6005c4c7ab481a77e7064a97c5cd28.tar.gz |
/etc/default/keysafe is read by both the systemd service file and the init script, and contains configuration for the keysafe server.
This commit was sponsored by Ole-Morten Duesund on Patreon.
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | keysafe.cabal | 1 | ||||
-rw-r--r-- | keysafe.default | 2 | ||||
-rw-r--r-- | keysafe.service | 4 |
5 files changed, 12 insertions, 3 deletions
@@ -5,6 +5,8 @@ keysafe (0.20161007) UNRELEASED; urgency=medium * Added a LSB init script, for non-systemd systems. (It currently uses Debian's start-stop-daemon, so would need porting for other distributions.) + * /etc/default/keysafe is read by both the systemd service file and the + init script, and contains configuration for the keysafe server. -- Joey Hess <id@joeyh.name> Thu, 06 Oct 2016 16:48:57 -0400 @@ -30,9 +30,11 @@ install-files: keysafe install -m 0644 keysafe.1 $(PREFIX)/usr/share/man/man1/keysafe.1 install -d $(PREFIX)/lib/systemd/system install -m 0644 keysafe.service $(PREFIX)/lib/systemd/system/keysafe.service - install -d $(PREFIX)/usr/share/applications/ - install -m 0644 keysafe.desktop $(PREFIX)/usr/share/applications/keysafe.desktop install -d $(PREFIX)/etc/init.d install -m 0755 keysafe.init $(PREFIX)/etc/init.d/keysafe + install -d $(PREFIX)/etc/default + install -m 0755 keysafe.default $(PREFIX)/etc/default/keysafe + install -d $(PREFIX)/usr/share/applications/ + install -m 0644 keysafe.desktop $(PREFIX)/usr/share/applications/keysafe.desktop install -d $(PREFIX)/etc/xdg/autostart/ install -m 0644 keysafe.autostart $(PREFIX)/etc/xdg/autostart/keysafe.desktop diff --git a/keysafe.cabal b/keysafe.cabal index 2d2257d..16e4765 100644 --- a/keysafe.cabal +++ b/keysafe.cabal @@ -24,6 +24,7 @@ Extra-Source-Files: keysafe.1 keysafe.service keysafe.init + keysafe.default keysafe.desktop keysafe.autostart Makefile diff --git a/keysafe.default b/keysafe.default new file mode 100644 index 0000000..1600d0a --- /dev/null +++ b/keysafe.default @@ -0,0 +1,2 @@ +# Parameters to pass to keysafe when it's started as a daemon. +DAEMON_PARAMS="--port 4242 --store-directory=/var/lib/keysafe/" diff --git a/keysafe.service b/keysafe.service index 31fa424..895fbcf 100644 --- a/keysafe.service +++ b/keysafe.service @@ -2,7 +2,9 @@ Description=keysafe server [Service] -ExecStart=/usr/bin/keysafe --server --port 4242 --store-directory=/var/lib/keysafe/ +Environment='DAEMON_PARAMS=--port 4242 --store-directory=/var/lib/keysafe/' +EnvironmentFile=-/etc/default/keysafe +ExecStart=/usr/bin/keysafe --server $DAEMON_PARAMS InaccessiblePaths=/home /etc ReadWritePaths=/var/lib/keysafe User=keysafe |