forked from I2P_Developers/i2p.i2p
Debian packaging fixes
This commit is contained in:
39
debian/i2p.config
vendored
Executable file
39
debian/i2p.config
vendored
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh -e
|
||||
# I2P package configuration script
|
||||
|
||||
conffile="/etc/default/i2p"
|
||||
|
||||
get_config_file()
|
||||
{
|
||||
config_field=$1
|
||||
db_field=$2
|
||||
|
||||
if [ -f "$conffile" ] ; then
|
||||
VALUE="$(grep "^[ ]*$config_field" $conffile | sed -e "s/^$config_field *= *\"\(.*\)\"/\1/g")"
|
||||
if [ -n "$VALUE" ] ; then
|
||||
db_set $db_field "$VALUE"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
db_version 2.0
|
||||
|
||||
if [ "$1" = configure -o "$1" = reconfigure ] ; then
|
||||
get_config_file STARTI2P i2p/daemon
|
||||
get_config_file RUN_DAEMON i2p/daemon
|
||||
db_input medium i2p/daemon || true
|
||||
|
||||
get_config_file I2PUSER i2p/user
|
||||
db_input medium i2p/user || true
|
||||
#db_input high i2p/stop_running_router || true
|
||||
|
||||
db_go
|
||||
if dpkg --compare-versions "$2" lt 0.8.4-2 ; then
|
||||
rm -f $conffile
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user