summarylogtreecommitdiffstats
path: root/calendarserver.install
diff options
context:
space:
mode:
Diffstat (limited to 'calendarserver.install')
-rw-r--r--calendarserver.install31
1 files changed, 31 insertions, 0 deletions
diff --git a/calendarserver.install b/calendarserver.install
new file mode 100644
index 000000000000..3931af7f61d5
--- /dev/null
+++ b/calendarserver.install
@@ -0,0 +1,31 @@
+post_install () {
+ echo -n "adding calendarserver system group... "
+ groupadd caldavd && echo -n "done."
+ echo
+
+ echo -n "adding calendarserver system user... "
+ useradd -c "calendarserver daemon" -d /var/spool/caldavd -g caldavd -s /bin/false caldavd && echo -n "done."
+ echo
+
+ passwd -l caldavd &>/dev/null
+
+ for dir in spool run log; do
+ mkdir -p /var/$dir/caldavd
+ chown caldavd:caldavd /var/$dir/caldavd
+ done
+
+ echo ">> You have to remount the filesystem which contains /var with user_xattr"
+ echo ">> Place 'calendarserver' in DAEMONS= in /etc/rc.conf to enable calendarserver on system boot."
+}
+
+post_remove() {
+ echo -n -e "\nremoving caldavd system user... "
+ userdel caldavd && echo "done."
+
+ echo "Not removing tmp and log directories"
+}
+
+op=$1
+shift
+$op $*
+ \ No newline at end of file