summaryrefslogtreecommitdiff
path: root/community/incron/incron.install
blob: 9cb53bbe69003a6c8c6e5ef497c28776a2867ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
post_install () {
  # Check user/group incron exists
  getent group incron > /dev/null || groupadd -r incron
  getent passwd incron > /dev/null || useradd -r -c "Incron system" -g incron -s /bin/false -d /var/spool/incron incron
  # Fix permissions
  chown incron.incron -R /var/spool/incron
}

pre_remove() {
  [ -h /var/service/incron ] && rm /var/service/incron
  userdel incron >& /dev/null
  groupdel incron >& /dev/null
}