Skip to main content
  • Products
    • Overview
    • Features
    • Screen Capture
    • Agent evaluation / score cards
    • Speech Analytics
    • Recording Announcement
    • Videos
    • Online demo
    • Quote
    • Download
  • Solutions
    • Businesses
    • Contact centers
    • Financial institutions
    • Healthcare
    • MiFID II compliance
    • Telecom service providers
    • Traders
  • Compatibility
    • AudioCodes
    • Avaya
    • BroadSoft
    • Cisco
    • Genband
    • IPC
    • Metaswitch
    • Oracle AcmePacket
    • SIPREC recording
    • Sonus
  • Documentation
    • User Guide
    • Administration Guide
    • Developer Guide
    • MiaRec v.3 (old) documentation
    • Resource library
    • Videos
  • Support
    • Submit a request
    • Check your existing requests
    • TeamViewer QuickSupport
  • Blog
  • Company
    • About MiaRec
    • Contact us
    • Our clients
    • Become a partner
    • News
    • Careers
    • Events
    • Testimonials

Legacy documentation

  • Legacy documentation
    • Passive call recording setup
      • What is port mirroring?
      • Virtual machine + passive recording
      • Configuring NIC for passive recording (port mirroring)
      • Enable packets pass-through for port mirroring traffic
        • AVG Internet Security
        • BitDefender Internet Security
        • ESET Smart Security 4
      • How to configure port mirroring on different switches
        • Cisco Catalyst 2960 Series Switches
        • D-Link DES-3010
        • Dell PowerConnect 2700 Series
        • Netgear FS726T
        • TP-LINK TL-SL2428WEB
      • Port Mirroring in complex call scenarios
      • Switches with port mirroring
    • Manual installation (deprecated) on Linux
      • Installation on Linux (Centos/RedHat) manually (deprecated)
        • Install MiaRec Web portal
          • Install PostgreSQL
          • Install Python 3
          • Install Apache web server
          • Install Redis cache
          • Install MiaRec web application
          • Install Celery task manager
        • Install MiaRec Recorder
          • SystemD start-up script (Centos 7.x)
          • Upstart start-up script (Centos 6.x)
          • Init.d start-up script
        • Install MiaRec Screen Recording Controller
        • Configure firewall
        • Verify services status
      • Installation on Linux (Ubuntu) manually (deprecated)
        • Install MiaRec Web portal
          • Install PostgreSQL
          • Install Python
          • Install Apache web server
          • Install Redis cache
          • Install MiaRec web application
          • Install Celery task manager
        • Install MiaRec Recorder
        • Configure firewall
    • Manual update on Linux (deprecated)
      • Update MiaRec Web portal
      • Update MiaRec recorder files
    • Cisco TAPI integration
      • Add TAPI user for MiaRec application
      • Configure Cisco TAPI TSP driver
      • Verify Cisco TAPI configuration
      • Enable Cisco TAPI interface in MiaRec
Home › Legacy documentation › Manual installation (deprecated) on Linux › Installation on Linux (Centos/RedHat) manually (deprecated) › Install MiaRec Recorder ›
 

Init.d start-up script

Note, this script doesn't support automatic respawn of process in case of abnormal exit (for example, due to app crash). We recommend using alternative methods which support respawn:

  • Upstart for RedHat/Centos 6.x
  • SystemD for RedHat/Centos 7.x

Create startup script miarec in directory /etc/init.d

vi /etc/init.d/miarec

Content of this file:

#!/bin/sh
#
# Startup sript for MiaRec call recorder
# 
# chkconfig: - 80 20
# description: MiaRec call recorder
# processname: miarec
# config: /etc/miarec.ini
#

EXEC=/usr/local/bin/miarec
PIDFILE=/var/run/miarec.pid
LOCKFILE=/var/lock/subsys/miarec
CONF=/etc/miarec/miarec.ini
CHDIR=/var/lib/miarec
RETVAL=0

# Source function library.
. /etc/rc.d/init.d/functions


start() {
        if [ -f $PIDFILE ]
        then
                RETVAL=1
                echo "$PIDFILE exists, process is already running or crashed" && failure
                echo
                return $RETVAL
        else
                echo "Staring MiaRec recorder..."
                cd $CHDIR
                ulimit -Hn 10240
                ulimit -Sn 10240
                $EXEC -c $CONF --pid $PIDFILE --core unlimited > /dev/null 2>&1 &
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch $LOCKFILE && success || failure
                echo
                return $RETVAL
        fi
}

stop() {
        echo "Stopping..."
        if [ ! -f $PIDFILE ]
        then
                RETVAL=1
                echo "$PIDFILE does not exist, process is not running" && warning
                echo
            return $RETVAL
        else
                PID=$(cat $PIDFILE)
                kill -TERM $PID
                rm -f $LOCKFILE
                echo "MiaRec stopped" && success
                echo
        fi
}


case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                stop
                start
                ;;
        *)
                echo "Please use start, stop or restart as first argument"
                RETVAL=2
                ;;
esac

exit $RETVAL

Make this script executable:

chmod +x /etc/init.d/miarec

Add it to autostart during boot:

chkconfig --add miarec
chkconfig miarec on
‹ Upstart start-up script (Centos 6.x) up Install MiaRec Screen Recording Controller ›
  • Printer-friendly version
MiaRec, Inc. © 2020. All Rights Reserved. | Terms of Use | Privacy Statement | Cancellation Policy