5c54f47af6
tinc (1.1~pre7-2) experimental; urgency=low [ Gian Piero Carrubba ] * Init script fails to pass extra arguments to tincd. Closes: #704701 + Remove the '--' as it is passed unaltered to tincd, preventing it to read trailing parameters. + Pass extra arguments also when restarting the daemon. * Set process limits when started by ifupdown. Closes: #704702 [ Guus Sliepen ] * Check whether the tincd process is still running in the if-post-down script. Closes: #704708
23 lines
327 B
Bash
Executable file
23 lines
327 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ "$IF_TINC_NET" ] ; then
|
|
tinc -n "$IF_TINC_NET" stop
|
|
sleep 0.1
|
|
i=0;
|
|
while read pid rest < /var/run/tinc.$IF_TINC_NET.pid ; do
|
|
if [ ! -e "/proc/$pid" ] ; then
|
|
exit 0
|
|
fi
|
|
|
|
if [ $i = '30' ] ; then
|
|
echo 'Failed to stop tinc daemon!'
|
|
exit 1
|
|
fi
|
|
sleep 0.1
|
|
i=$(($i+1))
|
|
done
|
|
fi
|
|
|
|
exit 0
|