Systemd with bash script

Posted Leave a commentPosted in Linux, Operating systems, Scripting, Uncategorized

To load my firewall rules I have always used a init script containing all my iptables rules. However with the switch to systemd in Debian Jessie things have changed a bit. create a service file in /etc/systemd/system. In my case this is /etc/systemd/system/firewall.service [Unit] Description=Firewall [Service] Type=oneshot ExecStart=/bin/sh /scripts/firewall.sh start ExecStop=/bin/sh /scripts/firewall.sh stop ExecReload=/bin/sh /scripts/firewall.sh […]

Postfix as backup MX

Posted Leave a commentPosted in Linux, Operating systems

Redundancy is very important these days, specially for a highly used medium such as mail. Luckily you can set up something as a “backup MX”. Normally when person a sends a mail to person b the mail-server will search where to deliver the mail trough DNS (MX record) . When we add multiple MX records […]