Files
Yi Zhao b5b95422e7 postfix: fix generating aliases db files
When generating aliases db files, the newaliases tries to chdir
/var/spool/postfix on the host. It would cause a failure if the host
doesn't install postfix:
newaliases: fatal: chdir /var/spool/postfix: No such file or directory

Move this step from do_install to pkg_postinst to make sure newaliases
and postmap run during the image creation.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2018-02-05 10:40:18 -05:00

17 lines
427 B
Desktop File

[Unit]
Description=Postfix Mail Transport Agent
After=syslog.target network.target
Conflicts=sendmail.service exim.service
[Service]
Type=forking
PIDFile=@LOCALSTATEDIR@/spool/postfix/pid/master.pid
ExecStartPre=-@SBINDIR@/check_hostname.sh
ExecStartPre=-@LIBEXECDIR@/postfix/aliasesdb
ExecStart=@SBINDIR@/postfix start
ExecReload=@SBINDIR@/postfix reload
ExecStop=@SBINDIR@/postfix stop
[Install]
WantedBy=multi-user.target