Страница 1 из 1

автозапуск autorun1

Добавлено: 06 янв 2025, 12:04
ya
/etc/systemd/system/autorun1.service

Код: Выделить всё

[Unit]
Description=Autorun

[Service]
ExecStart=/root/autorun.sh
#Restart=always

[Install]
WantedBy=multi-user.target
/root/autorun.sh

Код: Выделить всё

#!/bin/bash

iptables-restore < /etc/iptables

exit 0
sudo systemctl daemon-reload
sudo systemctl enable autorun1

Re: автозапуск autorun1

Добавлено: 30 мар 2025, 23:11
ya
Список запущенных процессов:

Код: Выделить всё

systemctl list-units --type=service --state=running

Код: Выделить всё

pgrep -l процесс

Код: Выделить всё

ps aux | grep процесс
Убить процесс

Код: Выделить всё

sudo kill -9 pid