[gogoc] Add startup options via environment variable in service unit file

Juan Orti jorti at fedoraproject.org
Tue May 28 11:36:41 UTC 2013


commit 1b9726fbec4ba51b954f5d6330b2bf0a689b6b5e
Author: Juan Orti Alcaine <jorti at fedoraproject.org>
Date:   Tue May 28 13:36:26 2013 +0200

    Add startup options via environment variable in service unit file

 gogoc.service |   11 +++++++----
 gogoc.spec    |    5 ++++-
 2 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/gogoc.service b/gogoc.service
index fa963ab..3d4eb3a 100644
--- a/gogoc.service
+++ b/gogoc.service
@@ -1,6 +1,9 @@
-# To modify this unit, copy it to /etc/systemd/system and edit there.
-# This way you can add "-y" to the startup options and accept
-# the server keys automatically
+# To accept the server keys automatically, create the file
+# /etc/systemd/system/gogoc.service with this content:
+#
+# .include /usr/lib/systemd/system/gogoc.service
+# [Service]
+# Environment="GOGOC_OPTS=-y"
 
 [Unit]
 Description=Freenet6.net tunnel client to IPv6
@@ -10,7 +13,7 @@ Documentation=man:gogoc(8) man:gogoc.conf(5)
 [Service]
 WorkingDirectory=/var/lib/gogoc
 Type=simple
-ExecStart=/usr/bin/gogoc -f /etc/gogoc/gogoc.conf
+ExecStart=/usr/bin/gogoc -f /etc/gogoc/gogoc.conf $GOGOC_OPTS
 KillSignal=SIGHUP
 KillMode=process
 PrivateTmp=true
diff --git a/gogoc.spec b/gogoc.spec
index 42afd17..ae1c126 100644
--- a/gogoc.spec
+++ b/gogoc.spec
@@ -3,7 +3,7 @@
 
 Name:           gogoc
 Version:        1.2
-Release:        24%{?dist}
+Release:        25%{?dist}
 Summary:        IPv6 TSP client for gogo6
 
 Group:          System Environment/Daemons
@@ -116,6 +116,9 @@ fi
 %{_unitdir}/%{name}.service
 
 %changelog
+* Tue May 28 2013 Juan Orti Alcaine <jorti at fedoraproject.org> - 1.2-25
+- Add startup options via environment variable in service unit file
+
 * Thu Apr 25 2013 Juan Orti Alcaine <j.orti.alcaine at gmail.com> - 1.2-24
 - Fix PIE compilation. Closes bug #955282
 


More information about the scm-commits mailing list