Cabal Online

Cabal server port range changer

Probably the most complex bit of script i have ever written. It changes all of the server's ports to other ports. Wooo

Somebody asked me about alternate port ranges and i had this lying around so if it could useful i may as well post it.

Chumpy's port change script v1.0

This is only useful if you want to use alternate ports for a Cabal
server and are too lazy to change the server ini file port config
manually like me. If you didn't understand that bit then this script
probably isn't for you.

Edit to set your ports. Look for the process name
and the default ports underneath, e.g.

if [ $name == "GlobalMgrSvr" ]; then
sed /etc/cabal/$daemon.ini \
-e "s/Port=38170/Port=68170/g" \
-e "s/Port=38180/Port=68180/g" \
> /etc/cabal/$daemon.ini.tmp
mv /etc/cabal/$daemon.ini.tmp /etc/cabal/$daemon.ini
echo "$daemon done."
This section changes the ports for GlobalMgrSvr.ini. It changes port
38170 to 68170 and port 38180 to 68180. You need to set every 68xxx
port number to yours because it will replace all of them.

Your odbc.ini will be changed to port 1433 (default) so you can
ignore that setting unless you have a different MSSQL port.

Put in /home/cabal.

When running cabal_config don't tell it to start the services. Whilst
the services are stopped run /home/cabal/ to
update the port numbers and then "service cabal start".

If you want to link it like the other commands use this to link it:

ln -sf /home/cabal/ /usr/bin/cabal_portchange