summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG2
-rw-r--r--Makefile6
-rw-r--r--keysafe.cabal1
-rw-r--r--keysafe.default2
-rw-r--r--keysafe.service4
5 files changed, 12 insertions, 3 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 00c5a26..632f023 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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
diff --git a/Makefile b/Makefile
index 32bc244..dfcde77 100644
--- a/Makefile
+++ b/Makefile
@@ -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