#!/bin/bash declare METHOD_START=$1 /etc/init.d/mysql restart /etc/init.d/apache2 restart /etc/init.d/ssh restart source /opt/shard.sh tmp=$(hostname -I) export addressip=${tmp//[[:blank:]]/} sed -i -r 's/(FSListenHost)(.*)(=)(.*)(;)/FSListenHost = "'"$addressip"'";/g' $KHANAT_PATH/server/frontend_service.cfg || exit 2 if [[ $METHOD_START -eq 1 ]] then export RYZOM_PATH=$KHANAT_PATH /home/gameserver/khanat/tools/scripts/linux/shard start elif [[ $METHOD_START -eq 2 ]] then bash /opt/launch_services.sh sleep 10 tail -f /home/gameserver/khanat/server/log/log.log else bash /opt/launch_services.sh sleep 10 watch cat /home/gameserver/khanat/server/aes_nagios_report.txt fi