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/ start ExecStop=/bin/sh /scripts/ stop ExecReload=/bin/sh /scripts/ […]