summaryrefslogtreecommitdiffstats
path: root/network/t38modem/resetmodem
diff options
context:
space:
mode:
Diffstat (limited to 'network/t38modem/resetmodem')
-rw-r--r--network/t38modem/resetmodem28
1 files changed, 28 insertions, 0 deletions
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
+
+