[Unit]
Description=Packet Filtering Framework
Before=network-pre.target
Wants=network-pre.target
[Service]
Type=oneshot
ExecStart=/usr/bin/iptables-restore /etc/iptables/iptables.rules
ExecReload=/usr/bin/iptables-restore /etc/iptables/iptables.rules
ExecStop=/usr/lib/systemd/scripts/iptables-flush
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
[Unit]
Description=My Companies API
Before=network-pre.target
Wants=network-pre.target
[Service]
Environment=PORT=22434
ExecStart=/usr/bin/node /srv/api/server.js
Restart=on-failure
[Install]
WantedBy=multi-user.target
[Unit]
Description=My Companies API
Before=network-pre.target
Wants=network-pre.target
[Service]
Environment=PORT=%i
ExecStart=/usr/bin/node /srv/api/server.js
Restart=on-failure
[Install]
WantedBy=multi-user.target