mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 04:40:53 +00:00
Fix patchman scripts
This commit is contained in:
parent
6450e0e8eb
commit
a7fe1c3f7f
12 changed files with 62 additions and 69 deletions
|
@ -99,14 +99,14 @@ then
|
|||
for f in $DOMAIN_LIST
|
||||
do
|
||||
# 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
|
||||
# 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
|
||||
# the domain isn't running yet so start it
|
||||
echo '****' starting domain: $f '****'
|
||||
/srv/core/bin/$f batchstart
|
||||
/srv/core/bin/domain_$f batchstart
|
||||
else
|
||||
echo '****' Domain is already running: $f '****'
|
||||
fi
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
while true
|
||||
do
|
||||
|
||||
if [ "$2" == "" ]
|
||||
if [ "$2" = "" ]
|
||||
then
|
||||
echo
|
||||
echo USAGE: $0 sleep_time command_line
|
||||
|
|
|
@ -10,6 +10,7 @@ do
|
|||
chmod 775 bin/ps_services 2> /dev/null
|
||||
chmod 775 bin/run_forever 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/*.sh 2> /dev/null
|
||||
chmod 775 patchman/*_service 2> /dev/null
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
CFGFILENAME=patchman_service.${SERVER_TYPE}.cfg
|
||||
echo cfg file: $CFGFILENAME
|
||||
|
||||
AESCFGFILENAME=admin_executor_service_default.${SERVER_TYPE}.cfg
|
||||
echo aes cfg file: $AESCFGFILENAME
|
||||
#AESCFGFILENAME=admin_executor_service_default.${SERVER_TYPE}.cfg
|
||||
#echo aes cfg file: $AESCFGFILENAME
|
||||
|
||||
cd /srv/core/patchman
|
||||
if [ -e $CFGFILENAME ]
|
||||
|
@ -15,8 +15,8 @@ if [ -e $CFGFILENAME ]
|
|||
cp $CFGFILENAME patchman_service.cfg
|
||||
|
||||
# setup the config file for the admin executor service
|
||||
echo Using aes configuration file: $AESCFGFILENAME
|
||||
if [ -e $AESCFGFILENAME ] ; then cp $AESCFGFILENAME admin_executor_service_default.cfg ; fi
|
||||
#echo Using aes configuration file: $AESCFGFILENAME
|
||||
#if [ -e $AESCFGFILENAME ] ; then cp $AESCFGFILENAME admin_executor_service_default.cfg ; fi
|
||||
|
||||
# start the patchman service
|
||||
echo Launching patchman...
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$1" == "" ]
|
||||
if [ "$1" = "" ]
|
||||
then
|
||||
echo
|
||||
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
|
||||
for D in $(ls */log.log | sed "s%/.*%%" | sort -u)
|
||||
do
|
||||
if [ $(grep \"$D\" admin_executor_service.cfg | wc -l) == 1 ]
|
||||
if [ $(grep \"$D\" admin_executor_service.cfg | wc -l) = 1 ]
|
||||
then
|
||||
printf "xxxxx" > $D/$D.state
|
||||
else
|
||||
|
@ -97,7 +97,7 @@ done
|
|||
printf "1" > ./global.launch_ctrl
|
||||
|
||||
# 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 "cd "$(pwd) >> $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 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 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 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
|
||||
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
|
||||
|
||||
# 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%/.*%%")
|
||||
NAME_BASE=$(pwd | sed 's/\/srv\/core\///' | sed 's/^.*\///')
|
||||
|
||||
#if [ _$DOMAIN == _pre_live ]
|
||||
# then
|
||||
CTRL_FILE=${NAME_BASE}.launch_ctrl
|
||||
NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl
|
||||
# then
|
||||
CTRL_FILE=${NAME_BASE}.launch_ctrl
|
||||
NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl
|
||||
#elif [ _$DOMAIN == _pre_pre_live ]
|
||||
# then
|
||||
# CTRL_FILE=${NAME_BASE}.launch_ctrl
|
||||
# NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl
|
||||
# then
|
||||
# CTRL_FILE=${NAME_BASE}.launch_ctrl
|
||||
# NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl
|
||||
#else
|
||||
# CTRL_FILE=${NAME_BASE}_immediate.launch_ctrl
|
||||
# NEXT_CTRL_FILE=${NAME_BASE}_waiting.launch_ctrl
|
||||
# CTRL_FILE=${NAME_BASE}_immediate.launch_ctrl
|
||||
# NEXT_CTRL_FILE=${NAME_BASE}_waiting.launch_ctrl
|
||||
#fi
|
||||
STATE_FILE=${NAME_BASE}.state
|
||||
START_COUNTER_FILE=${NAME_BASE}.start_count
|
||||
CTRL_CMDLINE=$*
|
||||
CTRL_COMMAND=""
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------------------------------------------
|
||||
|
@ -36,6 +37,13 @@ echo
|
|||
echo 0 > $START_COUNTER_FILE
|
||||
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
|
||||
while true
|
||||
do
|
||||
|
@ -45,37 +53,37 @@ do
|
|||
then
|
||||
|
||||
# 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?
|
||||
if [ $CTRL_COMMAND = _LAUNCH_ ]
|
||||
if [ "$CTRL_COMMAND" = "LAUNCH" ]
|
||||
then
|
||||
|
||||
# update the start counter
|
||||
START_COUNTER=$(( $START_COUNTER + 1 ))
|
||||
echo $START_COUNTER > $START_COUNTER_FILE
|
||||
# update the start counter
|
||||
START_COUNTER=$(( $START_COUNTER + 1 ))
|
||||
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
|
||||
for f in ryzom_*cfg
|
||||
do
|
||||
cp $f $(echo $f | sed "s/ryzom_//")
|
||||
done
|
||||
# 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
|
||||
do
|
||||
cp $f $(echo $f | sed "s/ryzom_//")
|
||||
done
|
||||
|
||||
# we have a launch command so prepare, launch, wait for exit and do the housekeeping
|
||||
echo -----------------------------------------------------------------------
|
||||
echo Launching ...
|
||||
echo
|
||||
printf RUNNING > $STATE_FILE
|
||||
# we have a launch command so prepare, launch, wait for exit and do the housekeeping
|
||||
echo -----------------------------------------------------------------------
|
||||
echo Launching ...
|
||||
echo
|
||||
printf RUNNING > $STATE_FILE
|
||||
|
||||
$CTRL_CMDLINE
|
||||
$CTRL_CMDLINE
|
||||
|
||||
echo -----------------------------------------------------------------------
|
||||
printf STOPPED > $STATE_FILE
|
||||
echo -----------------------------------------------------------------------
|
||||
printf STOPPED > $STATE_FILE
|
||||
|
||||
# consume (remove) the control file to allow start once
|
||||
rm $CTRL_FILE
|
||||
# consume (remove) the control file to allow start once
|
||||
rm $CTRL_FILE
|
||||
|
||||
echo Press ENTER to relaunch
|
||||
echo Press ENTER to relaunch
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -87,9 +95,9 @@ do
|
|||
else
|
||||
# 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`
|
||||
if [ _${HOLD}_ != _HOLD_ ]
|
||||
then
|
||||
printf LAUNCH > $CTRL_FILE
|
||||
if [ "${HOLD}" = "ENTER" ]
|
||||
then
|
||||
printf LAUNCH > $CTRL_FILE
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ SystemCmd = {};
|
|||
//NegFiltersDebug += { "LNET", "HNET", "FEVIS"};
|
||||
//NegFiltersInfo += { "LNET", "HNET", "VISION_DELTA", "FEIMPE", "FEVIS" };
|
||||
// NegFiltersWarning += { "LNET", "FEHACK", "FERECV"};
|
||||
// NegFiltersWarning += { "positional", "faction", "pet" };
|
||||
// NegFiltersWarning += { "positional", "faction", "pet" };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//- Basic (specific) heal profile parameters ---------------------------------
|
||||
|
@ -49,7 +49,7 @@ DefaultNpcAggroDist = 15;
|
|||
DefaultEscortRange = 10;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Aggro //
|
||||
// Aggro //
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
AggroReturnDistCheck = 15.0;
|
||||
AggroReturnDistCheckFauna = 15.0;
|
||||
|
@ -318,7 +318,7 @@ StartCommandsWhenMirrorReadyPost =
|
|||
// commands for Ring continents
|
||||
StartCommandsWhenMirrorReadyRing =
|
||||
{
|
||||
"loadContinent r2_desert",
|
||||
"loadContinent r2_desert",
|
||||
"createDynamicAIInstance 10000",
|
||||
"loadPrimitiveFile dummy.primitive",
|
||||
|
||||
|
|
Loading…
Reference in a new issue