diff --git a/CentOS/Arma/Arma-Connect-Server.bash b/CentOS/Arma/Arma-Connect-Server.bash index 0b67b87..023efe0 100755 --- a/CentOS/Arma/Arma-Connect-Server.bash +++ b/CentOS/Arma/Arma-Connect-Server.bash @@ -1,11 +1,6 @@ #!/bin/bash --posix -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + set -e diff --git a/CentOS/Arma/Arma-Open-Ports.bash b/CentOS/Arma/Arma-Open-Ports.bash index 7931599..a41e59d 100755 --- a/CentOS/Arma/Arma-Open-Ports.bash +++ b/CentOS/Arma/Arma-Open-Ports.bash @@ -1,11 +1,6 @@ #!/bin/bash --posix -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + # To add additional ports for Arma you need to have 5 ports open as a range # Arma offsets from the first port and increments upwards until 5 ports are open diff --git a/CentOS/Arma/Arma-Start-Server.bash b/CentOS/Arma/Arma-Start-Server.bash index bbd8ad9..75468fd 100755 --- a/CentOS/Arma/Arma-Start-Server.bash +++ b/CentOS/Arma/Arma-Start-Server.bash @@ -1,11 +1,6 @@ #!/bin/bash --posix -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + usage() { printf "%s\n" \ diff --git a/CentOS/Arma/Mods/Arma-Install-Mod.bash b/CentOS/Arma/Mods/Arma-Install-Mod.bash index 532424e..34dae35 100755 --- a/CentOS/Arma/Mods/Arma-Install-Mod.bash +++ b/CentOS/Arma/Mods/Arma-Install-Mod.bash @@ -1,11 +1,6 @@ #!/bin/bash --posix -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + set +e diff --git a/CentOS/Minecraft/Minecraft-Connect-Server.bash b/CentOS/Minecraft/Minecraft-Connect-Server.bash index 93d86b2..050bcac 100755 --- a/CentOS/Minecraft/Minecraft-Connect-Server.bash +++ b/CentOS/Minecraft/Minecraft-Connect-Server.bash @@ -1,12 +1,5 @@ #!/bin/bash --posix -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# - set -e usage() { diff --git a/CentOS/Minecraft/Minecraft-Open-Ports.bash b/CentOS/Minecraft/Minecraft-Open-Ports.bash index 8023ba3..c90afed 100755 --- a/CentOS/Minecraft/Minecraft-Open-Ports.bash +++ b/CentOS/Minecraft/Minecraft-Open-Ports.bash @@ -1,13 +1,5 @@ #!/bin/bash --posix - -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# - ### Minecraft Ports ### # Game ports 12000 - 12099 # Query ports 12100 - 12199 diff --git a/CentOS/Minecraft/Minecraft-Start-Server.bash b/CentOS/Minecraft/Minecraft-Start-Server.bash index ddf072e..07f4187 100755 --- a/CentOS/Minecraft/Minecraft-Start-Server.bash +++ b/CentOS/Minecraft/Minecraft-Start-Server.bash @@ -1,11 +1,5 @@ #!/bin/bash -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# ### CONSTANTS ### diff --git a/CentOS/Minecraft/Minecraft-Stop-Server.bash b/CentOS/Minecraft/Minecraft-Stop-Server.bash index 11b72da..01b09f5 100755 --- a/CentOS/Minecraft/Minecraft-Stop-Server.bash +++ b/CentOS/Minecraft/Minecraft-Stop-Server.bash @@ -1,11 +1,6 @@ #!/bin/bash -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + set -e diff --git a/CentOS/Squad/Squad-Connect-Server.bash b/CentOS/Squad/Squad-Connect-Server.bash index ad3569a..29004d4 100755 --- a/CentOS/Squad/Squad-Connect-Server.bash +++ b/CentOS/Squad/Squad-Connect-Server.bash @@ -1,12 +1,5 @@ #!/bin/bash --posix -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# - set -e usage() { diff --git a/CentOS/Squad/Squad-Install-Server.bash b/CentOS/Squad/Squad-Install-Server.bash index 2d6412e..41d2f75 100755 --- a/CentOS/Squad/Squad-Install-Server.bash +++ b/CentOS/Squad/Squad-Install-Server.bash @@ -1,13 +1,6 @@ #!/bin/bash -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# - echo_rgb() { # Echo a colored string to the terminal based on rgb values # diff --git a/CentOS/Squad/Squad-Open-Ports.bash b/CentOS/Squad/Squad-Open-Ports.bash index c209748..2c8d328 100755 --- a/CentOS/Squad/Squad-Open-Ports.bash +++ b/CentOS/Squad/Squad-Open-Ports.bash @@ -1,11 +1,5 @@ #!/bin/bash -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# - firewall-cmd --zone=public --add-port=13000-13299/tcp --permanent +firewall-cmd --zone=public --add-port=13000-13299/udp --permanent firewall-cmd --reload \ No newline at end of file diff --git a/CentOS/Squad/Squad-Start-Server.bash b/CentOS/Squad/Squad-Start-Server.bash index bbec20d..7a0f801 100755 --- a/CentOS/Squad/Squad-Start-Server.bash +++ b/CentOS/Squad/Squad-Start-Server.bash @@ -1,12 +1,5 @@ #!/bin/bash -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# - ### PORTS ### # GAME PORT RANGE: 13000-13099 # QUERY PORT RANGE: 13100-13199 @@ -295,12 +288,17 @@ log "info" "Updating $(important "Squad-Server-${server_id}")'s RCON config" # Update the password, since sed is PIA in regards to base64 & raw strings we fix this one up line by line while read -r line do - # Overwrites the password - echo "${line//Password=*/Password="${rcon_password}"}" - # Overwrites the rcon port - echo "${line//Port=*/Port="${rcon_port}"}" + if [[ "${line}" == Password=* ]]; then + # Overwrites the password + echo "${line//Password=*/Password="${rcon_password}"}" + elif [[ "${line}" == Port=* ]]; then + # Overwrites the rcon port + echo "${line//Port=*/Port="${rcon_port}"}" + else + echo "${line}" + fi done < "${squad_rcon_config}" > "rcon.temp" && mv "rcon.temp" "${squad_rcon_config}" log "info" "Successfully updated RCON config" @@ -315,8 +313,8 @@ log "info" \ -LOG")" # Kick off a new tmux session containing the Squad Server -tmux new-session -d -s "Squad-Server-${server_id}" \ - "${squad_start_script}" -Port="${game_port}" -QueryPort="${query_port}" -FIXEDMAXTICKRATE="${TICK_RATE}" \ +echo | tmux new-session -d -s "Squad-Server-${server_id}" \ + "${squad_start_script}" -Port="${game_port}" -QueryPort="${query_port}" -FIXEDMAXTICKRATE="${TICK_RATE}" \ -USEALLAVILABLECORES -LOG && log "info" \ "Started Squad-Server-${server_id} with the following ports: diff --git a/CentOS/Squad/Squad-Stop-Server.bash b/CentOS/Squad/Squad-Stop-Server.bash index cd7f38c..69e0eac 100755 --- a/CentOS/Squad/Squad-Stop-Server.bash +++ b/CentOS/Squad/Squad-Stop-Server.bash @@ -1,12 +1,5 @@ #!/bin/bash -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# - set -e usage() { diff --git a/SSH/Create-Remote-User.bash b/SSH/Create-Remote-User.bash index 75c63a6..426efdc 100755 --- a/SSH/Create-Remote-User.bash +++ b/SSH/Create-Remote-User.bash @@ -5,15 +5,15 @@ set -e # Remote System REMOTE_SSH_SERVER=Kansas-5800X REMOTE_HOST_NAME=208.110.85.242 -REMOTE_USER_TO_CREATE=Arma +REMOTE_USER_TO_CREATE=Squad # Local System SSH_FILE_DIRECTORY=~/.ssh -SSH_FILE_NAME=${REMOTE_USER_TO_CREATE}-id_edcsa +SSH_FILE_NAME=${REMOTE_USER_TO_CREATE}-id_ed25519 SSH_FILE=${SSH_FILE_DIRECTORY}/${SSH_FILE_NAME} SSH_HOST=Kansas-5800X -ssh-keygen -b 521 -t ECDSA -f ${SSH_FILE} -N "" +ssh-keygen -b 521 -t ed25519 -f ${SSH_FILE} -N "" chmod 600 ${SSH_FILE} PUB_KEY_CONTENTS=$(cat ${SSH_FILE}.pub) diff --git a/Templates/Functions/Arg-Parsing.bash b/Templates/Functions/Arg-Parsing.bash index 9e0e582..61b0cc5 100755 --- a/Templates/Functions/Arg-Parsing.bash +++ b/Templates/Functions/Arg-Parsing.bash @@ -1,11 +1,6 @@ #!/bin/bash --posix -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + usage() { # Print out usage instructions for the local script diff --git a/Templates/Functions/Check-Root.bash b/Templates/Functions/Check-Root.bash index 8eeb073..c218c33 100755 --- a/Templates/Functions/Check-Root.bash +++ b/Templates/Functions/Check-Root.bash @@ -1,12 +1,7 @@ #!/bin/bash -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + check_root() { [[ "$(id -u)" = 0 ]] || (echo "Root permissions required, exiting" && exit 1) diff --git a/Templates/Functions/Confirmation.bash b/Templates/Functions/Confirmation.bash index a7a1cb3..058de12 100755 --- a/Templates/Functions/Confirmation.bash +++ b/Templates/Functions/Confirmation.bash @@ -1,11 +1,6 @@ #!/bin/bash -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + confirmation() { # Receive confirmation from user as y, Y, n, or N diff --git a/Templates/Functions/Logging/Logging-RGB.bash b/Templates/Functions/Logging/Logging-RGB.bash index ce3375d..8cb6069 100755 --- a/Templates/Functions/Logging/Logging-RGB.bash +++ b/Templates/Functions/Logging/Logging-RGB.bash @@ -1,11 +1,6 @@ #!/bin/bash -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + echo_rgb() { # Echo a colored string to the terminal based on rgb values diff --git a/Templates/Functions/Logging/Logging.bash b/Templates/Functions/Logging/Logging.bash index df28d00..359589e 100755 --- a/Templates/Functions/Logging/Logging.bash +++ b/Templates/Functions/Logging/Logging.bash @@ -1,11 +1,6 @@ #!/bin/bash --posix -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + set -e diff --git a/Templates/Functions/RGB-Terminal-Colors.bash b/Templates/Functions/RGB-Terminal-Colors.bash index ab51999..e723952 100755 --- a/Templates/Functions/RGB-Terminal-Colors.bash +++ b/Templates/Functions/RGB-Terminal-Colors.bash @@ -1,11 +1,6 @@ #!/bin/bash -# Copyright 2021, Price Hiller - All Rights Reserved -# -# Copying, distribution, usage, or modification of this file or the following source code, via any -# method is strictly prohibited without the explicit written consent of Price Hiller (philler3138@gmail.com) -# The following file contains proprietary and confidential content -# + rgb () { # Echo a color printf to the terminal awaiting an actual echo to be colored