summaryrefslogtreecommitdiff
path: root/pcr/postsrsd/postsrsd.install
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-07-28 10:11:49 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-07-28 10:11:49 -0300
commitc032b26d1935f3239fd56bc0cc23fadc35a6c138 (patch)
tree155359aac500dc69ed06e864fbcf5aedc7e9e951 /pcr/postsrsd/postsrsd.install
parent6740bfa28d86a8ea5d2f051c0c215156c3914e6e (diff)
postsrsd
Diffstat (limited to 'pcr/postsrsd/postsrsd.install')
-rw-r--r--pcr/postsrsd/postsrsd.install15
1 files changed, 15 insertions, 0 deletions
diff --git a/pcr/postsrsd/postsrsd.install b/pcr/postsrsd/postsrsd.install
new file mode 100644
index 000000000..b8e7f8d5a
--- /dev/null
+++ b/pcr/postsrsd/postsrsd.install
@@ -0,0 +1,15 @@
+post_install() {
+ useradd -r -g mail -d / postsrsd
+ chown -R postsrsd:root etc/postsrsd
+
+ [ -e /etc/postsrsd/postsrsd.secret ] || dd if=/dev/urandom bs=18 count=1 status=none | base64 > /etc/postsrsd/postsrsd.secret
+ chown postsrsd:root /etc/postsrsd/postsrsd.secret
+ chmod 400 /etc/postsrsd/postsrsd.secret
+ cat << _EOF
+Don't forget to set your domainname in /etc/postsrsd/postsrsd.conf
+_EOF
+}
+
+post_remove() {
+ userdel postsrsd
+}