systemd ExecStop

General support questions
Post Reply
hopesfall
Posts: 2
Joined: 2018/01/16 21:11:06

systemd ExecStop

Post by hopesfall » 2018/01/16 21:19:19

Hi there,

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
This service file does not run the ExecStart script when I run "systemctl start fw"
When I comment the ExecStop line "systemctl start fw" starts the fw.sh script
I don't know what I am doing wrong.

Post Reply