Jump to content

updating/edit modpack using a bash script (curl)


Recommended Posts

Hello guys :)

Today I was wondering if it is possible to update and/or edit my modpack using curl and it looked like it could work but I encountered a problem

Here is a snippet of my script; Please take a look at it:

curl --cookie out/cookies.txt --cookie-jar out/cookies.txt -d "username=myuser&password=mypass" --location --output ./out/response1.html http://www.technicpack.net/user/authenticate curl --cookie out/cookies.txt -d "pack-id=3824xx&name=mypackname&version=1.1&minecraft_version_id=21&is_hidden=1&url=http://dl.xxxxxxx.com/modpacks/xxxxxx-xxx/1-7-2.zip&short_description=...nothing here...&force_directory=1" --location --output ./out/response2.html www.technicpack.net/modpack/edit_pack


Of course I edited the posted script here so nobody can get my login data :-P


So here is my problem:


The file out/response1.html has a save of my dashboard (technicpack.net/dashboard)

The file out/response2.html has a save of the "home" page in it.

If the login failed I would get an 503 (or similar) error so it must work but the pack does just not update :(

If I enter (after I am logged in)...

www.technicpack.net/modpack/edit_pack?"pack-id=3824xx&name=mypackname&version=1.1&minecraft_version_id=21&is_hidden=1&url=http://dl.xxxxxxx.com/modpacks/xxxxxx-xxx/1-7-2.zip&short_description=...nothing here...&force_directory=1" 

... into my browser I would get exactly the same result so I came to the conclusion that something with the parameters has to be wrong but I can't find the problem.


Or is there a better solution for doing that (like a "secret" api)? (The only thing I want to be able to do is automatically increase the version number to make the client update the installation!)


If you have any tips for me I highly appreciate them. Thanks in advance!



Edited by BMicraft
Link to comment
Share on other sites

If you are to the point of trying to script your pack management with curl it might be time to switch to the Solder API.

Thanks you really helped me!

But I have to ask this:

How are you supposed to know about this - on the comlete site is link or anything to this api.... or am I wrong?



Link to comment
Share on other sites

  • Discord Moderator

(might not want to "sign" your posts, it is against the rules)


Link to Github Solder API respository and instructions: https://github.com/TechnicPack/TechnicSolder


Some possibly helpful info:


'?do=embed' frameborder='0' data-embedContent>>

'?do=embed' frameborder='0' data-embedContent>>


How are folks supposed to know about this? Really, just the way you did. Solder is not for the faint of heart or the inexperienced. It has no "official" support. I do have an instance of Solder running for my packs so I might be able to help you if you get stuck. Well, that and 20+ years of Linux admin work :)

Edited by plowmanplow
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By davebobik
      Technic needs to update their modpacks. like legends it has newer versions of the mods with bug fixes, lets get it updated. did the people of technic quit or what.
    • By MoonKitty
      I had a bit of a mess up when I updated my modpack recently and the zip file had the folder to all the other files rather than the files needed in the root. So I deleted that one from Dropbox and replaced it with a new zip which is fixed. But everytime I try and get my modpack to update it tries to find the zip file that was messed up rather than the fixed one. I know about the change log and stuff, but I uninstalled the modpack and now I'm trying to install it fresh (so I don't have to worry about the 'update trigger'). Do I still need to update the change log for it to pick the right zip file?
      Typical... the moment I post this it starts to work and picks the correct zip to install... ><
    • By Ghastninja46
      I want to talk about the modpack Voltz. I'm trying to make a modpack called Voltz: Updated (You can rename it to Voltz or whatever you like) it so all of the mods are keep closely the same and updated to 1.7.10 or 1.8. So the old Voltz gets replaced with the one I made if it pleases you. I will also make sure to clean out any bugs reported or found. I don't wanna just add another Voltz remake to the community because no-one would play it because no one would know it existed. If you're interested please email me or message me on discord. [email protected] Ghastninja46#0467
    • By Erkam
      I upgradet my java to java 9 and try to starting the launcher i get a message like this: This application requires a java runtime environment 1.5.0
      Please Update launcher to Java 9
    • By Hatter
      Fellow techniclovers,
      For the people with the problem that they cannot load minecraft after launching. This is how it was solved for many people, including me. Nvidia new update may have occurred a error for loading modded minecraftlaunchers. So this redditthread gave the solution:
      I really hope it worked for all of you.
      With greetings from a hatfilms lover
  • Create New...