about summary refs log tree commit diff
path: root/arch
diff options
context:
space:
mode:
authorVincent Ambo <dev@tazj.in>2014-03-11T18·32+0100
committerVincent Ambo <dev@tazj.in>2014-03-11T18·32+0100
commit3a004b49d8e84895d936f3898972a3cf301f6dd2 (patch)
treeec5943368ea3b3caea2c7ee6f173a98e11098e08 /arch
parentd969c6ffc70db8aefa7206e4c10d16f932422792 (diff)
Added systemd service file
Diffstat (limited to 'arch')
-rw-r--r--arch/PKGBUILD6
-rw-r--r--arch/tazblog@.service11
2 files changed, 17 insertions, 0 deletions
diff --git a/arch/PKGBUILD b/arch/PKGBUILD
index 23dc6e516405..ae06220137c2 100644
--- a/arch/PKGBUILD
+++ b/arch/PKGBUILD
@@ -24,9 +24,15 @@ package() {
   cd "$srcdir"
   cd tazjin-*
 
+  # Install blog itself
   install -d "${pkgdir}/usr/bin"
   install -m755 dist/build/tazblog/tazblog "${pkgdir}/usr/bin/tazblog"
 
+  # Install resources
   install -d "${pkgdir}/usr/share/tazblog"
   cp -r res/ "${pkgdir}/usr/share/tazblog"
+
+  # Install service file
+  install -d "${pkgdir}/usr/lib/systemd/system"
+  cp "arch/tazblog@.service" "${pkgdir}/usr/lib/systemd/system/"
 }
diff --git a/arch/tazblog@.service b/arch/tazblog@.service
new file mode 100644
index 000000000000..2b6f115eb510
--- /dev/null
+++ b/arch/tazblog@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=tazblog web process
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/tazblog
+Restart=always
+User=%i
+
+[Install]
+WantedBy=multi-user.target