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 […]