Mods / ModsUpdater For Linux
Author: Laerinok
Side: Both
Created: Sep 10th 2023 at 10:49 AM
Last modified: Apr 2nd at 3:31 PM
Downloads: 1095
Follow Unfollow 36
Latest version:
VS_ModsUpdater_Linux.v.1.4.0.zip
Vintage Story ModsUpdater - For Linux
Easily update your favorite mods
So my linux knowledge is very limited.
This a Debian-based Linux version of my ModsUpdater. For others distros, you can find the .py file in the source tab.
- For NixOS, if you need, you can have a look to the SturgeonFish's post.
For more informations check out the ModsUpdater page.
You can run it through the terminal :
- Download and unzip
- Open a terminal and go to the folder VS_ModsUpdater_Linux (or whatever the name you gave it)
- Drag&Drop VS_ModsUpdater in the terminal to run it.
For server :
I added the possibility to run VS_ModsUpdater as command line with some arguments.
You can run the script with the following arguments:
- For Linux : VS_ModsUpdater [-h] [--modspath MODSPATH] [--language LANGUAGE] [--nopause {false,true}] [--exclusion EXCLUSION [EXCLUSION ...]] [--forceupdate {false,true}] [--makepdf {false,true}]
- For Python : VS_ModsUpdater.py [-h] [--modspath MODSPATH] [--language LANGUAGE] [--nopause {false,true}] [--exclusion EXCLUSION [EXCLUSION ...]] [--forceupdate {false,true}] [--makepdf {false,true}]
Options :
- -h, --help show this help message and exit
- --modspath MODSPATH Enter the mods directory (in quotes). Quotes are needed only if there is some space in the path-name.
- --language LANGUAGE Set the language file (as it is named in the lang directory, without extension) (default=en_US)
- --nopause {false,true} Disable the pause at the end of the script. You NEED to set it to true if not the script prompts and wait your intervention. (default=false)
- --exclusion EXCLUSION [EXCLUSION ...] Write filenames of mods with extension (in quotes) you want to exclude (each mod separated by space). It's not really useful as you can set it later in the config.ini file.
- --forceupdate {false,true} (default: false) Force ModsUpdater to download the latest versions for ALL the mods, even if they are up to date. (default=false)
- --makepdf {false,true} (default: false) Create,at the end of the Update, a PDF file of all mods in the mods folder (default=false).
Exemple of use :
Linux : VS_ModsUpdater --language en_US --modspath "/home/VintagestoryData/mods" --nopause true
I added a .bat file (Windows) and a .sh file (Linux) if needed. You only have to edit them and set the the right path for your configuration.
MIT License
Copyright (c) 2024 Laerinok
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v1.4.0 | 267 | Apr 2nd at 3:31 PM | Show | VS_ModsUpdater_Linux.v.1.4.0.zip | ||
v1.3.6 | 104 | Mar 26th at 3:32 PM | Show | VS_ModsUpdater_Linux.v.1.3.6.zip | ||
v1.3.5 | 101 | Mar 20th at 7:24 PM | Show | VS_ModsUpdater_Linux.v.1.3.5.zip | ||
v1.2.0 | 221 | Oct 20th 2023 at 10:53 AM | Show | VS_ModsUpdater_Linux.v.1.2.0.zip | ||
v1.1.4 | 139 | Oct 3rd 2023 at 8:01 PM | Show | VS_ModsUpdater_Linux.v.1.1.4.zip | ||
v1.1.3 | 123 | Sep 25th 2023 at 10:15 AM | Show | VS_ModsUpdater_Linux.v.1.1.3.zip | ||
v1.1.2 | 140 | Sep 10th 2023 at 10:51 AM | Show | VS_ModsUpdater_Linux.v.1.1.2.zip |
hron84
Hello,
I made a little break but I am going to dive into this script soon. I am working on a new version, I will try to fix this.
As you may have read, I am not a linux user (and only on Mint in a virtual machine) so my knowldeges are pretty low. Moreover, I am not a programmer. I made this script because I needed it and because I wanted to learn Python. It's the only script I've made.
That said, I know there is an issue with the ~home somewhere. But as I cannot reproduce it on my VM, it's hard to make test. I guess Debian version have some differences with Arch or others distros.
Moreover the script is made with Python 3.11.4. and I know that 3.12 brings some new features because there are some depreciation alerts.
Feel free to send me / contact me (here, on github or on Discord - same pseudo). I appreciate any help but keep in mind that I add/modify code only if I can understand it. As I said, I am learning, and I must understand what I change to be able to update it later.
It either does not work, or does not print out anything for me. I running the latest updater package you uploaded to the site (1.4.0) with the following parameters: ./VS_ModsUpdater --modspath "${HOME}/.config/VintagestoryData/Mods" --language en_US --nopause true and it prints out nothing, does nothing, just exits.
Please add more messages about the operations and the potential errors.
The situation was happened on latest Arch Linux, with VS 1.19.8-1 package (installed from AUR) and with Python 3.12.4.
EDIT: I went to the GitHub and fetched the very latest code, it is also not working, not emitting any error messages besides the SyntaxWarning. I managed to fix them by following this guide for it: https://stackoverflow.com/a/77531416/182474 but the script still does nothing. The script itself is too complex to my Python knowledge so I cannot point out where could be the error.
EDIT2: I found the issue. You silently abort the script if the mods path is not exists. However, the problem is a bit deeper. In the arg_modspath() function somehow you duplicate the username in the path (so it become /home/hron/hron) if it is given by the absolute path. I was not able to decipher what the code is actually doing (because it uses Python magics), but I worked it around by checking if the path is planned to be returned is exists, if not, I check if the raw (original) path is exists and returning with that or returning a hardcoded nonexistent path. I also added an error message to inform the user about the not existing mods path. If you are interested in the fix, I can send you a PR with that.
Wolfraider
The script is made with python 3.11.4 that may be the cause of these warnings. I am working on a new version, but I didn't yet test on Linux. I will have a look at these issue. Does it stop the script or it goes on ?
EDIT: Indeed "SyntaxWarning: invalid escape sequence" was introduced with Python 3.12. I will have a look at this.
I get a number of syntax warnings such as this one:
SyntaxWarning: invalid escape sequence '\{'
self.file_lang_path = f'lang\{args.language}.json'
It appears you have invalid backslash in your strings in a couple of places in your code.
This is using Python 12.
SturgeonFish
Indeed I noticed it was for another linux distribution. That's why I asked. As some users asked me for some other distributions it will be a good thing I that I group all info I can.
Thanks ;)
Laerinok Those files are only going to work for nixos, which is a linux distribution that does things a bit differently. You're free to add them to the desc/repo as you like.
SturgeonFish
Thanks for the share.
Can I ping it to the description or it's something specific to you and your friends ? I guess it's for all but I prefer to be sure ;)
For the 5 or so of you that I know play this game on nixos, here's my shell.nix and requirements.txt files. This got VS_ModsUpdater.py from the repo working.
>shell.nix
# shell.nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "vs-mods-updater-env";
buildInputs = [
pkgs.python39
pkgs.python39Packages.virtualenv
];
shellHook = ''
export PYTHONPATH=$PYTHONPATH:.
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
echo "VS Mods Updater environment loaded"
'';
}
>requrements.txt
requests
fpdf2
wget
semver
bs4
rich
Pop these in the dir you extracted everything and it's just $nix-shell followed by $python VS_ModsUpdater.py
c1charge
👌 glad to see it's OK.
@Laerinok
I got it working now, I thought it was looking for a folder named "Mods" so had the path specified to one level up. Once I included the Mods folder in the pathing it worked perfectly in my setup! Thank you!
c1charge
Can you give me your pathmods name and the config.ini file ? I guess you put mods in the mod's server folder. right ?
And I guess you didn't change the mods path in the config.ini ?
I never put mods in the game's folder but in the the VintageStoryData folder.
I think you have two choices :
Laerinok
The modpath is correct, and the only other files in the folder are the default surival, creative, and essentials files. Otherwise there are plenty of .zips in there!
c1charge
Hello,
This message should occurs only if there is no .zip file in the mods folder which seems not being your case. Strange.
Do you have other files than the .zip in the mods folder ?
Just to be sure, the modpath in the config.ini file is the good one that leads to server's modspath ?
Hello, not sure what I am doing wrong here. I got the program to load on my Linux Server, and when I point it to my Mods folder for the server I only get a "No mods in the Mods folder" error. Is it looking for something else in that folder other than the .zips? Thank you!
😀
This is so nice for a linux server. Thank you very much for it.
effgee
Versioning issue for Xlib and Xskills is fixed. It will be in the next update. I want to fix another issue I met with pdf creation with cyrillic font. I could add an argument to be able to create a pdf file of the mods in the server. Don't know if it will be useful, but it is quite easy to make.
According to your suggestion, I can add too an argument to force update. The easiest way is either to force updating all the mods or only one. But if you need to force updating several mods, you will have to add as many argument as mods. Don't know if it will be easy to use.
I will think about it. ModsUpdater grow with user's suggestions 😀
@Laerinok
Hello! Glad to hear back from you!
Yes I am running this on a dedicated server, Debian 12/Bookworm based.
It worked without any difficulties whatsoever, I just used the command line (binary) and pointed it to my mod folder.
If you would like a feature suggestion, perhaps being able to force update a mod to most recent release.
It seems your retreival function for most recent mod release works perfect, being able to say, force install a certain mod would be useful in some cases as well. ex. Suspected corruption or undoing modification/testing. Maybe something for the future! ;)
effgee
Glad to see this version is useful. As I am not a great Linux user, it was not easy for me ^^.
Thanks for your feedback. Indeed it's another versioning issue I've never met before... I'll fix it as soon as possible. And in the same time I will try to update to 1.3.4 too. I should have done it by now...
I notice too there is a small issue with the new version link. It links to the Windows version.
Moreover I see "Cairns 1: ERROR !!! The modder did not fill in the modid in the modinfo.json file. Unable to get the update.". I thought I've fixed this issue and it should be able to update. I will have a look into this.
PS : I didn't really have any kind of feedback on use on servers. Do you use it on servers ?
Hey great to see linux support. Really useful on servers.
Came across an "edge" case where the script fails to understand there is an update, have a look at the log.
If you notice, the script while it sees the updated versions for
Xlib and Xskills it does not update them. Probably a parsing issue due to using the rc.X on their versioning. :P
----------------------------------------------
Vintage Story Mod Updater - v.1.2.0 by Laerinok
New version of ModsUploader available !! mods.vintagestory.at/download?fileid=19584
Limit mod updates to game version : Latest version
A Tad More Charcoal: installed version : 1.0.0 - last version : 1.0.0
Accessibility Tweaks: installed version : 3.6.1 - last version : 3.6.1
Anvil Metal Recovery+: installed version : 0.1.19-pre.1 - last version : 0.1.19-pre.1
Arrownd: installed version : 1.0.0 - last version : 1.0.0
Better-Drifters: installed version : 2.1.3 - last version : 2.1.3
BetterMoisture: installed version : 1.0.0 - last version : 1.0.0
BetterPoultice2: installed version : 1.0.2 - last version : 1.0.2
Blacksmith Enhancements: installed version : 1.0.4 - last version : 1.0.5
File size : 0.1 MB
Blacksmith Enhancements v.1.0.5 download in progress...
100% [............................................................................] 105888 / 105888
Blacksmithname: installed version : 1.1.6 - last version : 1.1.6
Butchering: installed version : 1.5.4 - last version : 1.5.4
Buzzy Bees: installed version : 1.0.1 - last version : 1.0.1
Cairns 1: ERROR !!! The modder did not fill in the modid in the modinfo.json file. Unable to get the update.
Chiseltools: installed version : 1.10.5 - last version : 1.10.5
ColoredTorchesRedux: installed version : 1.1.0 - last version : 1.1.0
Config lib: installed version : 1.0.2 - last version : 1.1.1
File size : 0.17 MB
Config lib v.1.1.1 download in progress...
100% [............................................................................] 175723 / 175723
Configure Everything: installed version : 1.1.0 - last version : 1.1.0
Cooperative Combat: installed version : 1.1.1 - last version : 1.1.1
Creatures & Critters (Unofficial): installed version : 1.0.6 - last version : 1.0.6
Entities Interact: installed version : 1.0.3 - last version : 1.0.3
Fantasy Creatures Mod: installed version : 0.7.1 - last version : 0.7.1
History of existence: installed version : 0.0.3 - last version : 0.0.3
Icecold: installed version : 0.5.1 - last version : 0.5.1
Immersive Wood Chopping: installed version : 0.7.1 - last version : 0.7.1
Immersive Wood Sawing: installed version : 0.1.1 - last version : 0.1.1
Instand Drifter Drops: installed version : 1.1.0 - last version : 1.1.0
Just An Arrowhead Mold: installed version : 1.0.1 - last version : 1.0.1
Lumber Sling: installed version : 1.1.0 - last version : 1.1.0
Bows: installed version : 1.0.4 - last version : 1.0.4
More Bags: installed version : 1.2.0 - last version : 1.2.0
MoveLikeKaji: installed version : 0.0.5 - last version : 0.0.5
The Night Watcher: installed version : 2.0.0 - last version : 2.0.0
NoCharcoalLost: installed version : 1.0.0 - last version : 1.0.0
Normalizer: installed version : 1.0.1 - last version : 1.0.1
Outlaw Mod: installed version : 1.2.2 - last version : 1.2.2
Pick Up Fast: installed version : 1.0.2 - last version : 1.0.2
Primitive Survival: installed version : 3.4.9 - last version : 3.4.9
PropickFix: installed version : 1.0.0 - last version : 1.0.0
Re: ERROR !!! The modder did not fill in the modid in the modinfo.json file. Unable to get the update.
SilentSave: installed version : 1.0.4 - last version : 1.0.4
Simple Footsteps: installed version : 1.1.7 - last version : 1.1.7
Nat's Survival Nutrition: installed version : 1.0.0 - last version : 1.0.0
Temporal gears stack: installed version : 1.0.0 - last version : 1.0.0
The Critters Pack: installed version : 0.9.1 - last version : 0.9.1
EasyTorchLight: installed version : 1.0.0 - last version : 1.0.0
Vanity: installed version : 2.1.1 - last version : 2.1.2
File size : 0.04 MB
Vanity v.2.1.2 download in progress...
100% [..............................................................................] 39041 / 39041
Dear ImGui: installed version : 1.1.2 - last version : 1.1.2
Wild Farming Revival: installed version : 1.1.8 - last version : 1.1.8
Xandus Inventory Tweaks: installed version : 1.5.9-rc.1 - last version : 1.5.9-rc.1
XLib: installed version : 0.8.0-rc.1 - last version : 0.8.0-rc.2
XSkills: installed version : 0.8.0-rc.1 - last version : 0.8.0-rc.2
End of search.
The following mods have been updated:
- Blacksmith Enhancements :
Changelog v1.0.5 :
* Fixed - noticeable z-fighting when player is wearing armor.
* Fixed - when player is using bellow and moves it to the chest at the same time it would make player animator get stuck.
* Fixed - sometime when player is using bellow it would get stuck and so would player animator
*
*
*
*
*
- Config lib :
Changelog v1.1.1 :
* Fixed nullref bug
- Vanity :
Changelog v2.1.2 :
* <span style="font-weight: 400;"><strong>Tweak:</strong> Removed ‘requiredOnClient: false’ from modinfo.json to prompt auto-download when connecting
to server with Vanity installed.</span>
Press the ENTER key to continue...^[[B
I have not yet made a binary file for the v1.3.2. I have to be sure before it works as expected with linux. But for those who desire, the .py file is available in the github release. And thanks to a suggestion, there is also now a requirements.txt file.
Drathek
Thanks for the help and instructions. No doubt it will be useful for users.
Also ran into similar problems using this on Manjaro, so needed to download the .py from the github and then use venv to set up a virtual enviorment so pip could be used to install python dependencies.
Assuming you have python3 installed and have placed the VS_ModsUpdater.py file from the github, this is the batch file I've been using to run/setup:
cd "$(dirname "$0")"
if ! [ -d .venv ]
then
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install wget semver requests rich bs4
else
source .venv/bin/activate
fi
python3 VS_ModsUpdater.py
The cd is to resolve issues if you set up a .desktop to run this batch file. The test for a .venv folder is to determine if this is a first time setup. "source .venv/bin/activate" is to tell it to use that virtual enviorment. Other dependencies may be required, but those are the ones I needed to have it install. Can probably streamline it if it has a requirements.txt instead.
8Helio8
Hello,
Is it a fresh installation or you updated from an old version ? Is it the latest version ? Didn't you forgive to extract the lang directory ? Did you "just" run the VS_ModsUpdater file or or you use the command line ?
It doesn't seem it's missing any dependancies. You can check the VS_ModsUpdater.py if you want to see what dependencies are used. Or even run the py.
I believe Yskar had the same issue (cf: link - link2) but he was on Arch Linux. And finally got it work with the .py file.
For your information: I tried it on Linux Mint 21 on VIrtualBox. Python 3.11
@Laerinok
I have find an issue with an SSL certificate.
Dont know what to do with it. I ran the latest version. Am I missing some dependency? I ran it on Fedora Linux (the newest everything). I will try it on linux mint as I host my dedicated server on that while fedora is my personal laptop.
SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain
(_ssl.c:1006)
Traceback (most recent call last):
File "urllib/request.py", line 1348, in do_open
File "http/client.py", line 1286, in request
File "http/client.py", line 1332, in _send_request
File "http/client.py", line 1281, in endheaders
File "http/client.py", line 1041, in _send_output
File "http/client.py", line 979, in send
File "http/client.py", line 1458, in connect
File "ssl.py", line 517, in wrap_socket
File "ssl.py", line 1108, in _create
File "ssl.py", line 1379, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "VS_ModsUpdater.py", line 123, in check_update_script
File "urllib/request.py", line 216, in urlopen
File "urllib/request.py", line 519, in open
File "urllib/request.py", line 536, in _open
File "urllib/request.py", line 496, in _call_chain
File "urllib/request.py", line 1391, in https_open
File "urllib/request.py", line 1351, in do_open
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "VS_ModsUpdater.py", line 589, in <module>
File "VS_ModsUpdater.py", line 393, in accueil
File "VS_ModsUpdater.py", line 141, in check_update_script
NameError: name 'err_lang' is not defined
[96539] Failed to execute script 'VS_ModsUpdater' due to unhandled exception!
No ;) there's no missing files. the .py is no needed to run the script. It was only for test in the pre-release you might have.
But it's avalaible in the Source page if needed.
@laerinok there may be an issue with your files, on the two last versions it is missing the .py script
Kaofan
Can you join me at Discord ? It will be easier. (my pseudo is laerinok)
Laerinok
[Pterodactyl Daemon]: Finished pulling Docker container image
container@pterodactyl~ dotnet --version
7.0.402
:/home/container$ ./VS_ModsUpdater/VS_ModsUpdater.sh && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}
./VS_ModsUpdater/VS_ModsUpdater.sh: 8: /home/container/VS_ModsUpdater: Permission denied
container@pterodactyl~ Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 126
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago.
Kaofan
You must also change the '/Path_To_VS_ModsUpdater/VS_ModsUpdater' with the path were you put VS_ModsUpdater.
Path_To_VS_ModsUpdater is the path to the directory where is VS_ModsUpdater.
But I don't know if a relative path is enough or if you must write the absolute path.
Laerinok
I don't know if I've done it right
imgur.com/a/fW1whyP
[Pterodactyl Daemon]: Finished pulling Docker container image
container@pterodactyl~ dotnet --version
7.0.402
:/home/container$ VS_ModsUpdater.sh && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}
/entrypoint.sh: line 20: VS_ModsUpdater.sh: command not found
container@pterodactyl~ Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 127
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago.
Edit1:
I guess I'm really stupid?
[Pterodactyl Daemon]: Finished pulling Docker container image
container@pterodactyl~ dotnet --version
7.0.402
:/home/container$ ./VS_ModsUpdater/VS_ModsUpdater.sh && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}
./VS_ModsUpdater/VS_ModsUpdater.sh: 8: /Path_To_VS_ModsUpdater/VS_ModsUpdater: not found
container@pterodactyl~ Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 127
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago.
EDIT : Erratum - I'd forgotten to put the executable file in the archive. Sorry.
Download the Source code archive (zip or tar.gz) and the VS_ModsUpdater file.
Extract the Source code archive and put the VS_ModsUpdater file in the directory.
I've made a new pre-release. Hope this could solve your problem : VS_ModsUpdater v1.2.0-pre2
This is the compiled version. You don't have to bother with Python. But you should run it in a different way :
@Kaofan
Vintage Story no, but my script does. It is writen with Python.
Can you run a terminal ? or you only have acces to the pterodactyl's pannel ?
Laerinok
Let me tell you that no Vintage Story server uses the Python module
Laerinok
This is a personal Server that is on the Pterodactyl panel which this panel is used with a VPS
Kaofan
I think the problem is that some Python modules are not installed on the server. I guess it's a paid server, or is it a personal server ? I don't know if it's possible to install new Python modules on a paid server. I will look for a way to automatically install missing dependancies (I don't know how to do this at the moment), and it's without any guarantee.
Laerinok
I tried it and it doesn't help either
Kaofan
Not sure, but try to run with starting by python3 (or maybe python. Depends on your config)
python3 ./VS_ModsUpdater.py --language en_US --modspath "./Mods" --nopause true && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}
But it seems the module is not installed on your system. If it is so, I don't know how to do without admin privilege. Some modules are included by default in the Python library. Some other must be mannually installed. In this case you must own admin privileges. I guess it's not possible if you don't own the server. But I did not have many knowledges with Linux, so maybe other users can tell if it's the case.
Help!
:/home/container$ ./VS_ModsUpdater.py --language en_US --modspath "./Mods" --nopause true && ./VintagestoryServer --dataPath ./data --port=${SERVER_PORT} --maxclients=${MAX_CLIENTS} ${OPTIONS}
Traceback (most recent call last):
File "/home/container/./VS_ModsUpdater.py", line 31, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
I made some changes in the script. Now you will be able to run it in command line and you should use it to run on dedicated servers. It's a pre-release so I don't yet upload here but you can get and try it by downloading it from my Git. pre-release of the script for VintageStoryServer
You can run the script with the following arguments:
VS_ModsUpdater.py [-h] [--modspath MODSPATH] [--language LANGUAGE] [--nopause {false,true}] [--exclusion EXCLUSION [EXCLUSION ...]]
options:
-h, --help show this help message and exit
--modspath MODSPATH Enter the mods directory (in quotes). Quotes are needed only if there is some space in the path-name.
--language LANGUAGE Set the language file (as it is named in the lang directory, without extension)
--nopause {false,true} Disable the pause at the end of the script. You NEED to set it to true if not the script prompts and wait your intervention.
--exclusion EXCLUSION [EXCLUSION ...] Write filenames of mods with extension (in quotes) you want to exclude (each mod separated by space). It's not really useful as you can set it later in the config.ini file.
Exemple of use :
VS_ModsUpdater.py --language en_US --modspath "/home/VintagestoryData/mods" --nopause true
You could write this kind of command before the command for running the server. It may be something like that:
VS_ModsUpdater.py --language en_US --modspath "YourModsFolderPath" --nopause true && ./YourVintagestoryServerPath/VintagestoryServer --dataPath ./YourModsFolderPath --port=XXXXX --maxclient=X
I don't have any dedicated server, so I only can guess how it will work. Vlammar (thanks to you) gave me many clues. The script runs, but you will need probably to do some tweak before to use it.
It's a python script, I guess it's already installed with Linux. You may need to install dependancies before.
I am working to a way to automatically install missing dependancies but it will be for later.
Don't hesitate to tell me what is working or not, but please be as precise as possible.
Vlammar
OK. Je vois mieux. Enfin je crois. Merci. J'ai vu que je pouvais faire passer au script des arguments en ligne de commande. Les seules éventuelles interventions humaines sont au premier lancement (la saisie du chemin dossier des mods et la création du config.ini) Et la pause finale. Donc si j'arrive à faire un truc du genre : VS_modupdater.py --ModPath --Language --ModsException et à supprimer la pause, ca correspondrait ?
Vlammar
And you can do it, because I don't know anything about bash or .py scripts
@Laerinok tu peux créer un bash qui lance d'abord le .py qui mets à jour les mods sans demander de validation puis qui lance le server (pour le bash c'est simple mais pour le script python je ne sais pas comment il marche exactement. Par exemple sur pterodactyl tu as ce genre de command que tu peux éditer
Vlammar
Salut. Qu'entends-tu exactement par "lancer le script avec une option derrière" ? Je suis un utilisateur de Linux très occasionnel, et débutant en Python. Donc très probalement en manque de pas mal de notions ;)
@kaofan On pterodactyl you execute a startup command. If you add the python script into your File Manager folder it is possible to execute the python script then the server start script. @Laerinok Is it possible to run your script only with command line with something like python3 VS_modupdater.py -SomeOptionToForceUpdate ?
Thanks for your feed back. Glad to know it is useful :)
Thank you for this, makes my life so much easier.
Working perfectly on Ubuntu 22.04 LTS
Laerinok, thanks bro, the VS_ModsUpdater.py i got your github just worked on Arch Linux when i installed the prerequisites using "sudo pacman -S python-rich python-semver", it look like the compiled binary didn't works outside Debian-based distros but don't fret, everything is working awesomelly using just the script or using steam proton to run the windows version, thanks A LOT.
PS: If you want to automate this kind of Linux distribution detection you can get the distro name variable reading the files "/etc/os-release" and/or "/etc/os-release".
Yskar
I answer your message here as it's for linux ;)
It seems an issue with a SSL certificat ? I don't really know how to deal with. I will look for this but my knowlegdes in linux are quite low.
"NameError: name 'err_lang' is not defined" It seems it didn't find the language file. It happens when the script is launched but the lang directory is not beside.
As I said, you can find the .py in the source tab. ;)
You can pm me on discord : username: laerinok (display name : Jay)
Thanks a LOT, Laerinok, i will test right now! o/ 👍
Well I have no idea how Pterodactyl works. I'll see if I can do something.
Would you make a Pterodactyl version?
Yeah. Good news ! 😃
Thanks
I love you.
Works perfectly on Ubuntu 23.04