marceldev89 89 Posted December 20, 2017 Arma 3 Linux server and mod updater (workshop) A python script that updates your server and mods. Just edit the variables in the "Configuration" region to your liking and run the script. :-) Features: Update Linux server binaries Download mods from the Steam Workshop Update mods from the Steam Workshop Converts all mod files and folders to lowercase Creates symbolic links with human readable names (e.g. 620260972 becomes @alive) Non-features (for now): Setting up the basic dedicated server Manage keys Requirements: Python 3 steamcmd Steam account with an Arma 3 license (only required for downloading mods from the workshop) License: MIT Download: Arma 3 Linux server and mod updater (workshop) 5 1 Share this post Link to post Share on other sites
LoadingSA 0 Posted December 20, 2017 This has been a big help for me and I'm sure will help a lot of other Linux admins. Share this post Link to post Share on other sites
HeroesandvillainsOS 1504 Posted December 20, 2017 Hey...what the. Get back to work on ALiVE! ;) Congrats on the release. I’m sure this will make Linux users lives a lot less painful. 2 Share this post Link to post Share on other sites
SavageCDN 231 Posted December 21, 2017 Congrats on release Share this post Link to post Share on other sites
magaman 1 Posted December 24, 2017 Running ubuntu 14 I get :: Downloading item 450814997 ... ERROR! Download item 450814997 failed (Failure). Server updating seems to work but not the mods...... Share this post Link to post Share on other sites
marceldev89 89 Posted December 24, 2017 Did you use a steam account that has A3 in it's library? Share this post Link to post Share on other sites
magaman 1 Posted December 24, 2017 That seems to have fixed it thanks. Share this post Link to post Share on other sites
magaman 1 Posted December 24, 2017 New error: Traceback (most recent call last): File "modupdate.py", line 157, in <module> update_mods() File "modupdate.py", line 104, in update_mods if mod_needs_update(mod_id, path): File "modupdate.py", line 84, in mod_needs_update response = request.urlopen("{}/{}".format(WORKSHOP_CHANGELOG_URL, mod_id)).r ead() NameError: global name 'request' is not defined Share this post Link to post Share on other sites
magaman 1 Posted December 24, 2017 I fixed it: changed "from urllib import request to import urllib2 and response = request.urlopen("{}/{}".format(WORKSHOP_CHANGELOG_URL, mod_id)).read() to response = urllib2.urlopen("{}/{}".format(WORKSHOP_CHANGELOG_URL, mod_id)).read() Works great now, many thanks.......... Share this post Link to post Share on other sites
marceldev89 89 Posted December 24, 2017 On 12/20/2017 at 3:12 PM, marceldev89 said: Requirements: Python 3 The script is supposed to be ran with Python 3. :) Share this post Link to post Share on other sites
magaman 1 Posted December 25, 2017 Yea well guess that would depend on which version of linux you are running. But hey now you know it will run on Python 2.7 with a couple of small changes. Now if there was a way to get it to run a bash file after updating i.e. ./server.sh start, it would be perfect. Share this post Link to post Share on other sites
marceldev89 89 Posted December 25, 2017 I guess you could just do python3 a3update.py && ./server.sh start Share this post Link to post Share on other sites
magaman 1 Posted December 30, 2017 I got the python script to stop, update then start the server. Share this post Link to post Share on other sites
iWazaru 11 Posted May 1, 2018 Hi marcel ! How should i understand this : "find: ‘rename’: Aucun fichier ou dossier de ce type" (translate: no file or folder of that type) Is this an error, or is it just the ouput if there is no file that need to be lowercased? All the script seems to worked properly, but when i launch the server, mod doesn't load. Im trying to find from where come my fault.. Damn.. SOLVED : Rename is a packet. he wasn't installed on my distro. Apt-get install rename and now its all okay... Great script Marcel ! Thanks for this job ! Share this post Link to post Share on other sites
marceldev89 89 Posted May 4, 2018 Oops, haven't checked the forums in a while and turned off notification emails. ^^ I assumed that the rename command is more or less standard on the major distributions but if it comes up again I'll add it to the requirements. :) 1 Share this post Link to post Share on other sites
quackortheduck 10 Posted May 6, 2018 (edited) Hi Marcel, thanks for this python script! I'm facing a bug/problem with steamcmd parameters sh: 1: +force_install_dir: not found I changed A3_SERVER_DIR variable like so ... A3_SERVER_DIR = "/home/quackorduck/steamcmd/arma3" ... def update_server(): steam_cmd_params = " +login {} {}".format(STEAM_USER, STEAM_PASS) steam_cmd_params += " +force_install_dir {}".format(A3_SERVER_DIR) steam_cmd_params += " +app_update {} validate".format(A3_SERVER_ID) steam_cmd_params += " +quit" call_steamcmd(steam_cmd_params) ... I can verify the directory exists by using cd /home/quackorduck/steamcmd/arma3 and it brings me to the directory where I installed my server. Could it be a typo or a bug I'm facing? UPDATE: It seems that my password contains an ampersand; '&' symbol which makes python go crazy. I solved it by inserting '\' before '&'. *facepalm* Now it WORKS! Edited May 6, 2018 by quackortheduck Share this post Link to post Share on other sites
marceldev89 89 Posted May 7, 2018 Yeah I always forget to escape the ampersand.. :D You can also leave the password field empty, steamcmd will then ask for your password the first time it runs and will use the cached authentication stuff for a while after that. 1 Share this post Link to post Share on other sites
quackortheduck 10 Posted May 8, 2018 There's another bug I'm facing. When I tried adding a mod in the list variable, it downloads and deleted afterwards. ================================ Updating "@tfar" (620019431) | 1 ================================ Redirecting stderr to '/home/quackorduck/Steam/logs/stderr.txt' Looks like steam didn't shutdown cleanly, scheduling immediate update check [ 0%] Checking for available updates... [----] Verifying installation... Steam Console Client (c) Valve Corporation -- type 'quit' to exit -- Loading Steam API...OK. Logging in user 'quackortheduck' to Steam Public...Logged in OK Waiting for user info...OK Downloading item 620019431 ... Success. Downloaded item 620019431 to "/home/quackorduck/steamcmd/arma3/steamapps/workshop/content/107410/620019431" (166388040 bytes) ================================ Updating "@tfar" (620019431) | 2 ================================ ... ================================ Updating "@tfar" (620019431) | 10 ================================ ... ========================================= !! Updating @tfar failed after 10 tries !! ========================================= If I tried downloading manually by using steamcmd, the mod was saved inside the workshop folder and it managed to create a symlink for the mod. Do you know what's happening? Share this post Link to post Share on other sites
marceldev89 89 Posted May 8, 2018 All the script does is asking steamcmd to download a mod and when the new folders doesn't exist in the workshop folder after the download finishes it'll try again. Whenever I ran into this issue there was either a problem with the workshop service or some steamcmd cache issue. You can try clearing the steamcmd cache but I can't remember what the actual files to delete for that are so you'll have to figure that out yourself (probably a file named <a3_steam_id>.<some_steam_extension>). 1 Share this post Link to post Share on other sites
kazenokizu 10 Posted September 25, 2018 I keep getting permission denied i have tried filling in the login info and leaving it blank nothing works help please ============= Updating mods ============= ================================== Updating "@cba_a3" (450814997) | 1 ================================== sh: 1: /home/gamemaster/steamcmd: Permission denied ================================== Updating "@cba_a3" (450814997) | 2 ================================== sh: 1: /home/gamemaster/steamcmd: Permission denied Share this post Link to post Share on other sites
marceldev89 89 Posted September 25, 2018 You don't have permissions to run steamcmd apparently. Either run the script as the "gamemaster" user or fix the permissions. Share this post Link to post Share on other sites
Mettius 1 Posted January 23, 2019 Stupid Question: When adding mods to the python script. How do I know what the correct "@mod_name" is? For example: https://steamcommunity.com/sharedfiles/filedetails/?id=561177050 From the steam workshop it is easy to find the mod id number, but the other piece seems to be elusive. Share this post Link to post Share on other sites
marceldev89 89 Posted January 26, 2019 The "@" name can be whatever you want it to be. It's just for your own sanity and doesn't _need_ to be something specific. Share this post Link to post Share on other sites
Mettius 1 Posted January 26, 2019 Thanks. I thought it might matter for when people select the server for mods needed. Share this post Link to post Share on other sites
Danidan 17 Posted March 20, 2019 Hello, thank's for script! But i have a probleme. (I use linuxgsm for install arma 3) ================================== Updating "@cba_a3" (450814997) | 3 ================================== Redirecting stderr to '/home/arma3server/Steam/logs/stderr.txt' [ 0%] Checking for available updates... [----] Verifying installation... Steam Console Client (c) Valve Corporation -- type 'quit' to exit -- Loading Steam API...CreateBoundSocket: ::bind couldn't find an open port between 27060 and 27060 OK. Logging in user 'armagroupe' to Steam Public...Logged in OK Waiting for user info...OK Downloading item 450814997 ... ERROR! Download item 450814997 failed (Failure). log: sh: 1: /home/arma3server/steamcmd/linux32/../ubuntu12_64/gldriverquery: not found sh: 1: /home/arma3server/steamcmd/linux32/../ubuntu12_32/gldriverquery: not found sh: 1: /home/arma3server/steamcmd/linux32/../ubuntu12_64/vulkandriverquery: not found CApplicationManagerPopulateThread took 0 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread) CAppInfoCacheReadFromDiskThread took 14 milliseconds to initialize Share this post Link to post Share on other sites