projects/aports·blob master · refs

20 lines · 537 B

1#!/sbin/openrc-run
2
3description="Postfix SRS Daemon"
4pidfile="/run/postsrsd.pid"
5command="/usr/sbin/postsrsd"
6command_args="-D -C /etc/postsrsd/postsrsd.conf"
7
8stopsig="SIGTERM"
9
10start_pre() {
11 if [ ! -s /etc/postsrsd/postsrsd.secret ]
12 then
13 ebegin "Generating secret"
14 checkpath -Fm 0600 -o postsrsd /etc/postsrsd/postsrsd.secret
15 dd if=/dev/urandom bs=18 count=1 status=none \
16 | base64 >/etc/postsrsd/postsrsd.secret
17
18 eend $?
19 fi
20}