nixpkgs/pkgs/applications/networking/p2p/freenet/freenetWrapper
2022-11-07 23:45:00 +01:00

18 lines
593 B
Bash
Executable File

#! @bash@/bin/bash
set -eo pipefail
PATH=@coreutils@/bin:$PATH
export CLASSPATH=@freenet@/share/freenet/bcprov.jar:@freenet@/share/freenet/freenet-ext.jar:@freenet@/share/freenet/jna_platform.jar:@freenet@/share/freenet/jna.jar:@freenet@/share/freenet/freenet.jar
export FREENET_HOME="$HOME/.local/share/freenet"
if [ -n "$XDG_DATA_HOME" ] ; then
FREENET_HOME="$XDG_DATA_HOME/freenet"
fi
mkdir -p -- $FREENET_HOME
cp -u -- @seednodes@ $FREENET_HOME/seednodes.fref
chmod u+rw -- $FREENET_HOME/seednodes.fref
cd -- $FREENET_HOME
exec @jdk@/bin/java -Xmx1024M freenet.node.NodeStarter "$@"