tinc/debian/tinc.if-post-down

20 lines
268 B
Text
Raw Normal View History

#!/bin/sh
set -e
if [ "$IF_TINC_NET" ] ; then
tinc -n "$IF_TINC_NET" stop
sleep 0.1
i=0;
while [ -f "/var/run/tinc.$IF_TINC_NET.pid" ] ; do
if [ $i = '30' ] ; then
echo 'Failed to stop tinc daemon!'
exit 1
fi
sleep 0.1
i=$(($i+1))
done
fi
exit 0