accweb
accweb copied to clipboard
Update accServer.exe from UI
Hi,
I wonder if that would be possible, since I have the web-interface accessible over the internet for our Admin-Team, but they are pretty helpless when I am not home to replace the accServer.exe on the actual server. Since RDP/VNC is a security threat, I would really love to be able to upload and update the accServer.exe over the webinterface.
I hope that is possible and would love to see this great tool get even better!
I'll consider this for 2.0 :)
I believe "steamcmd" would be the answer for this.
Just as a quick idea.
Get accweb to download and extract https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip.
Then to update with:
steamcmd.exe +login STEAM_ACCOUNT +force_install_dir DIR_COMPETIZIONE_DEDICATED +app_update 1430110 +quit
This is how I actually update my server.
I'm just going to leave a comment here for those running servers on linux. You can install steamcmd from the repos (It's in Ubuntu 20.04 at least) and here is the script I call for updating the game file. It's almost the same as above but some slight differences to force the download of the windows accserver files. Where XXXXX is your steam account name.
#!/bin/bash steamcmd +@sSteamCmdForcePlatformType windows +login XXXXX +force_install_dir ~/server +app_update 1430110 +quit
Here's my way of dealing with this on Linux.
I've put the following lines:
#!/bin/bash
systemctl stop accweb
# !! Please make changes to /path/to/your/, "insert_steam_login_here" and "insert_user_name_acc_runs_as_here" !!
su -c "sh /path/to/your/steamcmd.sh +@sSteamCmdForcePlatformType windows +login insert_steam_login_here +app_update 1430110 +quit" insert_user_name_acc_runs_as_here
systemctl start accweb
..into update_acc.sh and made it executable with:
chmod +x update_acc.sh
Since this involves stopping the systemd service which is starting accweb on my server, it needs to be ran as root, which I do via a cron job.
To create a cron job:
crontab -e
..as root, and paste the following line:
30 5 * * * root /path/to/your/update_acc.sh > /dev/null 2>&1
You may also omit "> /dev/null 2>&1" if you wish the output from the script to be logged.
This will result in cron running the update_acc.sh script every day at 5:30 AM, keeping the Steam login token fresh, along with the ACC Dedicated Server install. :)
Depending on which system deamon you're using, you may have to adjust how to stop and start the accweb service, along with the path to steamcmd.sh.
This can also be combined with the log cleanup trickery I posted as a response to another thread for maximum hands-off maintenance.
If anything is unclear, I'll gladly help with cleaning up the instructions or answer any questions.
Oh, also, if you're an endurance event organizer running events through out the night - this solution is obviously a pretty bad idea!
You can easily disable the cron job by putting a # in front of the line to disable it temporarily. :)