summarylogtreecommitdiffstats
path: root/taskd.install
diff options
context:
space:
mode:
authorPablo Couto2015-04-23 02:03:50 +0200
committerPablo Couto2015-07-05 01:34:58 +0200
commit4c8f6a003c40cd67c6370ef6d5d0144e80682e1d (patch)
tree1a73d5aa0668c72fc84762bc716e80ccd3be8d79 /taskd.install
parent48bd32f82c85f8c238da37b0fc262e6e8386b78e (diff)
downloadaur-4c8f6a003c40cd67c6370ef6d5d0144e80682e1d.tar.gz
taskd-git PKGBUILD from harleypig/abs@463a8ac
Diffstat (limited to 'taskd.install')
-rw-r--r--taskd.install50
1 files changed, 50 insertions, 0 deletions
diff --git a/taskd.install b/taskd.install
index e69de29bb2d1..34bfdd2ee7ed 100644
--- a/taskd.install
+++ b/taskd.install
@@ -0,0 +1,50 @@
+# See https://github.com/torrancew/arch-taskd/blob/master/taskd.install for
+# possible theiving purposes, especially a way to do a basic config.
+
+pre_install() {
+
+ # add taskd group if it doesn't exist
+ getent group taskd > /dev/null || groupadd -r taskd
+
+ # add taskd user if it doesn't exist
+ getent passwd taskd > /dev/null || \
+ useradd -r -g taskd -s /sbin/nologin \
+ -c "Task Server system user" taskd
+
+ install -o$(id -g taskd) -g$(id -u taskd) -m2770 -d "${pkgdir}/var/lib/taskd"
+
+}
+
+post_install() {
+
+ systemctl preset taskd.service
+
+}
+
+pre_upgrade() {
+
+ pre_install
+
+}
+
+post_upgrade() {
+
+ post_install
+
+}
+
+pre_remove() {
+
+ systemctl --no-reload disable taskd.service
+ systemctl stop taskd.service
+
+}
+
+post_remove() {
+
+ getent passwd taskd > /dev/null && userdel taskd > /dev/null
+ getent group taskd > /dev/null && groupdel taskd > /dev/null
+
+ systemctl daemon-reload
+
+}