AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 555873
Accepted
Mitch
Mitch
Asked: 2013-11-19 16:26:06 +0800 CST2013-11-19 16:26:06 +0800 CST 2013-11-19 16:26:06 +0800 CST

用 upstart 启动 iaxmodem 和faxmodem

  • 772

当我有多个调制解调器时,iaxmodem如何使用 Upstart 启动?faxgettyCentos 6.4 有一个很好的警告,如下所示,它让我相信标准inittab行不起作用。

# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.

我通常会放的地方

IAX:2345:respawn:/path/to/iaxmodem ttyIAX
centos
  • 1 1 个回答
  • 3181 Views

1 个回答

  • Voted
  1. Best Answer
    Mitch
    2013-11-19T16:26:06+08:002013-11-19T16:26:06+08:00

    使用在运行级别更改时启动的任务为IAXModem您要启动的每个任务启动一个作业。然后使用一个任务faxgetty为每个已启动的iaxmodem作业启动一个。

    IE:

    init 3 -> start-iaxmodem ---> iaxmodem(ttyIAX0) -> start-faxgetty(ttyIAX0) -> faxgetty(ttyIAX0)
                              \-> iaxmodem(ttyIAX1) -> start-faxgetty(ttyIAX1) -> faxgetty(ttyIAX1)
    

    /etc/init/start-iaxmodems.conf:

    # This service starts the configured number of gettys.
    start on stopped rc RUNLEVEL=[2345]
    
    task
    
    script
        for ttyIAX in /etc/iaxmodem/* ; do
            start iaxmodem TTY=`basename $ttyIAX`
        done
    end script
    

    /etc/init/iaxmodem.conf:

    # This service maintains an iaxmodem on the sepcified device.
    stop on runlevel [016]
    
    respawn
    instance $TTY
    exec /usr/sbin/iaxmodem $TTY
    

    /etc/init/start-faxgettys.conf:

    # This service starts the configured number of faxgettys.
    start on started iaxmodem
    # this will run once per triggering iaxmodem instance
    instance $INSTANCE
    
    task
    
    script
        # give it time to at least create the device
        /bin/sleep 1s
        start faxgetty TTY=$INSTANCE
    end script
    

    /etc/init/faxgetty.conf:

    # This service maintains a faxgetty on the sepcified device.
    # only stop when the stopping iaxmodem is this TTY
    stop on stopping iaxmodem INSTANCE=$TTY
    
    respawn
    instance $TTY
    
    exec /usr/sbin/faxgetty $TTY
    
    • 0

相关问题

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 使用 crontab 和 /etc/cron.hourly,daily,weekly 的区别

  • 持续监控许多服务器运行状况的简单方法?

  • Hudson 无法在 tomcat5 中启动

  • CentOS 的依赖挑战

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve