summaryrefslogtreecommitdiff
path: root/pcr/postsrsd/postsrsd.install
blob: b8e7f8d5aed108515b8b447e981f470527945def (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
}