Comments (2)
+1
from linuxgsm.
For the time being i have scripted a simple version of this feature, at this time it only handles downloading, copying files & keys, however it could help in future development:
- it assumes LGSM defaults
- that the actual config used is common.cfg and that username and password are enclosed in ""
- that steamcmd is installed in default location
- that a modlist.txt is present in serverfiles directory
- that each line in modlist.txt looks like this: "Mod_ID,@Mod_Name"
- it doesn't handle putting all the mods inside common.cfg to be loaded
- yes it is similar and based on windows version of this script that is written in .bat and used by some server owners, myself included
- same as with windows version, if you plan on having many mods it is better to use new account with dayz as logging into steamcmd is rate limited and login happens once for every mod
- old mod folder, for example @Mod_Name directory in serverfiles is deleted and replaced each time this script runs
- has been tested only on debian 12
#!/bin/bash
MOD_LIST="$HOME/serverfiles/modlist.txt"
KEYS_DEST="$HOME/serverfiles"
STEAMCMD_EXE="$HOME/.steam/steamcmd/steamcmd.sh"
WORKSHOP_PATH="$HOME/.local/share/Steam/steamapps/workshop/content/221100"
steamuser=$(grep "steamuser" $HOME/lgsm/config-lgsm/dayzserver/common.cfg | cut -d'"' -f2)
steampass=$(grep "steampass" $HOME/lgsm/config-lgsm/dayzserver/common.cfg | cut -d'"' -f2)
if [ ! -f "${MOD_LIST}" ]; then
echo "Error: modlist.txt not found."
fi
while IFS= read -r line || [[ -n "$line" ]]; do
ID=$(echo "$line" | cut -d',' -f1)
${STEAMCMD_EXE} +login "${steamuser}" "${steampass}" +workshop_download_item 221100 "${ID}" +quit
done < "${MOD_LIST}"
while IFS= read -r line || [[ -n "$line" ]]; do
ID=$(echo "$line" | cut -d',' -f1)
ModName=$(echo "$line" | cut -d',' -f2)
if [ -d "$HOME/serverfiles/${ModName}" ]; then
rm -rf "$HOME/serverfiles/${ModName}"
fi
cp -r "${WORKSHOP_PATH}/${ID}" "$HOME/serverfiles/${ModName}"
if [ -d "$HOME/serverfiles/${ModName}/keys" ]; then
cp -r "$HOME/serverfiles/${ModName}/keys" "${KEYS_DEST}"
fi
done < "${MOD_LIST}"
echo "Mod folders copied and renamed successfully."
from linuxgsm.
Related Issues (20)
- [Bug]: bepinexvh latestlink url wrong in mods_list.sh HOT 1
- [Bug]: Palworld start server after last update HOT 4
- [Bug]: info_game.sh Unexpected EOF HOT 1
- [Feature]: Additional options for monitor to be able to run a script when it restarts server HOT 3
- [Feature]: Palworld: Graceful stop using shutdown command
- [Bug]: Rust: server lag spikes during newly implemented ping estimates HOT 12
- [Bug]: Starting ARK Server HOT 1
- [Bug]: Rust Oxide Mod Install does not include Harmony Mod
- [Bug]: Minecraft Java v1.20.5 not starting HOT 2
- [Server Request]: Icarus Dedicated Server HOT 1
- [Feature]: Rate Limit the number of alerts that can be sent
- [Server Request]: Draconia HOT 1
- [New Game Server Request]: FOUNDRY HOT 3
- [Bug]: Red Hat 9 dependency check - mailx HOT 2
- [Bug]: [PZ] Server doesn't seem to start in LGSM Containers HOT 1
- [Server Request]: Sons of the Forest HOT 1
- [Bug]: cs2server. Monitor will fail when server is actually on. Then it will send quit and restart server.
- [Server Request]: Military Conflict: Vietnam
- [Server Request]: Clone Hero
- [Server Request]: V Rising has linux dedicated server support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linuxgsm.