This commit is contained in:
qiaofeng1227 2024-12-19 12:11:24 +08:00
parent 5ed7455276
commit 967d81ffdf
2 changed files with 20 additions and 13 deletions

View File

@ -68,16 +68,23 @@ force_sync(){
# when websoft9 restart, force sync cockpit port and certs # when websoft9 restart, force sync cockpit port and certs
force_sync force_sync
# monitor cockpit.socket and config.ini, make sure port at config.ins sync to cockpit.socket (
inotifywait -e modify,attrib -m $FILES | while read PATH EVENT FILE; do # monitor cockpit.socket and config.ini, make sure port at config.ins sync to cockpit.socket
echo "Reset cockpit port when config.ini changed" inotifywait -e modify,attrib -m $FILES | while read PATH EVENT FILE; do
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH echo "Reset cockpit port when config.ini changed"
sync_cockpit_port export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
done sync_cockpit_port
done
) &
# monitor cockpit ssl path and sync to NPM ssl path if changed (
inotifywait -e create,modify,delete,attrib -m $cockpit_ssl_path | while read PATH EVENT FILE; do # monitor cockpit ssl path and sync to NPM ssl path if changed
echo "Sync CA files from cockipt to NPM when changed" inotifywait -e create,modify,delete,attrib -m $cockpit_ssl_path | while read PATH EVENT FILE; do
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH echo "Sync CA files from cockipt to NPM when changed"
cp -r "${cockpit_ssl_path}"* $npm_ssl_path export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
done cp -r "${cockpit_ssl_path}"* $npm_ssl_path
done
) &
# Wait for background processes to finish
wait

View File

@ -1,5 +1,5 @@
{ {
"version": "2.1.18-rc4", "version": "2.1.18-rc5",
"plugins": { "plugins": {
"portainer": "0.1.3", "portainer": "0.1.3",
"nginx": "0.1.0", "nginx": "0.1.0",