|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/22697/root/usr/share/doc/mgetty-1.1.33/samples/ |
Upload File : |
#!/bin/sh
#
# From: Sarantos Kapidakis <sarantos@ics.forth.gr>
# To: gert@greenie.muc.de
# Subject: Re: mgetty
#
# By the way, this is my fax-answer-now script (you can include it in
# the distribution as an example, if you want),
# which asks mgetty to answer pick up the phone, and if there is no
# mgetty running (it depends on my init level), it starts a single
# mgetty for answering this one call.
#
#!/bin/sh
sig=-USR1
port=${1:-ttyS1}
if pid=`cat /etc/mg-pid.$port 2>/dev/null` && kill $sig $pid 2>/dev/null
then
:
else
/usr/local/sbin/mgetty $port < /dev/null &
echo "starting mgetty..."
sleep 4
pid=`cat /etc/mg-pid.$port`
kill $sig $pid
fi
echo "sending mgetty, pid $pid, signal $sig..."