Skip to content

Instantly share code, notes, and snippets.

@TimoDJatomika
Last active December 1, 2016 19:26
Show Gist options
  • Save TimoDJatomika/5ac58ba29708a284e7b9cc54fb10b3d4 to your computer and use it in GitHub Desktop.
Save TimoDJatomika/5ac58ba29708a284e7b9cc54fb10b3d4 to your computer and use it in GitHub Desktop.
Put the script into /etc/systemd/system and name it firewall.service
[Unit]
Description=Firewall
[Service]
Type=oneshot
ExecStart=/root/firewall.sh start
ExecStop=/root/firewall.sh stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment