[Exherbo-dev] [PATCH] Add EnvironmentFile support to pass options for git-daemon. Add git inetd systemd-service

Vasiliy G Tosltov v.tolstov at selfip.ru
Sat Mar 5 08:55:17 GMT 2011


---
 .../dev-scm/git/files/systemd/git-daemon.service   |    4 +++-
 .../dev-scm/git/files/systemd/git-daemon.socket    |   14 ++++++++++++++
 .../dev-scm/git/files/systemd/git-daemon at .service  |   16 ++++++++++++++++
 3 files changed, 33 insertions(+), 1 deletions(-)
 create mode 100644 packages/dev-scm/git/files/systemd/git-daemon.socket
 create mode 100644 packages/dev-scm/git/files/systemd/git-daemon at .service

diff --git a/packages/dev-scm/git/files/systemd/git-daemon.service b/packages/dev-scm/git/files/systemd/git-daemon.service
index b98f61e..cdc3e39 100644
--- a/packages/dev-scm/git/files/systemd/git-daemon.service
+++ b/packages/dev-scm/git/files/systemd/git-daemon.service
@@ -6,7 +6,9 @@ Description=git daemon
 After=syslog.target
 
 [Service]
-ExecStart=/usr/bin/git daemon --pid-file=/var/run/git-daemon.pid --user=nobody --group=nobody --syslog /var/git
+EnvironmentFile=/etc/conf.d/git-daemon.conf
+PIDFile=/var/run/git-daemon.pid
+ExecStart=/usr/bin/git daemon --pid-file=/var/run/git-daemon.pid --syslog --user=nobody --group=nobody $GIT_OPTS
 
 [Install]
 WantedBy=multi-user.target
diff --git a/packages/dev-scm/git/files/systemd/git-daemon.socket b/packages/dev-scm/git/files/systemd/git-daemon.socket
new file mode 100644
index 0000000..a3998d8
--- /dev/null
+++ b/packages/dev-scm/git/files/systemd/git-daemon.socket
@@ -0,0 +1,14 @@
+# Copyright 2010-2011 Wulf C. Krueger <philantrop at exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+[Unit]
+Description=git daemon activation socket
+Conflicts=git-daemon.service
+After=syslog.target
+
+[Socket]
+ListenStream=9418
+Accept=Yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/packages/dev-scm/git/files/systemd/git-daemon at .service b/packages/dev-scm/git/files/systemd/git-daemon at .service
new file mode 100644
index 0000000..069c186
--- /dev/null
+++ b/packages/dev-scm/git/files/systemd/git-daemon at .service
@@ -0,0 +1,16 @@
+# Copyright 2010-2011 Wulf C. Krueger <philantrop at exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+[Unit]
+Description=git daemon Per-connection server
+After=syslog.target
+
+[Service]
+User=nobody
+Group=nobody
+EnvironmentFile=/etc/conf.d/git-daemon.conf
+PIDFile=/var/run/git-daemon.pid
+ExecStart=/usr/bin/git daemon --pid-file=/var/run/git-daemon.pid --inetd $GIT_OPTS
+
+[Install]
+WantedBy=multi-user.target
-- 
1.7.4.1




More information about the Exherbo-dev mailing list