Browse Source

gnunet: properly deal with persistency

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
lilik-openwrt-22.03
Daniel Golle 10 years ago
parent
commit
67d14fd735
2 changed files with 23 additions and 6 deletions
  1. +1
    -2
      net/gnunet/Makefile
  2. +22
    -4
      net/gnunet/files/gnunet.init

+ 1
- 2
net/gnunet/Makefile View File

@ -10,10 +10,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet
PKG_SOURCE_VERSION:=36060
PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_RELEASE:=2
# ToDo:
# - properly deal with persistency
# - break-out {peer,name,data}store for each backend
# - package testing stuff


+ 22
- 4
net/gnunet/files/gnunet.init View File

@ -39,11 +39,29 @@ prepare_config() {
chown root:gnunet $CONFIGFILE
chmod 0640 $CONFIGFILE
gnunet-config -c $CONFIGFILE -s PATHS -o GNUNET_HOME -V $GNUNET_HOME
# enable gns2dns service
defaultservices=$( gnunet-config -c /tmp/run/gnunet/gnunet.conf -s arm -o DEFAULTSERVICES )
defaultservices="$defaultservices dns2gns"
# minimal persistency in /etc/gnunet
[ ! -d /etc/gnunet ] && {
mkdir -p /etc/gnunet
chown gnunet:gnunet /etc/gnunet
}
gnunet-config -c $CONFIGFILE -s PATHS -o GNUNET_CONFIG_HOME -V /etc/gnunet
gnunet-config -c $CONFIGFILE -s PEER -o PRIVATE_KEY -V /etc/gnunet/private_key.ecc
gnunet-config -c $CONFIGFILE -s identity -o EGODIR -V /etc/gnunet/identity/egos
gnunet-config -c $CONFIGFILE -s revocation -o DATABASE -V /etc/gnunet/revocation.dat
gnunet-config -c $CONFIGFILE -s nse -o PROOFFILE -V /etc/gnunet/proof.dat
gnunet-config -c $CONFIGFILE -s namestore-sqlite -o FILENAME -V /etc/gnunet/namestore.sqlite
# minimal datastore (todo: make this configurable)
gnunet-config -c $CONFIGFILE -s datastore -o QUOTA -V "4 MB"
# limit dhtcache memory usage to 4 MB
gnunet-config -c $CONFIGFILE -s dhtcache -o QUOTA -V "4 MB"
# enable dns2gns
gnunet-config -c $CONFIGFILE -s dns2gns -o AUTOSTART -V YES
# enable all installed transport plugins
gnunet-config -c $CONFIGFILE -s arm -o DEFAULTSERVICES -V "$defaultservices"
transport_plugins=$(gnunet-config -c $CONFIGFILE -s transport -o PLUGINS)
for transplug in /usr/lib/gnunet/libgnunet_plugin_transport_*.so; do
transplug=$( echo $transplug |


Loading…
Cancel
Save