diff --git a/systemdConfs/common/checkPort.service b/systemdConfs/common/checkPort.service new file mode 100644 index 0000000..96e3a9e --- /dev/null +++ b/systemdConfs/common/checkPort.service @@ -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 diff --git a/systemdConfs/common/checkPort.timer b/systemdConfs/common/checkPort.timer new file mode 100644 index 0000000..38bcd89 --- /dev/null +++ b/systemdConfs/common/checkPort.timer @@ -0,0 +1,9 @@ +[Unit] +Description=checkPort mins run + +[Timer] +OnCalendar=*:0/3 +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/zhongtieSystemdConfs/10-81-15-20/checkService.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-20/checkService.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-20/checkService.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-20/checkService.service diff --git a/zhongtieSystemdConfs/10-81-15-20/kkFileView.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-20/kkFileView.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-20/kkFileView.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-20/kkFileView.service diff --git a/zhongtieSystemdConfs/10-81-15-20/ossUpgrade.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-20/ossUpgrade.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-20/ossUpgrade.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-20/ossUpgrade.service diff --git a/zhongtieSystemdConfs/10-81-15-20/ztsjxxxt.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-20/ztsjxxxt.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-20/ztsjxxxt.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-20/ztsjxxxt.service diff --git a/zhongtieSystemdConfs/10-81-15-22/checkService.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-22/checkService.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-22/checkService.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-22/checkService.service diff --git a/zhongtieSystemdConfs/10-81-15-22/dataCenter.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-22/dataCenter.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-22/dataCenter.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-22/dataCenter.service diff --git a/zhongtieSystemdConfs/10-81-15-22/dataCenterBase.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-22/dataCenterBase.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-22/dataCenterBase.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-22/dataCenterBase.service diff --git a/zhongtieSystemdConfs/10-81-15-22/ossUpgrade.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-22/ossUpgrade.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-22/ossUpgrade.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-22/ossUpgrade.service diff --git a/zhongtieSystemdConfs/10-81-15-23/checkService.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-23/checkService.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-23/checkService.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-23/checkService.service diff --git a/zhongtieSystemdConfs/10-81-15-23/dataCenter.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-23/dataCenter.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-23/dataCenter.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-23/dataCenter.service diff --git a/zhongtieSystemdConfs/10-81-15-23/ossUpgrade.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-23/ossUpgrade.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-23/ossUpgrade.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-23/ossUpgrade.service diff --git a/zhongtieSystemdConfs/10-81-15-24/backupDB.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-24/backupDB.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-24/backupDB.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-24/backupDB.service diff --git a/zhongtieSystemdConfs/10-81-15-24/backupDB.timer b/systemdConfs/zhongtieSystemdConfs/10-81-15-24/backupDB.timer similarity index 100% rename from zhongtieSystemdConfs/10-81-15-24/backupDB.timer rename to systemdConfs/zhongtieSystemdConfs/10-81-15-24/backupDB.timer diff --git a/zhongtieSystemdConfs/10-81-15-25/checkService.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-25/checkService.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-25/checkService.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-25/checkService.service diff --git a/zhongtieSystemdConfs/10-81-15-25/investigate.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-25/investigate.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-25/investigate.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-25/investigate.service diff --git a/zhongtieSystemdConfs/10-81-15-25/ossUpgrade.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-25/ossUpgrade.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-25/ossUpgrade.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-25/ossUpgrade.service diff --git a/zhongtieSystemdConfs/10-81-15-28/backUpDB.service b/systemdConfs/zhongtieSystemdConfs/10-81-15-28/backUpDB.service similarity index 100% rename from zhongtieSystemdConfs/10-81-15-28/backUpDB.service rename to systemdConfs/zhongtieSystemdConfs/10-81-15-28/backUpDB.service