I'm trying to make a bash script to automatically update plugin files. This problem is complicated due to not having time stamps enabled on the Umod web server. Getting the "Last-Modified" header of the files would be much easier than how I currently have to download the file then compare it to the current file. This means downloading every plugin every time the script is ran. Due to that I have to also add a sleep in the command otherwise the web server starts blocking requests due to flooding.I'm asking if anyone has a better way to do this in bash scripts. I restart my server daily and would like to add this function.
Getting timestamp of file to download?Not An Issue
If you are looking at automating, I'd suggest using the JSON API we provide, not headers.
Examples:
https://umod.org/plugins/search.json?query=&page=1&sort=title&sortdir=asc&filter=&author=
https://umod.org/plugins/absolut-gifts.json
I would not recommend blindly updating though.
Examples:
https://umod.org/plugins/search.json?query=&page=1&sort=title&sortdir=asc&filter=&author=
https://umod.org/plugins/absolut-gifts.json
I would not recommend blindly updating though.
Thanks. I'll look into it.
Locked automatically