mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-20 23:24:36 +02:00
22 lines
217 B
Bash
Executable File
22 lines
217 B
Bash
Executable File
#!/bin/bash
|
|
|
|
F=$1
|
|
S=$2
|
|
|
|
t=`stat -c %y $F`
|
|
|
|
while true
|
|
do
|
|
sleep 5
|
|
t1=`stat -c %y $F`
|
|
|
|
if [ "${t1}" != "${t}" ]
|
|
then
|
|
echo $F changed
|
|
t=${t1}
|
|
systemctl restart ${S}
|
|
fi
|
|
|
|
done
|
|
|