checkPort

This commit is contained in:
zhangkun 2024-02-06 11:34:12 +08:00
parent 27ee15522b
commit 5d00332616
19 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,20 @@
[Unit]
Description=restartPort
After=network.target auditd.service
[Service]
Type=simple
User=root
Group=root
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=checkPort
SyslogFacility=local0
ExecStartPre=/bin/bash -c "/home/ubuntu/data/shell/autoDeploy/checkPort.sh localhost 53 'systemctl restart dnsmasq.service'"
ExecStart=/bin/bash -c "echo 'checkPort done'"
Restart=on-failure
RestartSec=300
TimeoutSec=255
RestartPreventExitStatus=255

View File

@ -0,0 +1,9 @@
[Unit]
Description=checkPort mins run
[Timer]
OnCalendar=*:0/3
Persistent=true
[Install]
WantedBy=timers.target