QMAIL+MH Design Scheme (7)

Source: Internet
Author: User
Tags sleep qmail
The following rc.config files are designed to load the necessary tuples for initialization.

#!/bin/bash
# this are adapted Bernhard hailers old script
Local_number= "91311234" # Tel No. 091311234
Remote_number= "0911123456" # ISP Tel No.
Local_ip= "192.168.0.99" # I have dynamic IP so this'll do
Remote_ip= "195.112.123.11" # Your ISPs Gateway
Device= "Ippp0"
Syspath= "/sbin"
Isdnctrl= "$SYSPATH/isdnctrl"
Case "$" in
Start
# Turn on ISDN
insmod/lib/modules/2.0.33/net/slhc.o
insmod/lib/modules/2.0.33/misc/isdn.o
Sleep 1
# Load the Hisax module
Insmod/lib/modules/2.0.33/misc/hisax.o
Id=tel0 type=5 protocol=2 irq=10 io=0x300
echo "Starting Isdn4linux"
# Global
$ISDNCTRL verbose 0
$ISDNCTRL addif $DEVICE # Create New interface
$ISDNCTRL addphone $DEVICE in $REMOTE _number
$ISDNCTRL Addphone $DEVICE out $REMOTE _number
$ISDNCTRL Eaz $DEVICE $LOCAL _number
$ISDNCTRL L2_prot $DEVICE HDLC
$ISDNCTRL L3_prot $DEVICE Trans
$ISDNCTRL EnCap $DEVICE SYNCPPP
$ISDNCTRL huptimeout $DEVICE 300
$ISDNCTRL Chargehup $DEVICE off
$ISDNCTRL Secure $DEVICE on
$SYSPATH/ifconfig $DEVICE $LOCAL _ip pointopoint $REMOTE _ip metric 1
$SYSPATH/route Add default $DEVICE
$SYSPATH/ipppd/dev/ippp0 FILE/ETC/PPP/OPTIONS.IPPPD &
$SYSPATH/route del Default

;;
Stop
#turn off ISDN
Rmmod HISAX.O
Sleep 1
Rmmod ISDN.O
Rmmod SLHC.O
echo "Shutting down Isdn4linux"
$ISDNCTRL Delif ippp0
;;
*)
echo "Usage: $ (start|stop)"
Exit 1
;;
Esac



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.