summaryrefslogtreecommitdiff
path: root/network/t38modem/resetmodem
diff options
context:
space:
mode:
authorChris Walker <kris240376@gmail.com>2020-04-02 00:08:34 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-04-02 00:08:34 +0700
commit4510e38975f8602e5e03502be518b9402837cbec (patch)
treeeda74dc50782a9e52a715b4ae64504e60a9c3ae4 /network/t38modem/resetmodem
parentceabc95edbfbf946484cf2779aaa6380ab34d5cf (diff)
downloadslackbuilds-4510e38975f8602e5e03502be518b9402837cbec.tar.gz
network/t38modem: Updated for version 3.15.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
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
+
+