| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
dante_service_error() |
| 6 |
{ |
| 7 |
local res="$?" conffile='/etc/danted.conf' notfound='' var |
| 8 |
for var in internal external; do |
| 9 |
if ! egrep -qe '^[[:space:]]*'"$var"'[[:space:]]*:' -- "$conffile"; then |
| 10 |
notfound="$notfound $var" |
| 11 |
fi |
| 12 |
done |
| 13 |
if [ -n "$notfound" ]; then |
| 14 |
echo "Please edit the Dante server config file $conffile and specify at least the following directives:$notfound" 1>&2 |
| 15 |
else |
| 16 |
# The required directives are specified, so propagate the error |
| 17 |
exit "$res" |
| 18 |
fi |
| 19 |
} |
| 20 |
|
| 21 |
#DEBHELPER# |