mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-25 02:38:42 +08:00
10 lines
338 B
Bash
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
|
|
|