Russian  English  All projects

Adding a button to the site that will run the script



There is a vps host (CentOS 7/64) with a game server, a telnet menu where there is a command /restart.
The goal: to give trustees the opportunity to restart this gs without access to the telnet.
There is an empty website.
The idea is to create a user menu on the site, create login/pw bundles, assign them Super Usera. they have access to a page with the coveted "Restart" button, which activates the script by type

#!/bin/bash
#
# set as variables
# password
passwd=pw
# message
msg="Host will restart in 5 minutes"
# d2gs telnet address
server="ip 8888"
#
(echo $passwd sleep 1echo "msg sys #all "$msg" " sleep 1echo restart 301sleep 1) | telnet $server

Another option:
Discord bot that sits on a closed channel and performs a similar script on command

I have no idea how much to ask for such - write, discuss. The price is contractual
14.01.2021 19:50



 Answers freelancers