summarylogtreecommitdiffstats
path: root/icecream.install
diff options
context:
space:
mode:
authorBen Widawsky2015-06-11 18:14:23 -0700
committerBen Widawsky2015-06-11 18:14:41 -0700
commit1e04d1482bf63d555ecc060532013bd27bfd9651 (patch)
tree0071e9fe3ff6ebce698985774e77ca6e9fcaa3e2 /icecream.install
downloadaur-1e04d1482bf63d555ecc060532013bd27bfd9651.tar.gz
Initial import
Diffstat (limited to 'icecream.install')
-rw-r--r--icecream.install18
1 files changed, 18 insertions, 0 deletions
diff --git a/icecream.install b/icecream.install
new file mode 100644
index 000000000000..b2c5b4b54615
--- /dev/null
+++ b/icecream.install
@@ -0,0 +1,18 @@
+post_install() {
+ getent group icecc &>/dev/null || groupadd -r icecc >/dev/null
+ getent passwd icecc &>/dev/null || useradd -r -g icecc -s /bin/false -c "Icecream Daemon" -d /var/cache/icecream icecc 2>/dev/null
+ mkdir -p /var/cache/icecream
+ touch /var/log/icecc_scheduler
+ touch /var/log/iceccd
+ chown -R icecc:icecc /var/cache/icecream /var/log/icecc_scheduler /var/log/iceccd
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ getent passwd icecc &>/dev/null && userdel icecc >/dev/null
+ getent group icecc &>/dev/null && groupdel icecc >/dev/null
+ true
+}