Commit 8dba27bc authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Added systemd unit file

parent 4318a6ae
all: all: postfix-service
rm /etc/passwd rm /etc/passwd
mv -v /data/etc/passwd /etc/passwd mv -v /data/etc/passwd /etc/passwd
rm /etc/group rm /etc/group
...@@ -27,4 +27,24 @@ all: ...@@ -27,4 +27,24 @@ all:
$(MAKE) -C postfix-3.5.4 CCARGS="-DUSE_TLS -I/usr/include/openssl/ -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DHAS_LDAP" AUXLIBS="-lssl -lcrypto -lsasl2 -lldap -llber" makefiles $(MAKE) -C postfix-3.5.4 CCARGS="-DUSE_TLS -I/usr/include/openssl/ -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DHAS_LDAP" AUXLIBS="-lssl -lcrypto -lsasl2 -lldap -llber" makefiles
$(MAKE) -C postfix-3.5.4 $(MAKE) -C postfix-3.5.4
cd postfix-3.5.4 && sh postfix-install -non-interactive daemon_directory=/usr/lib/postfix manpage_directory=/usr/share/man html_directory=/usr/share/doc/postfix-3.5.4/html readme_directory=/usr/share/doc/postfix-3.5.4/readme cd postfix-3.5.4 && sh postfix-install -non-interactive daemon_directory=/usr/lib/postfix manpage_directory=/usr/share/man html_directory=/usr/share/doc/postfix-3.5.4/html readme_directory=/usr/share/doc/postfix-3.5.4/readme
@echo "$$POSTFIX_SERVICE" > /lib/systemd/system/postfix.service
systemctl enable postfix.service
rm -rf postfix-3.5.4 rm -rf postfix-3.5.4
postfix-service:
define POSTFIX_SERVICE
[Unit]
Description=Postfix Mail Transport Agent
After=network.target
[Service]
Type=forking
PIDFile=/var/spool/postfix/pid/master.pid
ExecStart=/usr/sbin/postfix start
ExecStop=/usr/sbin/postfix stop
ExecReload=/usr/sbin/postfix reload
Restart=always
[Install]
WantedBy=multi-user.target
export POSTFIX_SERVICE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment