Script for using 2 mgcamd cccam client servers

markybrook

Senior Member
Messages
136
#!/bin/sh
# title:Change Mgcamd Configuration
# toggles 2 cccamd lists (cccamd1.list cccamd2.list) in var/bin
# Copies keys to var/keys/cccamd.list
# by Markybrook

mkdir -p /var/tmp
INCTXT1="Mgcam First Server Config"
if [ -e /var/tmp/log2.txt ]
then
#Conf two code
rm -rf /var/tmp/log2.txt
INCTXT1="Mgcam Second Server Config"
echo "$INCTXT1"
echo -e "web_show_mess 1 \0042$INCTXT1\0042" >/dev/commander
cp /var/bin/cccamd2.list /var/keys/cccamd.list

else
#Conf one code
cp /var/bin/cccamd1.list /var/keys/cccamd.list
echo "$INCTXT1"
echo -e "web_show_mess 1 \0042$INCTXT1\0042" >/dev/commander
echo 'log file is created' > /var/tmp/log2.txt
fi

##############################################################

Instructions:
Make 2 cccamlists, one called cccam1.list another cccam2.list.
Put them both in var/bin. In format:

C: server port username password

Save above script code as scrplg-mgcam.sh place in var/bin
ccmod new files to 755.

Run script using script.plugin in /var/plugins folder.
 

markybrook

Senior Member
Messages
136
You would use this type of script if you had 2 separate eg paid servers that had an overlap of providers and one server worked better with a particular provider. This script gives you the capability of switching between your server lists.
 
Top