[28615] in Source-Commits
pyhesiodfs commit [debian]: Provide a native systemd unit file
daemon@ATHENA.MIT.EDU (Lizhou Sha)
Sat Jun 18 01:20:45 2016
Date: Sat, 18 Jun 2016 01:20:40 -0400
From: Lizhou Sha <slz@mit.edu>
Message-Id: <201606180520.u5I5KeoD006713@drugstore.mit.edu>
To: source-commits@mit.edu
https://github.com/mit-athena/pyhesiodfs/commit/8f47bf819ab9d43609f6dd505bffc1864710a95b
commit 8f47bf819ab9d43609f6dd505bffc1864710a95b
Author: Lizhou Sha <slz@mit.edu>
Date: Wed May 13 02:00:24 2015 -0400
Provide a native systemd unit file
- Add a systemd unit file, translated from the sysvinit script.
(Trac: #962)
- Add Build-Depends on dh_systemd.
- Add a systemd tmpfile to create /mit on demand.
debian/changelog | 8 ++++++++
debian/control | 2 +-
debian/debathena-pyhesiodfs.service | 17 +++++++++++++++++
debian/debathena-pyhesiodfs.tmpfile | 1 +
4 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 0433898..bfe9873 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debathena-pyhesiodfs (1.1-0debathena4) unstable; urgency=low
+
+ * Add a systemd unit file, translated from the sysvinit script. (Trac: #962)
+ * Add Build-Depends on dh_systemd.
+ * Add a systemd tmpfile to create /mit on demand.
+
+ -- Lizhou Sha <slz@mit.edu> Sat, 18 Jun 2016 00:46:17 -0400
+
debathena-pyhesiodfs (1.1-0debathena3) unstable; urgency=low
* debian/debathena-pyhesiodfs.postinst: Add user pyhesiodfs to group fuse
diff --git a/debian/control b/debian/control
index 020a455..1fb8fa9 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: debathena-pyhesiodfs
Section: debathena/net
Priority: extra
Maintainer: Debathena Project <debathena@mit.edu>
-Build-Depends: cdbs, debhelper, config-package-dev, python-support, python (>= 2.6~)
+Build-Depends: cdbs, debhelper, dh-systemd (>= 1.5) | cdbs (<< 0.4.122~), config-package-dev, python-support, python (>= 2.6~)
Standards-Version: 3.9.3
Package: debathena-pyhesiodfs
diff --git a/debian/debathena-pyhesiodfs.service b/debian/debathena-pyhesiodfs.service
new file mode 100644
index 0000000..6ed9cda
--- /dev/null
+++ b/debian/debathena-pyhesiodfs.service
@@ -0,0 +1,17 @@
+# Author: Lizhou Sha <slz@mit.edu>
+# This file is part of the debathena-pyhesiodfs package.
+
+[Unit]
+Description=Hesiod automounter for Athena lockers
+After=local-fs.target network.target systemd-tmpfiles-setup.service
+Before=remote-fs.target
+
+[Service]
+Type=simple
+Environment="pyhesiodfs_dir=/mit"
+OOMScoreAdjust=-1000
+User=pyhesiodfs
+ExecStart=/usr/bin/pyhesiodfs -f ${pyhesiodfs_dir} -o nonempty
+
+[Install]
+WantedBy=multi-user.target remote-fs.target
diff --git a/debian/debathena-pyhesiodfs.tmpfile b/debian/debathena-pyhesiodfs.tmpfile
new file mode 100644
index 0000000..bb1da42
--- /dev/null
+++ b/debian/debathena-pyhesiodfs.tmpfile
@@ -0,0 +1 @@
+d /mit 0770 root pyhesiodfs