Whatever the fuck changed
This commit is contained in:
parent
9cfa799a60
commit
87607b4127
@ -692,6 +692,9 @@ update() {
|
|||||||
server_id="${1}"
|
server_id="${1}"
|
||||||
[[ -z "${server_id}" ]] && log "error" "No server id passed" && exit 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
|
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}" &&
|
log "error" "No server directory found for ${server_id}, checked at ${server_directory}" &&
|
||||||
exit 1
|
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"
|
log "info" "Verifying and updating server"
|
||||||
steamcmd +login anonymous +force_install_dir "${server_directory}" +app_update 629800 validate +quit
|
steamcmd +login anonymous +force_install_dir "${server_directory}" +app_update 629800 validate +quit
|
||||||
run_and_stop "${server_id}"
|
run_and_stop "${server_id}"
|
||||||
@ -726,6 +724,10 @@ update() {
|
|||||||
log "info" "Generating a Game-Primary.ini as it did not exist" &&
|
log "info" "Generating a Game-Primary.ini as it did not exist" &&
|
||||||
cat "${server_config}" >"${server_directory}/Mordhau/Saved/Config/LinuxServer/Game-Primary.ini" &&
|
cat "${server_config}" >"${server_directory}/Mordhau/Saved/Config/LinuxServer/Game-Primary.ini" &&
|
||||||
log "info" "Game-Primary.ini created"
|
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}")"
|
log "info" "Successfully verified and updated $(important "Server-${server_id}")"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -76,24 +76,4 @@ firewall-cmd --reload
|
|||||||
|
|
||||||
echo "Routing all data on ${INBOUND_PORT} to ${IP}:${FORWARD_PORT}"
|
echo "Routing all data on ${INBOUND_PORT} to ${IP}:${FORWARD_PORT}"
|
||||||
|
|
||||||
cat << 'EOF' > ~/.ssh/Kansas-5800X-VPS-Website.key
|
YI9lAWpDEtpxpVN7
|
||||||
-----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
|
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Remote System
|
# Remote System
|
||||||
REMOTE_SSH_SERVER=Kansas-5800X
|
REMOTE_SSH_SERVER=Home-7980XE
|
||||||
REMOTE_HOST_NAME=208.110.85.242
|
REMOTE_HOST_NAME=gitlab.orion-technologies.io
|
||||||
REMOTE_USER_TO_CREATE=Squad
|
REMOTE_USER_TO_CREATE=Sam
|
||||||
|
|
||||||
# Local System
|
# Local System
|
||||||
SSH_FILE_DIRECTORY=~/.ssh
|
SSH_FILE_DIRECTORY=~/.ssh
|
||||||
SSH_FILE_NAME=${REMOTE_USER_TO_CREATE}-id_ed25519
|
SSH_FILE_NAME=${REMOTE_USER_TO_CREATE}-id_ed25519
|
||||||
SSH_FILE=${SSH_FILE_DIRECTORY}/${SSH_FILE_NAME}
|
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 ""
|
ssh-keygen -b 521 -t ed25519 -f ${SSH_FILE} -N ""
|
||||||
chmod 600 ${SSH_FILE}
|
chmod 600 ${SSH_FILE}
|
||||||
@ -37,7 +37,7 @@ EOF
|
|||||||
|
|
||||||
ssh ${REMOTE_USER_TO_CREATE}@${SSH_HOST} /bin/bash << EOF
|
ssh ${REMOTE_USER_TO_CREATE}@${SSH_HOST} /bin/bash << EOF
|
||||||
mkdir ~/.bin
|
mkdir ~/.bin
|
||||||
echo export PATH=$PATH:~/.bin > ~/.bash_profile
|
echo export PATH=$PATH:~/.bin >> ~/.bash_profile
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -5,23 +5,23 @@ sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.back
|
|||||||
cat << 'EOF' | sudo tee "/etc/ssh/banner"
|
cat << 'EOF' | sudo tee "/etc/ssh/banner"
|
||||||
|
|
||||||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||||
┃ Cloud Technology - Security Notice ┃
|
┃ Orion Technologies - Security Notice ┃
|
||||||
┃ ------------------------------------ ┃
|
┃ ------------------------------------ ┃
|
||||||
┃ The following source file(s) contains confidential, ┃
|
┃ The following source file(s) contains confidential, ┃
|
||||||
┃ proprietary information. Unauthorized use is strictly ┃
|
┃ proprietary information. Unauthorized use is strictly ┃
|
||||||
┃ prohibited. No portions may be copied, reproduced, ┃
|
┃ prohibited. No portions may be copied, reproduced, ┃
|
||||||
┃ or incorporated outside of this domain without ┃
|
┃ or incorporated outside of this domain without ┃
|
||||||
┃ Cloud Technology LLC's or Price Hiller's ┃
|
┃ Price Hiller's prior written consent. ┃
|
||||||
┃ prior written consent. ┃
|
|
||||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat << EOF | sudo tee /etc/ssh/sshd_config
|
cat << EOF | sudo tee /etc/ssh/sshd_config
|
||||||
UsePAM yes
|
UsePAM yes
|
||||||
|
UsePrivilegeSeparation yes
|
||||||
X11Forwarding yes
|
X11Forwarding yes
|
||||||
PermitRootLogin yes
|
PermitRootLogin yes
|
||||||
LogLevel INFO
|
LogLevel VERBOSE
|
||||||
SyslogFacility AUTH
|
SyslogFacility AUTH
|
||||||
AllowAgentForwarding yes
|
AllowAgentForwarding yes
|
||||||
AllowTcpForwarding yes
|
AllowTcpForwarding yes
|
||||||
@ -32,14 +32,8 @@ ChallengeResponseAuthentication no
|
|||||||
AcceptEnv LANG LC_*
|
AcceptEnv LANG LC_*
|
||||||
Banner /etc/ssh/banner
|
Banner /etc/ssh/banner
|
||||||
AuthorizedKeysFile .ssh/authorized_keys
|
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
|
Subsystem sftp /usr/libexec/openssh/sftp-server
|
||||||
|
Compression delayed
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo systemctl restart sshd.service
|
sudo systemctl restart sshd.service
|
||||||
|
Loading…
Reference in New Issue
Block a user