Script for using 2 different incubus conf files

Status
Not open for further replies.

markybrook

Registered
Messages
136
Here is a script (Incubusconf.sh) that will work creating 2 different incubusCamd.conf files (resident in /var/keys)
named incubusconf1.conf and incubusconf2.conf > var/bin.
It will toggle between the 2 conf files every time it is run.
Copying each over alternately to be
the resident incubusCamd.conf in /var/keys.
The configuration remains state even after reboot.

########################################################
#!/bin/sh
# Incubusconf.sh
# Toggle Incubus between /var/bin/incubusconf1.conf
# and /var/bin/incubusconf2.conf
# where incubusconf1.conf and incubusconf2.conf
# have different servers that normally confict and
# will be copied to be the new incubusCamd.conf in /var/keys
# created by Markybrook 2010
# incubusCamd.conf should be in /var/keys

INCTXT1="Incubus Configuration One"


if [ -e /var/tmp/log.txt ]
then
#Conf two code
rm -rf /var/tmp/log.txt
INCTXT1="Incubus Configuration Two"
echo "$INCTXT1"
echo -e "web_show_mess 1 \0042$INCTXT1\0042" >/dev/commander
cp /var/bin/incubusconf2.conf /var/keys/incubusCamd.conf

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


############################################################
 
Last edited:
Status
Not open for further replies.
Top