File: gnunet.config

package info (click to toggle)
gnunet 0.6.6b-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,964 kB
  • ctags: 6,940
  • sloc: ansic: 82,380; sh: 13,056; makefile: 1,121; cpp: 189; php: 74; sed: 16
file content (44 lines) | stat: -rw-r--r-- 1,250 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh -e
# Config script for gnunet
#
# Author: Arnaud Kyheng <Arnaud.Kyheng@free.fr>

# Source debconf library.
. /usr/share/debconf/confmodule

# Check for old type of GNUnet package
if dpkg --compare-versions "$2" lt "0.6.4a-7" && \
	[ -e /etc/gnunet.conf ]; then
	# Try to read configuration values (now use new gnunet-update -g)		
	GNUNETD_HOME=`gnunet-update --get=:GNUNETD_HOME`
	PIDFILE=`gnunet-update --get=GNUNETD:PIDFILE`
	LOGFILE=`gnunet-update --get=GNUNETD:LOGFILE`
	
	# Check values (PS: we will need to be able to extract $GNUNETD_HOME later in postinst
	if [ ! $PIDFILE ] || [ ! $LOGFILE ] || \
	[ ! $GNUNETD_HOME ] || [ ! -d "$GNUNETD_HOME" ]; then
		# Something was wrong
		db_reset gnunet/failed || true
		db_input critical gnunet/failed || true
		db_go
	else
		# Only warn if values are not compliant
		if [ "$PIDFILE" != "/var/run/gnunetd/gnunetd.pid" ] || [ "$LOGFILE" != "/var/log/gnunetd/gnunetd.log" ]; then
			db_input medium gnunet/warning || true
        		db_go
		fi
	fi
fi

# Ask for GNUnet daemon user
db_input medium gnunet/gnunet_user || true
db_go

# Ask for GNUnet daemon group
db_input medium gnunet/gnunet_group || true
db_go

# Ask for GNUnet autostart
db_input high gnunet/launch_at_startup || true
db_go