Fix patchman scripts
This commit is contained in:
parent
feeccbdea8
commit
aee9f17acb
12 changed files with 62 additions and 69 deletions
|
@ -99,14 +99,14 @@ then
|
||||||
for f in $DOMAIN_LIST
|
for f in $DOMAIN_LIST
|
||||||
do
|
do
|
||||||
# see if we're setup to run this domain
|
# see if we're setup to run this domain
|
||||||
if [ -e /srv/core/${f}.screen.rc ] && [ -e /srv/core/bin/${f} ]
|
if [ -e /srv/core/${f}.screen.rc ] && [ -e /srv/core/bin/domain_${f} ]
|
||||||
then
|
then
|
||||||
# see whether the domain is alredy running
|
# see whether the domain is alredy running
|
||||||
if [ $( screen -list | grep \( | cut -f2 | cut -d. -f2| grep \^$f\$ | wc -l) == 0 ]
|
if [ $( screen -list | grep \\\.${f} | wc -w ) = 0 ]
|
||||||
then
|
then
|
||||||
# the domain isn't running yet so start it
|
# the domain isn't running yet so start it
|
||||||
echo '****' starting domain: $f '****'
|
echo '****' starting domain: $f '****'
|
||||||
/srv/core/bin/$f batchstart
|
/srv/core/bin/domain_$f batchstart
|
||||||
else
|
else
|
||||||
echo '****' Domain is already running: $f '****'
|
echo '****' Domain is already running: $f '****'
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
|
||||||
if [ "$2" == "" ]
|
if [ "$2" = "" ]
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
echo USAGE: $0 sleep_time command_line
|
echo USAGE: $0 sleep_time command_line
|
||||||
|
|
|
@ -10,6 +10,7 @@ do
|
||||||
chmod 775 bin/ps_services 2> /dev/null
|
chmod 775 bin/ps_services 2> /dev/null
|
||||||
chmod 775 bin/run_forever 2> /dev/null
|
chmod 775 bin/run_forever 2> /dev/null
|
||||||
chmod 775 bin/shard 2> /dev/null
|
chmod 775 bin/shard 2> /dev/null
|
||||||
|
chmod 775 bin/domain_* 2> /dev/null
|
||||||
chmod 775 bin/startup 2> /dev/null
|
chmod 775 bin/startup 2> /dev/null
|
||||||
chmod 775 bin/*.sh 2> /dev/null
|
chmod 775 bin/*.sh 2> /dev/null
|
||||||
chmod 775 patchman/*_service 2> /dev/null
|
chmod 775 patchman/*_service 2> /dev/null
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
CFGFILENAME=patchman_service.${SERVER_TYPE}.cfg
|
CFGFILENAME=patchman_service.${SERVER_TYPE}.cfg
|
||||||
echo cfg file: $CFGFILENAME
|
echo cfg file: $CFGFILENAME
|
||||||
|
|
||||||
AESCFGFILENAME=admin_executor_service_default.${SERVER_TYPE}.cfg
|
#AESCFGFILENAME=admin_executor_service_default.${SERVER_TYPE}.cfg
|
||||||
echo aes cfg file: $AESCFGFILENAME
|
#echo aes cfg file: $AESCFGFILENAME
|
||||||
|
|
||||||
cd /srv/core/patchman
|
cd /srv/core/patchman
|
||||||
if [ -e $CFGFILENAME ]
|
if [ -e $CFGFILENAME ]
|
||||||
|
@ -15,8 +15,8 @@ if [ -e $CFGFILENAME ]
|
||||||
cp $CFGFILENAME patchman_service.cfg
|
cp $CFGFILENAME patchman_service.cfg
|
||||||
|
|
||||||
# setup the config file for the admin executor service
|
# setup the config file for the admin executor service
|
||||||
echo Using aes configuration file: $AESCFGFILENAME
|
#echo Using aes configuration file: $AESCFGFILENAME
|
||||||
if [ -e $AESCFGFILENAME ] ; then cp $AESCFGFILENAME admin_executor_service_default.cfg ; fi
|
#if [ -e $AESCFGFILENAME ] ; then cp $AESCFGFILENAME admin_executor_service_default.cfg ; fi
|
||||||
|
|
||||||
# start the patchman service
|
# start the patchman service
|
||||||
echo Launching patchman...
|
echo Launching patchman...
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$1" == "" ]
|
if [ "$1" = "" ]
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
echo USAGE: $0 command_line
|
echo USAGE: $0 command_line
|
||||||
|
|
|
@ -84,7 +84,7 @@ rm -v */*.*launch_ctrl *.*launch_ctrl 2> /dev/null
|
||||||
# initialise the state files for the new services to "xxxxx" and remove directories that are no longer of interest
|
# initialise the state files for the new services to "xxxxx" and remove directories that are no longer of interest
|
||||||
for D in $(ls */log.log | sed "s%/.*%%" | sort -u)
|
for D in $(ls */log.log | sed "s%/.*%%" | sort -u)
|
||||||
do
|
do
|
||||||
if [ $(grep \"$D\" admin_executor_service.cfg | wc -l) == 1 ]
|
if [ $(grep \"$D\" admin_executor_service.cfg | wc -l) = 1 ]
|
||||||
then
|
then
|
||||||
printf "xxxxx" > $D/$D.state
|
printf "xxxxx" > $D/$D.state
|
||||||
else
|
else
|
||||||
|
@ -97,7 +97,7 @@ done
|
||||||
printf "1" > ./global.launch_ctrl
|
printf "1" > ./global.launch_ctrl
|
||||||
|
|
||||||
# create a script for accessing the screen for this shard
|
# create a script for accessing the screen for this shard
|
||||||
SCRIPT_FILE=/srv/core/bin/${DOMAIN}
|
SCRIPT_FILE=/srv/core/bin/domain_${DOMAIN}
|
||||||
echo "#!/bin/sh" > $SCRIPT_FILE
|
echo "#!/bin/sh" > $SCRIPT_FILE
|
||||||
echo "cd "$(pwd) >> $SCRIPT_FILE
|
echo "cd "$(pwd) >> $SCRIPT_FILE
|
||||||
echo '/bin/sh /srv/core/bin/ryzom_domain_screen_wrapper.sh $*' >> $SCRIPT_FILE
|
echo '/bin/sh /srv/core/bin/ryzom_domain_screen_wrapper.sh $*' >> $SCRIPT_FILE
|
||||||
|
|
|
@ -28,10 +28,3 @@ StartCommands =
|
||||||
"pam.plug spm_gw",
|
"pam.plug spm_gw",
|
||||||
"pam.plug bridge_gw",
|
"pam.plug bridge_gw",
|
||||||
};
|
};
|
||||||
|
|
||||||
SpaPreCmdLineText="/bin/sh /srv/core/patchman/service_launcher.sh";
|
|
||||||
DeploymentRootDirectory="/srv/core/patchman/";
|
|
||||||
MakeInstalledVersionLiveCmdLine="/bin/sh /srv/core/patchman/make_next_live.sh";
|
|
||||||
SpaLaunchAESCmdLine="/bin/sh /srv/core/patchman/loop_aes.sh";
|
|
||||||
InstallArchiveDirectory="/srv/core/";
|
|
||||||
InstallArchiveFileName="admin_install.tgz";
|
|
||||||
|
|
|
@ -36,10 +36,3 @@ StartCommands =
|
||||||
"pam.plug spm_gw",
|
"pam.plug spm_gw",
|
||||||
"pam.plug bridge_gw",
|
"pam.plug bridge_gw",
|
||||||
};
|
};
|
||||||
|
|
||||||
SpaPreCmdLineText="/bin/sh /srv/core/patchman/service_launcher.sh";
|
|
||||||
DeploymentRootDirectory="/srv/core/patchman/";
|
|
||||||
MakeInstalledVersionLiveCmdLine="/bin/sh /srv/core/patchman/make_next_live.sh";
|
|
||||||
SpaLaunchAESCmdLine="/bin/sh /srv/core/patchman/loop_aes.sh";
|
|
||||||
InstallArchiveDirectory="/srv/core/";
|
|
||||||
InstallArchiveFileName="admin_install.tgz";
|
|
||||||
|
|
|
@ -36,10 +36,3 @@ StartCommands =
|
||||||
"pam.plug spm_gw",
|
"pam.plug spm_gw",
|
||||||
"pam.plug bridge_gw",
|
"pam.plug bridge_gw",
|
||||||
};
|
};
|
||||||
|
|
||||||
SpaPreCmdLineText="/bin/sh /srv/core/patchman/service_launcher.sh";
|
|
||||||
DeploymentRootDirectory="/srv/core/patchman/";
|
|
||||||
MakeInstalledVersionLiveCmdLine="/bin/sh /srv/core/patchman/make_next_live.sh";
|
|
||||||
SpaLaunchAESCmdLine="/bin/sh /srv/core/patchman/loop_aes.sh";
|
|
||||||
InstallArchiveDirectory="/srv/core/";
|
|
||||||
InstallArchiveFileName="admin_install.tgz";
|
|
||||||
|
|
|
@ -14,4 +14,9 @@ DontUseStdIn = 0;
|
||||||
// 4 = nothing
|
// 4 = nothing
|
||||||
UseYieldMethod = 0;
|
UseYieldMethod = 0;
|
||||||
|
|
||||||
|
SpaPreCmdLineText="/bin/sh /srv/core/patchman/service_launcher.sh";
|
||||||
|
DeploymentRootDirectory="/srv/core/patchman/";
|
||||||
|
MakeInstalledVersionLiveCmdLine="/bin/sh /srv/core/patchman/make_next_live.sh";
|
||||||
|
SpaLaunchAESCmdLine="/bin/sh /srv/core/patchman/loop_aes.sh";
|
||||||
|
InstallArchiveDirectory="/srv/core/";
|
||||||
|
InstallArchiveFileName="admin_install.tgz";
|
||||||
|
|
|
@ -1,25 +1,26 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# the object is to make a launcher script that works with a command file to determine when to launch the application that it is responsible for
|
# the objective is to make a launcher script that works with a command file to determine when to launch the application that it is responsible for
|
||||||
|
|
||||||
DOMAIN=$(pwd |sed "s%/srv/core/%%" | sed "s%/.*%%")
|
DOMAIN=$(pwd |sed "s%/srv/core/%%" | sed "s%/.*%%")
|
||||||
NAME_BASE=$(pwd | sed 's/\/srv\/core\///' | sed 's/^.*\///')
|
NAME_BASE=$(pwd | sed 's/\/srv\/core\///' | sed 's/^.*\///')
|
||||||
|
|
||||||
#if [ _$DOMAIN == _pre_live ]
|
#if [ _$DOMAIN == _pre_live ]
|
||||||
# then
|
# then
|
||||||
CTRL_FILE=${NAME_BASE}.launch_ctrl
|
CTRL_FILE=${NAME_BASE}.launch_ctrl
|
||||||
NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl
|
NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl
|
||||||
#elif [ _$DOMAIN == _pre_pre_live ]
|
#elif [ _$DOMAIN == _pre_pre_live ]
|
||||||
# then
|
# then
|
||||||
# CTRL_FILE=${NAME_BASE}.launch_ctrl
|
# CTRL_FILE=${NAME_BASE}.launch_ctrl
|
||||||
# NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl
|
# NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl
|
||||||
#else
|
#else
|
||||||
# CTRL_FILE=${NAME_BASE}_immediate.launch_ctrl
|
# CTRL_FILE=${NAME_BASE}_immediate.launch_ctrl
|
||||||
# NEXT_CTRL_FILE=${NAME_BASE}_waiting.launch_ctrl
|
# NEXT_CTRL_FILE=${NAME_BASE}_waiting.launch_ctrl
|
||||||
#fi
|
#fi
|
||||||
STATE_FILE=${NAME_BASE}.state
|
STATE_FILE=${NAME_BASE}.state
|
||||||
START_COUNTER_FILE=${NAME_BASE}.start_count
|
START_COUNTER_FILE=${NAME_BASE}.start_count
|
||||||
CTRL_CMDLINE=$*
|
CTRL_CMDLINE=$*
|
||||||
|
CTRL_COMMAND=""
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo ---------------------------------------------------------------------------------
|
echo ---------------------------------------------------------------------------------
|
||||||
|
@ -36,6 +37,13 @@ echo
|
||||||
echo 0 > $START_COUNTER_FILE
|
echo 0 > $START_COUNTER_FILE
|
||||||
START_COUNTER=0
|
START_COUNTER=0
|
||||||
|
|
||||||
|
# always give ras a first run
|
||||||
|
if [ "${NAME_BASE}" = "ras" ]
|
||||||
|
then
|
||||||
|
echo Force admin service first startup
|
||||||
|
printf LAUNCH > $CTRL_FILE
|
||||||
|
fi
|
||||||
|
|
||||||
echo Press ENTER to launch program
|
echo Press ENTER to launch program
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
@ -45,37 +53,37 @@ do
|
||||||
then
|
then
|
||||||
|
|
||||||
# a control file exists so read it's contents
|
# a control file exists so read it's contents
|
||||||
CTRL_COMMAND=_$(cat $CTRL_FILE)_
|
CTRL_COMMAND=$(cat $CTRL_FILE)
|
||||||
|
|
||||||
# do we have a 'launch' command?
|
# do we have a 'launch' command?
|
||||||
if [ $CTRL_COMMAND = _LAUNCH_ ]
|
if [ "$CTRL_COMMAND" = "LAUNCH" ]
|
||||||
then
|
then
|
||||||
|
|
||||||
# update the start counter
|
# update the start counter
|
||||||
START_COUNTER=$(( $START_COUNTER + 1 ))
|
START_COUNTER=$(( $START_COUNTER + 1 ))
|
||||||
echo $START_COUNTER > $START_COUNTER_FILE
|
echo $START_COUNTER > $START_COUNTER_FILE
|
||||||
|
|
||||||
# big nasty hack to deal with the special cases of ryzom_naming_service and ryzom_admin_service who have badly names cfg files
|
# big nasty hack to deal with the special cases of ryzom_naming_service and ryzom_admin_service who have badly names cfg files
|
||||||
for f in ryzom_*cfg
|
for f in ryzom_*cfg
|
||||||
do
|
do
|
||||||
cp $f $(echo $f | sed "s/ryzom_//")
|
cp $f $(echo $f | sed "s/ryzom_//")
|
||||||
done
|
done
|
||||||
|
|
||||||
# we have a launch command so prepare, launch, wait for exit and do the housekeeping
|
# we have a launch command so prepare, launch, wait for exit and do the housekeeping
|
||||||
echo -----------------------------------------------------------------------
|
echo -----------------------------------------------------------------------
|
||||||
echo Launching ...
|
echo Launching ...
|
||||||
echo
|
echo
|
||||||
printf RUNNING > $STATE_FILE
|
printf RUNNING > $STATE_FILE
|
||||||
|
|
||||||
$CTRL_CMDLINE
|
$CTRL_CMDLINE
|
||||||
|
|
||||||
echo -----------------------------------------------------------------------
|
echo -----------------------------------------------------------------------
|
||||||
printf STOPPED > $STATE_FILE
|
printf STOPPED > $STATE_FILE
|
||||||
|
|
||||||
# consume (remove) the control file to allow start once
|
# consume (remove) the control file to allow start once
|
||||||
rm $CTRL_FILE
|
rm $CTRL_FILE
|
||||||
|
|
||||||
echo Press ENTER to relaunch
|
echo Press ENTER to relaunch
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -87,9 +95,9 @@ do
|
||||||
else
|
else
|
||||||
# give the terminal user a chance to press enter to provoke a re-launch
|
# give the terminal user a chance to press enter to provoke a re-launch
|
||||||
HOLD=`sh -ic '{ read a; echo "ENTER" 1>&3; kill 0; } | { sleep 2; kill 0; }' 3>&1 2>/dev/null`
|
HOLD=`sh -ic '{ read a; echo "ENTER" 1>&3; kill 0; } | { sleep 2; kill 0; }' 3>&1 2>/dev/null`
|
||||||
if [ _${HOLD}_ != _HOLD_ ]
|
if [ "${HOLD}" = "ENTER" ]
|
||||||
then
|
then
|
||||||
printf LAUNCH > $CTRL_FILE
|
printf LAUNCH > $CTRL_FILE
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ SystemCmd = {};
|
||||||
//NegFiltersDebug += { "LNET", "HNET", "FEVIS"};
|
//NegFiltersDebug += { "LNET", "HNET", "FEVIS"};
|
||||||
//NegFiltersInfo += { "LNET", "HNET", "VISION_DELTA", "FEIMPE", "FEVIS" };
|
//NegFiltersInfo += { "LNET", "HNET", "VISION_DELTA", "FEIMPE", "FEVIS" };
|
||||||
// NegFiltersWarning += { "LNET", "FEHACK", "FERECV"};
|
// NegFiltersWarning += { "LNET", "FEHACK", "FERECV"};
|
||||||
// NegFiltersWarning += { "positional", "faction", "pet" };
|
// NegFiltersWarning += { "positional", "faction", "pet" };
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
//- Basic (specific) heal profile parameters ---------------------------------
|
//- Basic (specific) heal profile parameters ---------------------------------
|
||||||
|
@ -49,7 +49,7 @@ DefaultNpcAggroDist = 15;
|
||||||
DefaultEscortRange = 10;
|
DefaultEscortRange = 10;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// Aggro //
|
// Aggro //
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
AggroReturnDistCheck = 15.0;
|
AggroReturnDistCheck = 15.0;
|
||||||
AggroReturnDistCheckFauna = 15.0;
|
AggroReturnDistCheckFauna = 15.0;
|
||||||
|
@ -318,7 +318,7 @@ StartCommandsWhenMirrorReadyPost =
|
||||||
// commands for Ring continents
|
// commands for Ring continents
|
||||||
StartCommandsWhenMirrorReadyRing =
|
StartCommandsWhenMirrorReadyRing =
|
||||||
{
|
{
|
||||||
"loadContinent r2_desert",
|
"loadContinent r2_desert",
|
||||||
"createDynamicAIInstance 10000",
|
"createDynamicAIInstance 10000",
|
||||||
"loadPrimitiveFile dummy.primitive",
|
"loadPrimitiveFile dummy.primitive",
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue