summaryrefslogtreecommitdiff
path: root/icecream.install
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2019-02-07 14:06:35 -0800
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2019-02-07 14:06:35 -0800
commit45c3c601f40ccde43c904940014c836245a04120 (patch)
treef1227dd2e823f3b94e428f182140377f4821ac4b /icecream.install
downloadicecream-45c3c601f40ccde43c904940014c836245a04120.tar.xz
Initial commit
Diffstat (limited to 'icecream.install')
-rw-r--r--icecream.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/icecream.install b/icecream.install
new file mode 100644
index 0000000..41da5a2
--- /dev/null
+++ b/icecream.install
@@ -0,0 +1,20 @@
+post_install() {
+ getent group icecream &>/dev/null || groupadd -r icecream >/dev/null
+ getent passwd icecream &>/dev/null || useradd -r -g icecream -s /bin/false \
+ -c "Icecream Daemon" -d /var/cache/icecream icecream 2>/dev/null
+ mkdir -p /var/cache/icecream
+ mkdir -p /var/log/icecream
+ touch /var/log/icecream/scheduler
+ touch /var/log/icecream/iceccd
+ chown -R icecream:icecream /var/cache/icecream /var/log/icecream/scheduler /var/log/icecream/iceccd
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ getent passwd icecream &>/dev/null && userdel icecream >/dev/null
+ getent group icecream &>/dev/null && groupdel icecream >/dev/null
+ true
+}