I created the following service file for starting/stopping an iptables-script
Code: Select all
[Unit]
Description=Description for sample script goes here
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/etc/fw.sh
TimeoutStartSec=0
ExecStop=/usr/local/etc/openfw.sh
[Install]
WantedBy=default.target
When I comment the ExecStop line "systemctl start fw" starts the fw.sh script
I don't know what I am doing wrong.