Ajout d'une condition pour ne regarder que l'ID VM sur les fichiers *.qmp
This commit is contained in:
parent
f7dc615dd4
commit
ea9bc1c03c
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
inotifywait -q -m --format '%f' /run/qemu-server/ | while read -r vm; do
|
inotifywait -q -m --format '%f' /run/qemu-server/ | while read -r vm; do
|
||||||
# Only act if the line is not empty
|
# Only act if the line is not empty
|
||||||
if [ ${vm} ]; then
|
if [ ${vm} ] && [ "$(echo ${vm} | sed -E 's/[0-9]{3}(\..*)/\1/')" = ".qmp" ]; then
|
||||||
# The sed transforms 100.pid (or .whatever) to 100
|
# The sed transforms 100.pid (or .whatever) to 100
|
||||||
creationRoutesVM $(echo ${vm} | sed -E 's/([0-9]{3})\..*/\1/')
|
creationRoutesVM $(echo ${vm} | sed -E 's/([0-9]{3})\..*/\1/')
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue