khanat-code-old/dist/docker/server/debian/common/serverimage_launch_services.sh

100 lines
5.2 KiB
Bash
Raw Permalink Normal View History

#!/bin/bash
#
# Script to launch khaganat
# (see shard.screen.rc)
#
# Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
mkdir -p /home/gameserver/khanat/server/log
cd /home/gameserver/khanat/server/log
function start_stop()
{
nameservice=$1
mkdir -p /home/gameserver/khanat/server/${nameservice}
printf RUNNING > /home/gameserver/khanat/server/${nameservice}/${nameservice}.state
nohup $2
printf STOPPED > /home/gameserver/khanat/server/${nameservice}/${nameservice}.state
}
function launch_service()
{
nameservice=$1
start_stop "$1" "$2" 1>/dev/null 2>&1 &
#nohup $2 1>/dev/null 2>&1 &
#echo "$!" > /home/gameserver/khanat/server/$1.pid
#printf RUNNING > /home/gameserver/khanat/server/${nameservice}/${nameservice}.state
}
# aes : admin_executor_service.log
launch_service 'aes' 'ryzom_admin_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --fulladminname=admin_executor_service --shortadminname=AES'
# bms_master : backup_service.log
launch_service 'bms_master' 'ryzom_backup_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid -P49990'
# bms_pd_master
# launch_service 'bms_pd_master' 'ryzom_backup_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid -P49992'
# egs : entities_game_service.log
launch_service 'egs' 'ryzom_entities_game_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# gpms : gpm_service.log
launch_service 'gpms' 'ryzom_gpm_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# ios : input_output_service.log
launch_service 'ios' 'ryzom_ios_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# rns : naming_service.log
launch_service 'rns' 'ryzom_naming_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# rws : welcome_service.log
launch_service 'rws' 'ryzom_welcome_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# ts : tick_service.log
launch_service 'ts' 'ryzom_tick_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# ms : mirror_service.log
launch_service 'ms' 'ryzom_mirror_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# ais_newbyland : ai_service.log
launch_service 'ais_newbyland' 'ryzom_ai_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid -mCommon:Newbieland:Post'
# mfs : mail_forum_service.log
launch_service 'mfs' 'ryzom_mail_forum_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# su : shard_unifier_service.log
launch_service 'su' 'ryzom_shard_unifier_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# fes : frontend_service.log
launch_service 'fes' 'ryzom_frontend_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# sbs : session_browser_server.log
launch_service 'sbs' 'ryzom_session_browser_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# lgs : logger_service.log
launch_service 'lgs' 'ryzom_logger_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# mos
# launch_service 'mos' 'ryzom_monitor_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# pdss
#launch_service 'pdss' 'ryzom_pd_support_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'
# ras : admin_service.log
launch_service 'ras' 'ryzom_admin_service --fulladminname=admin_service --shortadminname=AS -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid'