websoft9/systemd/script/crontab.sh
qiaofeng1227 91d3a13b53 crontab
2023-10-09 16:56:46 +08:00

10 lines
338 B
Bash

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
# monitor /lib/systemd/system/cockpit.socket and config.ini, make sure config.ini port is the same with cockpit.socket
while true; do
inotifywait -e modify /lib/systemd/system/cockpit.socket
# 当文件修改时,执行你需要的操作
done