Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 42: Line 42:  
  yum localinstall iaxmodem-1.0.0-1.noarch.rpm
 
  yum localinstall iaxmodem-1.0.0-1.noarch.rpm
 
{{Note box|Current version of iaxmodem is 1.2 but there doesn't appear to a Centos 4 package for it anywhere}}
 
{{Note box|Current version of iaxmodem is 1.2 but there doesn't appear to a Centos 4 package for it anywhere}}
{{Warning box|This rpm does not install /etc/rc.d/init.d/iaxmodem so you will need to create one. A copy of the current version 1.2 code is reproduced at the end of this Howto. You may need to set the permissions and ownership
+
{{Warning box|The rpm from Aelintra does not install /etc/rc.d/init.d/iaxmodem so you will need to create one. A copy of the current version 1.2 code is reproduced at the end of this Howto. You may need to set the permissions and ownership
 
  chmod 766 iaxmodem
 
  chmod 766 iaxmodem
 
  chown root:root iaxmodem}}
 
  chown root:root iaxmodem}}
Line 82: Line 82:  
  db configuration set iaxmodem service status enabled
 
  db configuration set iaxmodem service status enabled
 
  /etc/rc.d/rc7.d/S93iaxmodem start
 
  /etc/rc.d/rc7.d/S93iaxmodem start
 +
 +
==iaxmodem==
 +
The following is the code for the /etc/rc.d/init.d/iaxmodem script from the current iaxmodem-1.2.0.tar.gz source.
 +
#!/bin/sh
 +
# Startup script for iaxmodem
 +
#
 +
# chkconfig: 2345 95 05
 +
# description: IAXModem for asterisk <-> Hylafax gateway
 +
 +
# Source function library.
 +
. /etc/rc.d/init.d/functions
 +
 +
[ -f /usr/local/sbin/iaxmodem ] || exit 0
 +
 +
prog="IAXmodem"
 +
 +
start() {
 +
    echo -n $"Starting $prog: "
 +
    daemon /usr/local/sbin/iaxmodem
 +
    RETVAL=$?
 +
    echo
 +
    return $RETVAL
 +
}
 +
 +
stop() {
 +
    if test "x`pidof iaxmodem`" != x; then
 +
        echo -n $"Stopping $prog: "
 +
        killproc iaxmodem
 +
        echo
 +
    fi
 +
    RETVAL=$?
 +
    return $RETVAL
 +
}
 +
reload() {
 +
    if test "x`pidof iaxmodem`" != x; then
 +
      echo $"Reloading $prog"
 +
      kill -HUP `head -1 /var/run/iaxmodem.pid`
 +
    fi
 +
}
 +
 +
case "$1" in
 +
        start)
 +
            start
 +
            ;;
 +
        stop)
 +
            stop
 +
            ;;
 +
        status)
 +
            status iaxmodem
 +
            ;;
 +
        reload)
 +
            reload
 +
            ;;
 +
        restart)
 +
            stop
 +
            start
 +
            ;;
 +
        condrestart)
 +
            if test "x`pidof iaxmodem`" != x; then
 +
                stop
 +
                start
 +
            fi
 +
            ;;
 +
 +
        *)
 +
            echo $"Usage: $0 {start|stop|reload|restart|condrestart|status}"
 +
            exit 1
 +
 +
esac
 +
 +
exit $RETVAL
 +
 +
 +
 +
 +
    
----
 
----

Navigation menu