Server automation - curl use in powershell to download plugins from spigot

Discussion in 'Systems Administration' started by MattMW, Jun 10, 2019.

  1. Hello!

    Wondering if someone can help out as I'm trying my best to automate my server. I'm running it on Windows 10 OS and have several sceduled batch files and plugins handling starting and stopping servers, running buildtools and updating servers, deleting logs, making backups and updating server plugin folders from a root dir of plugins (a master folder). The only thing I seem to have a problem with is downloading updates for plugins.

    I'm trying to us the CURL command to write a script to automagically download the plugin .jar files once a week however because of cloudfair redirect (ddos protection) it doesn't seem to work - does anyone have a solution to this?

    I have been runnign the server for 3 years and all computer/server/networking and programming knowledge is self learning, so I'm not entierly sure I'm even asking the right question!

    Thanks for your time
  2. Phoenix616

    Resource Staff

    I suggest taking a look at spiget to access some information and downloads for resources. Downloading directly from the site doesn't work due to Cloudflare as you already noticed and trying to bypass it cannot be advised.
  3. while also keeping in mind spiget bypasses it
    #3 Optic_Fusion1, Jun 10, 2019
    Last edited: Jun 10, 2019
  4. Thanks for the ideas, it seams what ever the route, there will always be an issue because of DDoS protection. At least the rest of the process is automated.
    #4 MattMW, Jun 14, 2019
    Last edited: Jul 12, 2019
  5. Did it!

    Found a solution to automagically download plugins - if anyone is interested I can post up the solutions.
  6. That would be helpful.
  7. Using the following and changing 'edge' setting 'ask me what to do with each download' to off you can download from the weblink copied from a download button on a plugin page.

    start microsoft-edge:
    timeout 5

    start microsoft-edge:[next address]........

    I then end with

    taskkill /f /IM microsoft-edge
    move "c:\download\pluginname.jar" "c:\newpath"
    del "c:\download\pluginname.jar"

    But there is a million other ways to handle the files once downloaded.