forked from DeathByDenim/gameserver
Apparently Unvanquished is written with a q
This commit is contained in:
parent
1a1d35419a
commit
5b3e32f7f2
|
@ -49,7 +49,7 @@ cp console2web/console2web.py /usr/bin/console2web
|
|||
"$(dirname "$0")"/scripts/deploy_openhv.sh
|
||||
"$(dirname "$0")"/scripts/deploy_openspades.sh
|
||||
"$(dirname "$0")"/scripts/deploy_teeworlds.sh
|
||||
"$(dirname "$0")"/scripts/deploy_unvanguished.sh
|
||||
"$(dirname "$0")"/scripts/deploy_unvanquished.sh
|
||||
"$(dirname "$0")"/scripts/deploy_xonotic.sh
|
||||
|
||||
# Web dashboard
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Unvanguished
|
||||
# Unvanquished
|
||||
unvanquished_directory="/opt/unvanquished-${unvanquished_version}"
|
||||
curl --location "https://github.com/Unvanquished/Unvanquished/releases/download/v${unvanquished_version}/unvanquished_${unvanquished_version}.zip" > ${TMPDIR:-/tmp}/unvanquished.zip
|
||||
unzip -o -f -d ${TMPDIR:-/tmp} ${TMPDIR:-/tmp}/unvanquished.zip
|
||||
|
@ -13,9 +13,9 @@ fi
|
|||
mv ${TMPDIR:-/tmp}/unvanquished*/pkg ${unvanquished_directory}/share
|
||||
rm -rf ${TMPDIR:-/tmp}/unvanquished*
|
||||
|
||||
mkdir -p ${systemuserhome}/unvanguished_home/config
|
||||
cat > ${systemuserhome}/unvanguished_home/config/unvanguished.cfg <<EOF
|
||||
set server.private 1
|
||||
mkdir -p ${systemuserhome}/unvanquished_home/config
|
||||
cat > ${systemuserhome}/unvanquished_home/config/unvanquished.cfg <<EOF
|
||||
set server.private 1
|
||||
set g_needpass 0
|
||||
set sv_hostname "^NUnvanquished ^3onFOSS-LAN"
|
||||
set g_motd "^2get news on ^5${LINODE_ID}"
|
||||
|
@ -28,15 +28,15 @@ set g_mapConfigs "map"
|
|||
set g_initialMapRotation rotation1
|
||||
map yocto
|
||||
EOF
|
||||
chown -R ${systemuser}: ${systemuserhome}/unvanguished_home
|
||||
chown -R ${systemuser}: ${systemuserhome}/unvanquished_home
|
||||
|
||||
cat > /etc/systemd/system/unvanguished.service <<EOF
|
||||
cat > /etc/systemd/system/unvanquished.service <<EOF
|
||||
[Unit]
|
||||
Description=Unvanguished server
|
||||
Description=Unvanquished server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/console2web -p 62549 ${unvanquished_directory}/bin/daemonded -pakpath ${unvanquished_directory}/share/pkg/ -libpath ${unvanquished_directory}/bin/ -homepath \${HOME}/unvanguished_home/ +exec unvanguished.cfg
|
||||
ExecStart=/usr/bin/console2web -p 62549 ${unvanquished_directory}/bin/daemonded -pakpath ${unvanquished_directory}/share/pkg/ -libpath ${unvanquished_directory}/bin/ -homepath \${HOME}/unvanquished_home/ +exec unvanquished.cfg
|
||||
Restart=on-failure
|
||||
User=${systemuser}
|
||||
|
||||
|
@ -45,7 +45,6 @@ WantedBy=multi-user.target
|
|||
EOF
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now unvanguished.service
|
||||
systemctl enable --now unvanquished.service
|
||||
|
||||
firewall-cmd --zone=public --add-port=27960/udp --permanent
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
<link rel="stylesheet" href="css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="css/terminal.css">
|
||||
<script src="js/terminalcolors.js" charset="utf-8"></script>
|
||||
<script src="js/unvanguished.js" charset="utf-8"></script>
|
||||
<script src="js/unvanquished.js" charset="utf-8"></script>
|
||||
<script src="js/mindustry.js" charset="utf-8"></script>
|
||||
<script src="js/xonotic.js" charset="utf-8"></script>
|
||||
</head>
|
||||
|
@ -36,11 +36,11 @@
|
|||
</div>
|
||||
<form id="mindustry_form" onsubmit="return false;"><input id="mindustry_command" size="80" autocomplete="off"></input><button id="mindustry_submit">Enter</button></form>
|
||||
|
||||
<h4>Unvanguished</h4>
|
||||
<div id="unvanguished_output">
|
||||
<p>Unvanguished console</p>
|
||||
<h4>Unvanquished</h4>
|
||||
<div id="unvanquished_output">
|
||||
<p>Unvanquished console</p>
|
||||
</div>
|
||||
<form id="unvanguished_form" onsubmit="return false;"><input id="unvanguished_command" size="80" autocomplete="off"></input><button id="unvanguished_submit">Enter</button></form>
|
||||
<form id="unvanquished_form" onsubmit="return false;"><input id="unvanquished_command" size="80" autocomplete="off"></input><button id="unvanquished_submit">Enter</button></form>
|
||||
|
||||
<h4>Xonotic</h4>
|
||||
<div id="xonotic_output">
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
text-shadow: 0;
|
||||
}
|
||||
|
||||
#unvanguished_output {
|
||||
#unvanquished_output {
|
||||
border: solid grey;
|
||||
background-color: var(--terminal-color-background);
|
||||
width: min(95%, 1024px);
|
||||
|
@ -66,7 +66,7 @@
|
|||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
#unvanguished_output p {
|
||||
#unvanquished_output p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: monospace;
|
||||
|
@ -77,11 +77,11 @@
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
#unvanguished_command {
|
||||
#unvanquished_command {
|
||||
width: calc(min(95%, 1024px) - 10em);
|
||||
}
|
||||
|
||||
#unvanguished_submit {
|
||||
#unvanquished_submit {
|
||||
width: 10em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<li>OpenSpades (<a href="https://github.com/yvt/openspades/releases">download</a>)</li>
|
||||
<li>SuperTuxKart (<a href="https://supertuxkart.net/Download">download</a>)</li>
|
||||
<li>Teeworlds (<a href="https://www.teeworlds.com/?page=downloads">download</a>)</li>
|
||||
<li>Unvanguished (<a href="https://unvanquished.net/download/">download</a>)</li>
|
||||
<li>Unvanquished (<a href="https://unvanquished.net/download/">download</a>)</li>
|
||||
<li>Xonotic (<a href="https://xonotic.org/download/">download</a>)</li>
|
||||
</ul>
|
||||
<p>Enjoy!</p>
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
function unvanguished_init() {
|
||||
const command_form = document.getElementById('unvanguished_form');
|
||||
const command_input = document.getElementById('unvanguished_command');
|
||||
function unvanquished_init() {
|
||||
const command_form = document.getElementById('unvanquished_form');
|
||||
const command_input = document.getElementById('unvanquished_command');
|
||||
|
||||
// Connect the command submission
|
||||
if(command_input && command_form) {
|
||||
command_form.addEventListener('submit', function(){
|
||||
let line = document.createElement('p')
|
||||
line.innerHTML = '<span class="TERM_FOREGROUND_7_INTENSE">$ </span>' + command_input.value;
|
||||
unvanguished_output.prepend(line);
|
||||
unvanquished_output.prepend(line);
|
||||
socket.send(command_input.value);
|
||||
command_input.value = "";
|
||||
});
|
||||
}
|
||||
|
||||
// Create WebSocket connection.
|
||||
const socket = new WebSocket("ws://192.168.122.229/unvanguished")
|
||||
const socket = new WebSocket("ws://192.168.122.229/unvanquished")
|
||||
|
||||
// Connection opened
|
||||
socket.addEventListener('open', function (event) {
|
||||
|
@ -23,15 +23,15 @@ function unvanguished_init() {
|
|||
|
||||
// Listen for messages
|
||||
socket.addEventListener('message', function (event) {
|
||||
const unvanguished_output = document.getElementById('unvanguished_output');
|
||||
const unvanquished_output = document.getElementById('unvanquished_output');
|
||||
let line = document.createElement('p')
|
||||
line.innerHTML = convertDaemonedCodeToHtml(event.data);
|
||||
unvanguished_output.prepend(line);
|
||||
unvanquished_output.prepend(line);
|
||||
});
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', unvanguished_init);
|
||||
document.addEventListener('DOMContentLoaded', unvanquished_init);
|
||||
} else {
|
||||
unvanguished_init();
|
||||
unvanquished_init();
|
||||
}
|
Loading…
Reference in New Issue