Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master' into development

# Conflicts:
#	lgsm/functions/command_backup.sh
#	lgsm/functions/command_start.sh
#	lgsm/functions/command_ts3_server_pass.sh
#	lgsm/functions/install_logs.sh
#	lgsm/functions/install_ut2k4_key.sh
pull/820/merge
Daniel Gibbs 9 years ago
parent
commit
f97922809e
  1. 2
      TeamFortressClassic/tfcserver
  2. 37
      lgsm/functions/command_backup.sh
  3. 2
      lgsm/functions/command_start.sh
  4. 3
      lgsm/functions/command_ts3_server_pass.sh
  5. 3
      lgsm/functions/email.sh
  6. 2
      lgsm/functions/install_logs.sh
  7. 2
      lgsm/functions/install_ut2k4_key.sh

2
TeamFortressClassic/tfcserver

@ -46,7 +46,7 @@ githubbranch="master"
# Steam # Steam
appid="90" appid="90"
appidmos="tfc" appidmod="tfc"
# Server Details # Server Details
servicename="tfc-server" servicename="tfc-server"

37
lgsm/functions/command_backup.sh

@ -2,7 +2,7 @@
# LGSM command_backup.sh function # LGSM command_backup.sh function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://gameservermanagers.com # Website: http://gameservermanagers.com
lgsm_version="271215" lgsm_version="190316"
# Description: Creates a .tar.gz file in the backup directory. # Description: Creates a .tar.gz file in the backup directory.
@ -12,11 +12,7 @@ function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
check.sh check.sh
backupname="${servicename}-$(date '+%Y-%m-%d-%H%M%S')" backupname="${servicename}-$(date '+%Y-%m-%d-%H%M%S')"
echo "" echo ""
echo "${gamename} Backup" fn_printinfonl "A total of $(du -sh "${rootdir}" --exclude="${backupdir}" | awk '{print $1}') will be compressed into the following backup:"
echo "============================"
echo ""
echo "The following backup will be created:"
echo ""
echo "${backupdir}/${backupname}.tar.gz" echo "${backupdir}/${backupname}.tar.gz"
echo "" echo ""
while true; do while true; do
@ -27,10 +23,11 @@ while true; do
* ) echo "Please answer yes or no.";; * ) echo "Please answer yes or no.";;
esac esac
done done
echo ""
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:") tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
if [ "${tmuxwc}" -eq 1 ]; then if [ "${tmuxwc}" -eq 1 ]; then
echo "" echo ""
fn_print_warning_nl "${servicename} is currently running." fn_printwarningnl "${servicename} is currently running."
sleep 1 sleep 1
while true; do while true; do
read -p "Stop ${servicename} while running the backup? [y/N]" yn read -p "Stop ${servicename} while running the backup? [y/N]" yn
@ -41,24 +38,14 @@ if [ "${tmuxwc}" -eq 1 ]; then
esac esac
done done
fi fi
fn_scriptlog "Started" fn_scriptlog "Started backup"
echo -en "starting backup.\r" fn_printdots "Backup in progress, please wait..."
sleep 1 sleep 2
echo -en "starting backup..\r"
sleep 1
echo -en "starting backup...\r"
sleep 1
echo -en "\n"
cd "${rootdir}"
if [ ! -d "${backupdir}" ]; then if [ ! -d "${backupdir}" ]; then
mkdir -v "${backupdir}" mkdir "${backupdir}"
fi fi
tar -cvzf "${backupdir}/${backupname}.tar.gz" --exclude "${backupdir}" ./* tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "backups" ./*
echo "" fn_printoknl "Backup created: ${backupname}.tar.gz is $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}') size"
echo "Backup created: ${backupdir}/${backupname}.tar.gz" fn_scriptlog "Complete, Backup created: ${backupdir}/${backupname}.tar.gz is $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}') size"
fn_scriptlog "Created: ${backupdir}/${backupname}.tar.gz"
sleep 1 sleep 1
echo "" echo ""
fn_print_complete_nl "Complete."
fn_scriptlog "Complete"
echo ""

2
lgsm/functions/command_start.sh

@ -52,7 +52,7 @@ fn_start_teamspeak3(){
date > "${rootdir}/${lockselfname}" date > "${rootdir}/${lockselfname}"
cd "${executabledir}" cd "${executabledir}"
if [ "${ts3serverpass}" == "1" ];then if [ "${ts3serverpass}" == "1" ];then
./ts3server_startscript.sh start serveradmin_password="${newpassword}" ./ts3server_startscript.sh start serveradmin_password="${newpassword}" inifile="${servercfgfullpath}"
else else
./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1 ./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1
fi fi

3
lgsm/functions/command_ts3_server_pass.sh

@ -24,7 +24,7 @@ while true; do
read -e -i "y" -p "Continue? [y/N]" yn read -e -i "y" -p "Continue? [y/N]" yn
case $yn in case $yn in
[Yy]* ) break;; [Yy]* ) break;;
[Nn]* ) echo Exiting; return;; [Nn]* ) echo Exiting; exit;;
* ) echo "Please answer yes or no.";; * ) echo "Please answer yes or no.";;
esac esac
done done
@ -45,6 +45,7 @@ fn_print_info_nl "Starting server with new password"
command_start.sh command_start.sh
# Stop server in "new password mode" # Stop server in "new password mode"
command_stop.sh command_stop.sh
ts3serverpass="0"
fn_print_ok_nl "Password applied" fn_print_ok_nl "Password applied"
fn_scriptlog "New ServerAdmin password applied" fn_scriptlog "New ServerAdmin password applied"
sleep 1 sleep 1

3
lgsm/functions/email.sh

@ -50,9 +50,6 @@ fi
echo -e "\e[34mBackups:\t\e[0m${backupdirdu}" echo -e "\e[34mBackups:\t\e[0m${backupdirdu}"
fi fi
echo -e "" echo -e ""
echo -e "========================================\nCommand-line Parameters\n========================================"
echo -e "${executable} ${parms}"
echo -e ""
echo -e "========================================\nLogs\n========================================" echo -e "========================================\nLogs\n========================================"
}| sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee "${scriptlogdir}/${servicename}-email.log" > /dev/null 2>&1 }| sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee "${scriptlogdir}/${servicename}-email.log" > /dev/null 2>&1
echo -e "\n\n Script log\n===================" >> "${emaillog}" echo -e "\n\n Script log\n===================" >> "${emaillog}"

2
lgsm/functions/install_logs.sh

@ -8,7 +8,7 @@ local modulename="Install"
if [ "${checklogs}" != "1" ]; then if [ "${checklogs}" != "1" ]; then
echo "" echo ""
echo "Creating log directorys" echo "Creating log directories"
echo "=================================" echo "================================="
fi fi
sleep 1 sleep 1

2
lgsm/functions/install_ut2k4_key.sh

@ -12,7 +12,7 @@ echo "================================="
sleep 1 sleep 1
echo "To get your server listed on the Master Server list" echo "To get your server listed on the Master Server list"
echo "you must get a free CD key. Get a key here:" echo "you must get a free CD key. Get a key here:"
echo "http://www.unrealtournament.com/ut2004server/cdkey.php" echo "https://forums.unrealtournament.com/utserver/cdkey.php?2004"
echo "" echo ""
if [ -z "${autoinstall}" ]; then if [ -z "${autoinstall}" ]; then
echo "Once you have the key enter it below" echo "Once you have the key enter it below"

Loading…
Cancel
Save