config is in tt-rss 1.11+dfsg-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
set -e
# source debconf
. /usr/share/debconf/confmodule
ttrss_config_get() {
KEY="$1"
DEFAULT="$2"
GREPRESULT=$(grep $KEY /etc/tt-rss/config.php 2>&1)
if [ $? -ne 0 ] ; then
echo "$DEFAULT"
else
echo "$GREPRESULT" | tail -n 1 | perl -n -e'/define\('"'$KEY'"', '"'"'(.*)'"'"'\);/ && print "$1\n"'
fi
}
# load config file
SELF_URL_PATH=$(ttrss_config_get "SELF_URL_PATH" "http://example.org/tt-rss/")
db_set tt-rss/self_url_path "$SELF_URL_PATH"
# dbconfig-common
if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
dbc_dbtypes="mysql, pgsql"
. /usr/share/dbconfig-common/dpkg/config
dbc_go tt-rss $@
fi
# questions
db_input high tt-rss/reconfigure-webserver || true
db_input high tt-rss/self_url_path || true
db_go
|