From 45c3c601f40ccde43c904940014c836245a04120 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Thu, 7 Feb 2019 14:06:35 -0800 Subject: Initial commit --- icecream.install | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 icecream.install (limited to 'icecream.install') 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 +} -- cgit v1.2.1