pre_upgrade() { echo "Stopping HylaFAX+ services" systemctl stop hfaxd.service faxq.service "faxgetty@*.service" || true } post_upgrade() { echo "Starting enabled HylaFAX+ services" systemctl daemon-reload systemctl reset-failed "faxgetty@*" hfaxd faxq 2>/dev/null || true local _svcs=$(systemctl list-units --all | \ awk '/^[[:space:]]*faxgetty@/ { print $1 }') _svcs="$_svcs hfaxd faxq" for s in $_svcs; do systemctl is-enabled "$s" >/dev/null && \ systemctl start "$s" || true done } pre_remove() { pre_upgrade echo "Stopping and disabling HylaFAX+ services and timers" systemctl stop faxqclean.timer faxcron.timer systemctl disable hfaxd.service faxq.service faxqclean.timer faxcron.timer local _svcs=$(systemctl list-units --all | \ awk '/^[[:space:]]*faxgetty@/ { print $1 }') for s in $_svcs; do systemctl is-enabled "$s" >/dev/null && \ systemctl disable "$s" || true done rm -f /opt/hylafax/spool/FIFO* } post_remove() { echo "Deleting user and group hylafax" usermod -G "" hylafax || true userdel hylafax || true groupdel hylafax 2>/dev/null || true echo "Any remaining data in /opt/hylafax have to be deleted manually." } post_install() { cat << EOF Here are some tasks left to you to finish your setup: - The default page size is A4, you can change this in /opt/hylafax/spool/etc/pagesizes - Configure some modems in /opt/hylafax/spool/etc Example: config.ttyIAX0 config.ttyIAX1 - For SSL faxing, create X.509 certificate with key as file ssl.pem in /opt/hylafax/spool/etc - Add Fax{Notify,Dispatch,Wedged} in /opt/hylafax/spool/etc - Enable and start faxgetty named instances: systemctl enable faxgetty@ttyIAX0.service faxgetty@ttyIAX1.service systemctl start faxgetty@ttyIAX0.service faxgetty@ttyIAX1.service - Enable and start faxq hfaxd service, faxqclean and faxcron timer systemctl enable faxq.service hfaxd.service faxqclean.timer faxcron.timer systemctl start faxq.service hfaxd.service faxqclean.timer faxcron.timer - Check http://hylafax.sourceforge.net/howto/tweaking.php for more tweaking tips EOF }