Create a Chron Job or script that grabs the zip file from the URL

henryevans

Cadet
Joined
Apr 11, 2022
Messages
1
Hi everyone!

I recently made a Minecraft server using TrueNAS (12.0) running in a 12.3 Jail. I want to add Resource Packs to the server. I have created a repo on GitHub and added a GitHub action that will zip the resource pack. From there, I have a URL.

My question is, is it possible to create a Chron Job or script that grabs the zip file from the URL, generates an SHA1 hash of that file, and copies that hash to the server.properties file in my server directory? I've looked and found how to generate SHA1 from command line, but it doesn't work with a file at a URL. Basically, I want to automate updating the SHA1 hash of the resource pack zip.

Any help is much appreciated!
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
You'd need to do a "fetch" on the file/URL first, once the file is downloaded to some temp location on disk, then you can generate the SHA1 hash and do the copy operations.
 
Top