diff options
author | Mike Frysinger <vapier@gentoo.org> | 2002-10-29 05:01:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2002-10-29 05:01:34 +0000 |
commit | 24e885c60f5df9317ebd6015a56736f757946ed2 (patch) | |
tree | 22f6e620d383ff67049851c28c008d532cb13447 /net-p2p/freenet/files | |
parent | Fix for #9821 and bump for #9830 (diff) | |
download | gentoo-2-24e885c60f5df9317ebd6015a56736f757946ed2.tar.gz gentoo-2-24e885c60f5df9317ebd6015a56736f757946ed2.tar.bz2 gentoo-2-24e885c60f5df9317ebd6015a56736f757946ed2.zip |
Cleanup/update per #9830
Diffstat (limited to 'net-p2p/freenet/files')
-rw-r--r-- | net-p2p/freenet/files/freenet | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/net-p2p/freenet/files/freenet b/net-p2p/freenet/files/freenet new file mode 100644 index 000000000000..d3d402f03870 --- /dev/null +++ b/net-p2p/freenet/files/freenet @@ -0,0 +1,35 @@ +#!/sbin/runscript +# Freenet init.d-script by Per Wigren <wigren@home.se> + +depend() { + need net +} + +SEEDNODES_REF="http://freenetproject.org/snapshots/seednodes.ref" +FREENET_JAR="http://freenetproject.org/snapshots/freenet-latest.jar" + +start() { + einfo "Fetching latest seednodes.ref..." + mv -f /var/freenet/seednodes.ref /var/freenet/seednodes.ref.old &>/dev/null + wget -O /var/freenet/seednodes.ref -q $SEEDNODES_REF || \ + mv -f /var/freenet/seednodes.ref.old /var/freenet/seednodes.ref + + einfo "Fetching latest freenet.jar..." + mv -f /usr/lib/freenet/freenet.jar /usr/lib/freenet/freenet.jar.old &>/dev/null + wget -O /usr/lib/freenet/freenet.jar -q $FREENET_JAR || \ + mv -f /usr/lib/freenet/freenet.jar.old /usr/lib/freenet/freenet.jar + + ebegin "Starting Freenet" + export CLASSPATH=/usr/lib/freenet/freenet.jar:/usr/lib/freenet/freenet-ext.jar:$CLASSPATH + start-stop-daemon --start --quiet --pidfile /var/run/freenet.pid -m \ + --background \ + --exec $(java-config --java) -- freenet.node.Main -p /etc/freenet.conf + eend $? +} + +stop() { + ebegin "Stopping Freenet" + start-stop-daemon --stop --quiet --pidfile /var/run/freenet.pid + rm -f /var/run/freenet.pid + eend $? +} |