wget friendly links

southernfriedbb

New Member
Jul 29, 2019
444
0
0
Yeah, the links change every release. I wish they would remain static, It would save me a ton of effort everytime there is an update.
 

ZombieTwiglet

New Member
Jul 29, 2019
2
0
0
Well it's easy enough to get the URL for the packs with curl, was just wondering for the sake of simplicity. If you're running linux then you can make a quick bash script to do the updating with something along the lines of:

Code:
#!/bin/bash
 
SERVICE='ftbserver.jar'
MCPATH='/home/minecraft/servers/DW20'
# case sensitive check the current file for naming convention (hopefully the FTB team don't change it)
PACK=Direwolf20
 
# Remove old serverfiles
rm -rf $MCPATH/mods
rm -rf $MCPATH/coremods
rm $MCPATH/$SERVICE
 
# Get new server files
URL=`curl http://www.feed-the-beast.com/download.php 2>&1 | grep -o -E 'href="([^"#]+)"' | cut -d'"' -f2 | grep $PACK`
wget -O server.zip $URL
unzip server.zip -d $MCPATH
rm server.zip

I accept no responsibility for any loss of data/computers exploding from the use of this.

I might release my (simple) all in one init/console management script once I finish tweaking it if anyone is interested.