Open phit opened 8 years ago
I think we can do this, but gosh, doesn't Starbound support the downloading of collections ? Would be much more simple.
doesn't seem like it :/ for my own server I'm doing something like this right now
updatemods.sh in the root server dir
#!/bin/bash
cd steamcmd
./steamcmd.sh +login "user" "pass" +force_install_dir ../serverfiles +workshop_download_item 211820 731592371 +workshop_download_item 211820 730867662 +workshop_download_item 211820 730587191 +workshop_download_item 211820 729427606 +workshop_download_item 211820 729427436 +quit
that will install the mods to serverfiles/steamapps/workshop/content/211820
then i have to manually edit serverfiles/linux/sbinit.config
for the mods above it then looks like this
{
"assetDirectories" : [
"../assets/",
"../mods/",
"../steamapps/workshop/content/211820/729427606",
"../steamapps/workshop/content/211820/730587191",
"../steamapps/workshop/content/211820/730867662",
"../steamapps/workshop/content/211820/731592371",
"../steamapps/workshop/content/211820/729427436"
],
"storageDirectory" : "../storage/"
}
Well, that'll be a bit of a challenge to script for me, that's interesting. I'll notify on this issue when i'm on it, but if anyone feels like doing it before, feel free to take the job and make a pull request; because chances are i won't code in the next few days.
Seems like one of those "Nice to have, but not easily done in Bash" things.
see issue #1623 for a solution one how to do this and a suggestion for how to implement it @phit @UltimateByte @jaredballou
Seems LinuxGSM is auto downloading mods, but not editing sbinit.config
. We should edit it manually at this time.
Use
echo -e "{\n \"assetDirectories\": [\n \"../assets/\",\n \"../mods/\",\n " && \
curl -s --data "collectioncount=1&publishedfileids[0]=[[YOUR_COLLECTION_ID]]" https://api.steampowered.com/ISteamRemoteStorage/GetCollectionDetails/v1/ \
| jq '.response.collectiondetails[] | .children[] | .publishedfileid' \
| sed 's#^#"../steamapps/workshop/content/211820/#' | sed 's#/"#/#' | tr -t '\n' ',' && \
echo -e "\b\b\n ],\n \"storageDirectory\": \"../storage/\"\n}\n"
to generate sbinit.config
, then paste it to serverfiles/linux/sbinit.config
And use
echo login [[YOUR_USERNAME]] [[YOUR_PASSWORD]] > moddownload.sh && curl -s --data "collectioncount=1&publishedfileids[0]=[[YOUR_COLLECTION_ID]]" https://api.steampowered.com/ISteamRemoteStorage/GetCollectionDetails/v1/ \
| jq '.response.collectiondetails[] | .children[] | .publishedfileid' \
| sed 's/^/workshop_download_item 211820 /' | tee -a moddownload.sh && echo quit >> moddownload.sh && ./steamcmd/steamcmd.sh +runscript ../moddownload.sh
to start download your mod collection.
Is this going to be implemented?
Would love to see this added
for reference: https://www.reddit.com/r/starbound/comments/4u69z8/10_installing_steam_workshop_mods_on_servers/ https://www.reddit.com/r/starbound/comments/4ub95u/dedicated_server_steam_workshop/