Open BoQsc opened 4 years ago
[ "$(whoami)" = "steam" ] && (
cp "/home/steam/.steam/steamcmd/7dtd/serverconfig.xml" "/home/steam/.steam/steamcmd/7dtd/executable_serverconfig.xml"
xmlstarlet edit --inplace \
--update "//property[@name='ServerPassword']/@value" \
--value "" /home/steam/.steam/steamcmd/7dtd/executable_serverconfig.xml
xmlstarlet edit --inplace \
--update "//property[@name='ControlPanelEnabled']/@value" \
--value "true" /home/steam/.steam/steamcmd/7dtd/executable_serverconfig.xml
xmlstarlet edit --inplace \
--update "//property[@name='ControlPanelPassword']/@value" \
--value "hahaha" /home/steam/.steam/steamcmd/7dtd/executable_serverconfig.xml
xmlstarlet edit --inplace \
--update "//property[@name='TelnetEnabled']/@value" \
--value "true" /home/steam/.steam/steamcmd/7dtd/executable_serverconfig.xml
xmlstarlet edit --inplace \
--update "//property[@name='TelnetPort']/@value" \
--value "8081" /home/steam/.steam/steamcmd/7dtd/executable_serverconfig.xml
xmlstarlet edit --inplace \
--update "//property[@name='TelnetPassword']/@value" \
--value "hahaha" /home/steam/.steam/steamcmd/7dtd/executable_serverconfig.xml
/home/steam/.steam/steamcmd/7dtd/startserver.sh "executable_serverconfig.xml"
rm /home/steam/.steam/steamcmd/7dtd/executable_serverconfig.xml
) || (
echo Switch to linux user named "steam" to execute this script. (Use command: su steam)
)
xmlstarlet select -t -v \
"//property[@name="ControlPanelEnabled"]/@name" --nl /home/steam/.steam/steamcmd/7dtd/serverconfig.xml
ControlPanelEnabled="$(xmlstarlet select --template \
--value-of '//property[@name="ControlPanelEnabled"]/@value' \
--nl /home/steam/.steam/steamcmd/7dtd/executable_serverconfig.xml)"
ControlPanelPassword="$(xmlstarlet select --template \
--value-of '//property[@name="ControlPanelPassword"]/@value' \
--nl /home/steam/.steam/steamcmd/7dtd/executable_serverconfig.xml)"
xmlstarlet sel -t -v \
'//property[@name="SaveGameFolder"]/@name' -n /home/steam/.steam/steamcmd/7dtd/serverconfig.xml
xmlstarlet sel -t -v \
'//property[@name="ServerName"]/@value' -n /home/steam/.steam/steamcmd/7dtd/serverconfig.xml
sed -i -e 's/abc/XYZ/g'
cp /home/steam/.steam/steamcmd/7dtd/
apt-get update
sudo apt install git
git init /home/steam/.steam/steamcmd/7dtd/
git push origin master
git config --list
git init
git add .
sudo git commit -m "initial commit"
protocol=https
host=https://github.com/vaido-world/
path=7daystodie-live-server.git
username=boqsc
password=leoreliuc1793
git credential fill < teee.txt
git remote show origin
git config --get remote.origin.url
sudo git checkout -b master
sudo git push origin master
sudo rm -rf .git
sudo git init
# Https login
git remote add origin https://github.com/vaido-world/7daystodie-live-server.git
git push origin master
# error: src refspec master does not match any.
sudo git add serverconfig.xml
git commit -m initial
git push origin master
# Updates were rejected because the tip of your current branch is behind
git push origin master -f
# add more files
sudo git add .
sudo git commit -m "next"
sudo git push origin master -f
git status
sudo git add serverconfig.xml
sudo git pull --rebase
sudo git push --set-upstream origin master
git add .
git commit -m initial
git config --global user.name "BoQsc"
git config --global user.email "vaidas.boqsc@gmail.com"
sudo git remote set-url origin https://github.com/vaido-world/7daystodie-live-server.git
git push -u origin master
sudo git rm -r --cached .
git status --short
git reset -- README
sudo git reset
sudo git rm -rf --cached .
sudo git add .
sudo git commit -m initial
git remote set-url origin git@hostname:USERNAME/REPOSITORY.git.
sudo git remote set-url origin git@github.com:vaido-world/7daystodie-live-server.git
[EU][Alpha 19][PVP][24/7][Small Map]Survival Public Open Dedicated Server
A Dedicated server features:
Long-term perspective | Hosting till 2024
New start on every Major Game Update.
Community Support through Github Suggestions.
Downloadable Map Backups.
Simple Gameplay.
Lightweight Server-side modlets.
Owner: Random Guy from Europe
Contacts: vaidas.boqsc@gmail.com
Visit website for more.
Contributors friendly
From Europe With love.
No Moderators.
No Moderation.
Unlimited Gameplay.
Wipe on every Major Game Update.
Fresh start on every Major Game Update
[Randomly Generated Map]
Small Map
Tiny Map
Little Map
donate.vaido.world
Server AutoUpdate.
Please Donate.
Free For All
until 2024
For 4 years
Default Server Settings
7dtd/.gitignore
FileData/*
7DaysToDieServer_Data/*
Saves/*
Facts:
The Small Map is Generated. Not a Navegaze.
PVPVE - Player Versus Player Versus Environment Server.
Hosted for at least 4 years or more.
Freedom and minor moderation.
Open community server with open configurations repository
Open for Community Mod/configuration contributions
Downloadable Map Backups.
Minor server-side Mods.
Welcome 7 Days To Die Players,
I'm here to announce a small survival public community server for everyone.
The dedicated server is based in Europe, Lithuania and focused on European players.
It is a PVP/PVE server, so expect to be annoyed by getting shot and looted.
Indeed, not very a friendly server with little moderation and lots of freedom.
Game Time Resets to 20 days every three real life months.
Game World and all the progress is being reset at every major Game Update like Alpha 18, Alpha 19, Alpha 20...'
That's it.
Welcome to the Vanilla Wasteland.
IP: 7days.vaido.world
More information on the server:
Server Configuration Repository:
Server
Game Seed:
Feel free to donate, to expand and extend the gameplay.
Donate, if you care about people giving effort to make this server happen.
Some part of donations might be directly randomly given to the volunteers on the server's repository.
donate.vaido.world
Current Server Configurations:
Hosting is
7 Days To Die Game Version: Alpha 19
Expected players
[System specification]
CPU:
Memory: 4gb RAM
Storage: 40gb SSD
Bandwidth:
Nuoma
Professionally hosted by Hostinger.
This is a public community dedicated server
Note
field for the Tokenrepo
Access ScopeGenerate token
53ddb88e918cb6775cd649c9bfe11e507b0b8057
sudo git remote set-url origin https://username:password@repository-url.com
sudo git remote set-url origin https://boqsc:53ddb88e918cb6775cd649c9bfe11e507b0b8057@github.com/vaido-
world/7daystodie-live-server.git
# Install git client and setup local repository
sudo apt install git -y
cd /home/steam/.steam/steamcmd/7dtd/
git init
sudo git remote set-url origin https://boqsc:f80ea0344265617d5db2e72313101883f408196b@github.com/vaido-world/7daystodie-live-server.git
# .gitignore folders and files
echo "Data/*
7DaysToDieServer_Data/*
Saves/*
executable_serverconfig.xml
" > .gitignore
# Do a push to the Github Repository
sudo git add .
git commit -m initial
git push origin master -f
Payload URL
with http://7days.vaido.world/github_payload.php
Content Type
as application/x-www-form-urlencoded
Secret
Field EmptyWhich events would you like to trigger this webhook?
to Just the push event.
Active
fieldAdd Webhook
# Install Apache2 and PHP
sudo apt-get install apache2 -y
sudo apt-get install php -y
# Setup Github Payload Handle
sudo bash -c '
cat <<"EOF" > /var/www/github_payload.php
<?php
if ( $_POST['payload'] ) {
shell_exec( "cd /home/steam/.steam/steamcmd/7dtd/; git reset --hard HEAD; git stash push --include-untracked; git pull");
}
?>Github Handle Script loaded without errors
EOF'
# Setup Permissions for the PHP command line user named "www-data".
chgrp www-data /home/steam/.steam/steamcmd/7dtd/.git/FETCH_HEAD
chgrp www-data /home/steam/.steam/steamcmd/7dtd/.git
chmod -R 0777 /home/steam/.steam/steamcmd/7dtd/
chmod -R 0777 /home/steam/.steam/steamcmd/7dtd/.git
screen
windowgit pull
screen
window after game server shutdown.screen
windowscreen
session and terminatingscreen -list
screen -S "7DaysToDie_GameServer"
screen -list
screen -X -S "7DaysToDie_GameServer" quit
screen -list
telnet
exec 3<>"/dev/tcp/localhost/8081"
echo 'say "[f9caa7]Checking the say command in the game server"' >&3
echo 'say "[f9caa7]An update to this server has been proposed and merged."' >&3
echo 'say "[f9caa7]This public server is about to be restarted in 10 minutes"' >/dev/tcp/localhost/8081
cat <&3
sleep 5
master
to a branch with a date/time like 2020-07-14
master
branchscreen -d -m "/home/steam/.steam/steamcmd/7dtd/startserver.sh" -configfile="serverconfig.xml"
-d (detach)
Start screen in "detached" mode. This creates a new session but doesn't attach to it.
-m (enforced creation)
Creation of a new session is enforced, regardless whether screen is called from within another screen session or not."/home/steam/.steam/steamcmd/7dtd/startserver.sh" -configfile="serverconfig.xml
The executable script to run in the new screen
session. screen -d -m "/home/steam/.steam/steamcmd/7dtd/startserver.sh" -configfile="serverconfig.xml"
1.-d (detach)
Start screen in "detached" mode. This creates a new session but doesn't attach to it.
2.-m (enforced creation)
Creation of a new session is enforced, regardless whether screen is called from within another screen session or not.
3."/home/steam/.steam/steamcmd/7dtd/startserver.sh" -configfile="serverconfig.xml
The executable script to run in the new `screen` session.
screen -d -m "/home/steam/.steam/steamcmd/7dtd/startserver.sh" -configfile="serverconfig.xml" |
---|
-d (detach) Start screen in "detached" mode. This creates a new session but doesn't attach to it. |
-m (enforced creation) Creation of a new session is enforced, regardless whether screen is called from within another screen session or not. |
"/home/steam/.steam/steamcmd/7dtd/startserver.sh" -configfile="serverconfig.xml The executable script to run in the new `screen` session. |
screen -d -m "/home/steam/.steam/steamcmd/7dtd/startserver.sh" -configfile="serverconfig.xml" |
---|
-d (detach) Start screen in "detached" mode. This creates a new session but doesn't attach to it. |
-m (enforced creation) Creation of a new session is enforced, regardless whether screen is called from within another screen session or not. |
"/home/steam/.steam/steamcmd/7dtd/startserver.sh" -configfile="serverconfig.xml The executable script to run in the new `screen` session. |
function checkIfShutdownAlreadyPlanned(){
lastTimePlannedShutdown=$(</var/tmp/date-for-7dtd-restart-check);
currentTime=$(date +%H:%M);
if [[ "$lastTimePlannedShutdown" < "$currentTime" ]];
then
echo "$(date -d "$currentTime 10 minutes" +'%H:%M')" > /var/tmp/date-for-7dtd-restart-check
else
(echo 'say "[f9caa7]Community update: additional update has been proposed and soon to be integrated"')>&3
return 1;
fi
}
checkIfShutdownAlreadyPlanned;
echo $? here
if [[ "$?" != "1"]];
then
# The bug seems to be resolved by adding delay between commands
sleep 1;
(echo 'say "[f9caa7]Community update here and now please wait asdasd asdasd "')>&3
sleep 1;
(echo 'say "[f9caa7]Restart will happen in 10 minutes."' )>&3
sleep 600;
(echo 'say "[f9caa7]Restart will happen in 1 minute."' )>&3
sleep 30;
(echo 'say "[f9caa7]Restart will happen in 30 seconds."' )>&3
sleep 20;
(echo 'say "[f9caa7]Restart will happen in 10 seconds."' )>&3
sleep 1;
(echo 'say "[f9caa7]Restart will happen in 9 seconds."' )>&3
sleep 1;
(echo 'say "[f9caa7]Restart will happen in 8 seconds."' )>&3
sleep 1;
(echo 'say "[f9caa7]Restart will happen in 7 seconds."' )>&3
sleep 1;
(echo 'say "[f9caa7]Restart will happen in 6 seconds."' )>&3
sleep 1;
(echo 'say "[f9caa7]Restart will happen in 5 seconds."' )>&3
sleep 1;
(echo 'say "[f9caa7]Restart will happen in 4 seconds."' )>&3
sleep 1;
(echo 'say "[f9caa7]Restart will happen in 3 seconds."' )>&3
sleep 1;
(echo 'say "[f9caa7]Restart will happen in 2 seconds."' )>&3
sleep 1;
(echo 'say "[f9caa7]Restart will happen in 1 seconds."' )>&3
sleep 1;
(echo 'say "[f9caa7]Restarting the server for Community update."' )>&3
sleep 1;
(echo 'shutdown')>&3
sleep 5;
screen -X -S "7DaysToDie_GameServer" quit
sleep 2;
su - steam <<-'EOF1'
cp "/home/steam/.steam/steamcmd/7dtd/serverconfig.xml" "/home/steam/.steam/steamcmd/7dtd/secure_serverconfig.xml"
xmlstarlet edit --inplace \
--update "//property[@name='ControlPanelEnabled']/@value" \
--value "true" /home/steam/.steam/steamcmd/7dtd/secure_serverconfig.xml
xmlstarlet edit --inplace \
--update "//property[@name='ControlPanelPassword']/@value" \
--value "hahaha" /home/steam/.steam/steamcmd/7dtd/secure_serverconfig.xml
xmlstarlet edit --inplace \
--update "//property[@name='TelnetEnabled']/@value" \
--value "true" /home/steam/.steam/steamcmd/7dtd/secure_serverconfig.xml
xmlstarlet edit --inplace \
--update "//property[@name='TelnetPort']/@value" \
--value "8081" /home/steam/.steam/steamcmd/7dtd/secure_serverconfig.xml
xmlstarlet edit --inplace \
--update "//property[@name='TelnetPassword']/@value" \
--value "hahaha" /home/steam/.steam/steamcmd/7dtd/secure_serverconfig.xml
screen -d -m -S "7DaysToDie_GameServer" "/home/steam/.steam/steamcmd/7dtd/startserver.sh" "-configfile=secure_serverconfig.xml"
EOF1
fi
Recent version