From 4510e38975f8602e5e03502be518b9402837cbec Mon Sep 17 00:00:00 2001 From: Chris Walker Date: Thu, 2 Apr 2020 00:08:34 +0700 Subject: network/t38modem: Updated for version 3.15. Signed-off-by: Willy Sudiarto Raharjo --- network/t38modem/resetmodem | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 network/t38modem/resetmodem (limited to 'network/t38modem/resetmodem') diff --git a/network/t38modem/resetmodem b/network/t38modem/resetmodem new file mode 100644 index 0000000000..661cec143c --- /dev/null +++ b/network/t38modem/resetmodem @@ -0,0 +1,28 @@ +#!/usr/bin/bash + +# This script can be used to unwedge a stuck t38modem virtual modem. In order +# to use this script, you'll need to do the following: +# +# Use the /etc/rc.d/rc.t38modem script provided to start/stop t38modem. This +# will allow you to start up multiple virtual modems using a separate t38modem +# process for each line. You can then start/stop/restart an individual modem +# line without interrupting the other ongoing faxes. +# +# Using visudo, add the following to /etc/sudoers: +# +# # Hylafax system commands +# uucp ALL=(ALL) NOPASSWD: /etc/rc.d/rc.t38modem +# +# Copy this file to the /var/spool/hylafax/etc and set its execute bit: +# +# cp /usr/doc/hylafax-3.15/Hylafax/resetmodem /var/spool/hylafax/etc +# chmod +x /var/spool/hylafax/etc/resetmodem +# + +DEV=$(basename $1) + +if [ "$DEV" = "ttyx0" -o "$DEV" = "ttyx1" -o "$DEV" = "ttyx2" -o "$DEV" = "ttyx3" ]; then + sudo /etc/rc.d/rc.t38modem "${DEV}_restart" +fi + + -- cgit v1.2.3