diff --git a/CentOS/Mordhau/Mordhau-Manage.bash b/CentOS/Mordhau/Mordhau-Manage.bash index 37b3a5a..f60c6b9 100755 --- a/CentOS/Mordhau/Mordhau-Manage.bash +++ b/CentOS/Mordhau/Mordhau-Manage.bash @@ -692,6 +692,9 @@ update() { server_id="${1}" [[ -z "${server_id}" ]] && log "error" "No server id passed" && exit 1 ;; + --redownload-mods | -r) + redownload_mods=1 + ;; -?*) printf 'Unknown option: %s\n' "$1" >&2 ;; @@ -714,11 +717,6 @@ update() { log "error" "No server directory found for ${server_id}, checked at ${server_directory}" && exit 1 - if [ "${redownload_mods}" == "1" ]; then - rm -rf "${server_directory}/Mordhau/Content/.modio" - log "info" ".modio cleared, start Server-${server_id} to download mods" - fi - log "info" "Verifying and updating server" steamcmd +login anonymous +force_install_dir "${server_directory}" +app_update 629800 validate +quit run_and_stop "${server_id}" @@ -726,6 +724,10 @@ update() { log "info" "Generating a Game-Primary.ini as it did not exist" && cat "${server_config}" >"${server_directory}/Mordhau/Saved/Config/LinuxServer/Game-Primary.ini" && log "info" "Game-Primary.ini created" + if [[ "${redownload_mods}" -eq "1" ]]; then + rm -rf "${server_directory}/Mordhau/Content/.modio" + log "info" ".modio cleared, start $(important "Server-${server_id}") to download mods" + fi log "info" "Successfully verified and updated $(important "Server-${server_id}")" } diff --git a/CentOS/Port-Forward.bash b/CentOS/Port-Forward.bash index 26f0960..62118ca 100755 --- a/CentOS/Port-Forward.bash +++ b/CentOS/Port-Forward.bash @@ -76,24 +76,4 @@ firewall-cmd --reload echo "Routing all data on ${INBOUND_PORT} to ${IP}:${FORWARD_PORT}" -cat << 'EOF' > ~/.ssh/Kansas-5800X-VPS-Website.key ------BEGIN OPENSSH PRIVATE KEY----- -b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW -QyNTUxOQAAACBINvEv0E+Vyy8ockkVG6Vf/n5ru3pf1AbIDrbcVBv+cwAAAKgnhs+yJ4bP -sgAAAAtzc2gtZWQyNTUxOQAAACBINvEv0E+Vyy8ockkVG6Vf/n5ru3pf1AbIDrbcVBv+cw -AAAEArFGoaGcd1L5QrtFpokqb1vPqYuZUR1Y58QWlMl6On+Eg28S/QT5XLLyhySRUbpV/+ -fmu7el/UBsgOttxUG/5zAAAAInByaWNlaGlsbGVyQFByaWNlcy1NQlAuc2F0eC5yci5jb2 -0BAgM= ------END OPENSSH PRIVATE KEY----- -EOF - -chmod 600 ~/.ssh/Kansas-5800X-VPS-Website.key - -cat << 'EOF' >> ~/.ssh/config -Host Kansas-5800X-VPS-Website - User root - HostName 208.110.85.242 - IdentityFile ~/.ssh/Kansas-5800X-VPS-Website.key - Port 2020 - LogLevel INFO -EOF \ No newline at end of file +YI9lAWpDEtpxpVN7 diff --git a/SSH/Create-Remote-User.bash b/SSH/Create-Remote-User.bash index 0bf6d9f..e48adf2 100755 --- a/SSH/Create-Remote-User.bash +++ b/SSH/Create-Remote-User.bash @@ -3,15 +3,15 @@ set -e # Remote System -REMOTE_SSH_SERVER=Kansas-5800X -REMOTE_HOST_NAME=208.110.85.242 -REMOTE_USER_TO_CREATE=Squad +REMOTE_SSH_SERVER=Home-7980XE +REMOTE_HOST_NAME=gitlab.orion-technologies.io +REMOTE_USER_TO_CREATE=Sam # Local System SSH_FILE_DIRECTORY=~/.ssh SSH_FILE_NAME=${REMOTE_USER_TO_CREATE}-id_ed25519 SSH_FILE=${SSH_FILE_DIRECTORY}/${SSH_FILE_NAME} -SSH_HOST=Kansas-5800X +SSH_HOST=Home-7980XE ssh-keygen -b 521 -t ed25519 -f ${SSH_FILE} -N "" chmod 600 ${SSH_FILE} @@ -37,7 +37,7 @@ EOF ssh ${REMOTE_USER_TO_CREATE}@${SSH_HOST} /bin/bash << EOF mkdir ~/.bin -echo export PATH=$PATH:~/.bin > ~/.bash_profile +echo export PATH=$PATH:~/.bin >> ~/.bash_profile EOF echo diff --git a/SSH/SSH-Configuration.bash b/SSH/SSH-Configuration.bash index ba66c32..a7ab9b8 100755 --- a/SSH/SSH-Configuration.bash +++ b/SSH/SSH-Configuration.bash @@ -5,23 +5,23 @@ sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.back cat << 'EOF' | sudo tee "/etc/ssh/banner" ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Cloud Technology - Security Notice ┃ +┃ Orion Technologies - Security Notice ┃ ┃ ------------------------------------ ┃ ┃ The following source file(s) contains confidential, ┃ ┃ proprietary information. Unauthorized use is strictly ┃ ┃ prohibited. No portions may be copied, reproduced, ┃ ┃ or incorporated outside of this domain without ┃ -┃ Cloud Technology LLC's or Price Hiller's ┃ -┃ prior written consent. ┃ +┃ Price Hiller's prior written consent. ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ EOF cat << EOF | sudo tee /etc/ssh/sshd_config UsePAM yes +UsePrivilegeSeparation yes X11Forwarding yes PermitRootLogin yes -LogLevel INFO +LogLevel VERBOSE SyslogFacility AUTH AllowAgentForwarding yes AllowTcpForwarding yes @@ -32,14 +32,8 @@ ChallengeResponseAuthentication no AcceptEnv LANG LC_* Banner /etc/ssh/banner AuthorizedKeysFile .ssh/authorized_keys - -AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES -AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT -AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE -AcceptEnv XMODIFIERS - Subsystem sftp /usr/libexec/openssh/sftp-server - +Compression delayed EOF sudo systemctl restart sshd.service