| 1 |
#!/bin/sh |
| 2 |
# postinst script for bcron. |
| 3 |
# |
| 4 |
# See: dh_installdeb(1). |
| 5 |
|
| 6 |
set -e |
| 7 |
|
| 8 |
CRONTABDIR=/var/spool/cron/crontabs |
| 9 |
|
| 10 |
#DEBHELPER# |
| 11 |
|
| 12 |
case "$1" in |
| 13 |
configure) |
| 14 |
# add acls for user and group cron |
| 15 |
setfacl -m u:cron:rwx $CRONTABDIR |
| 16 |
setfacl -m g:cron:rwx $CRONTABDIR |
| 17 |
for f in $(find $CRONTABDIR -mindepth 1 -maxdepth 1); do |
| 18 |
setfacl -m u:cron:rw $f |
| 19 |
setfacl -m g:cron:rw $f |
| 20 |
done |
| 21 |
;; |
| 22 |
|
| 23 |
abort-upgrade|abort-remove|abort-deconfigure) |
| 24 |
;; |
| 25 |
|
| 26 |
*) |
| 27 |
echo "postinst called with unknown argument '$1'" >&2 |
| 28 |
exit 1 |
| 29 |
;; |
| 30 |
esac |
| 31 |
|
| 32 |
exit 0 |