summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Jobin2015-11-17 22:01:59 -0500
committerMathieu Jobin2015-11-17 22:01:59 -0500
commit41358b8c1e5124d1f439b19f7ad47330afab4de6 (patch)
tree827d020704a05a7723f7a14708079a9f97d9f33b
parent526999382c99b6b8c782cde56f9f786e672cd9ef (diff)
downloadaur-41358b8c1e5124d1f439b19f7ad47330afab4de6.tar.gz
added systemd service
-rw-r--r--PKGBUILD19
1 files changed, 19 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3a79df4f860..d5af995a8d8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -69,5 +69,24 @@ package() {
#sudo pacman -S restartd
#echo 'netvirt-agent \"netvirt-agent\" \"sleep 20 && su - \$USER -c netvirt-agent &\" \"\"' | sudo tee -a /etc/restartd.conf
#" > ${pkgdir}/usr/bin/netvirt-daemonize
+
+ # ArchLinux uses SystemD, Yeah
+ cat << EOF > ${pkgdir}/usr/lib/systemd/system/netvirt-agent.service
+[Unit]
+Description=Netvirt Agent
+After=network.target
+
+[Service]
+Environment="HOME=/root"
+ExecStart=/usr/bin/netvirt-agent
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+
+EOF
+
}