Код: Выделить всё
[Unit]
Description=Autorun
[Service]
ExecStart=/root/autorun.sh
#Restart=always
[Install]
WantedBy=multi-user.target
Код: Выделить всё
#!/bin/bash
iptables-restore < /etc/iptables
exit 0
sudo systemctl enable autorun1
Код: Выделить всё
[Unit]
Description=Autorun
[Service]
ExecStart=/root/autorun.sh
#Restart=always
[Install]
WantedBy=multi-user.target
Код: Выделить всё
#!/bin/bash
iptables-restore < /etc/iptables
exit 0
Код: Выделить всё
systemctl list-units --type=service --state=running
Код: Выделить всё
pgrep -l процесс
Код: Выделить всё
ps aux | grep процесс
Код: Выделить всё
sudo kill -9 pid