Skip to content

Instantly share code, notes, and snippets.

@TimoDJatomika
Created December 24, 2018 09:16
Show Gist options
  • Save TimoDJatomika/d34140c83c5c52a0e08a45d38056ddb3 to your computer and use it in GitHub Desktop.
Save TimoDJatomika/d34140c83c5c52a0e08a45d38056ddb3 to your computer and use it in GitHub Desktop.

Revisions

  1. TimoDJatomika created this gist Dec 24, 2018.
    14 changes: 14 additions & 0 deletions firewall.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    # place the file @ /etc/systemd/system/firewall.service
    # autostart the firewall with systemctl enable firewall

    [Unit]
    Description=Firewall

    [Service]
    Type=oneshot
    ExecStart=/root/firewall.sh start
    ExecStop=/root/firewall.sh stop
    RemainAfterExit=yes

    [Install]
    WantedBy=multi-user.target