#! /bin/sh
#
# Wrapper that call hylafax executables (not long running daemons)
# after mounting the configuration directory inthe right place
#
# daemons have the same configurations in corresponding systemd unit files.

readonly name=$(basename $0)
mount -o bind /etc/hylafax /var/spool/hylafax/etc
/usr/lib/hylafax/bin/"$name" "$@"
e=$?
umount /var/spool/hylafax/etc
exit $e
