diff --git a/debian/libtalerexchange.install b/debian/libtalerexchange.install index 3de3b10a4..bfd61d628 100644 --- a/debian/libtalerexchange.install +++ b/debian/libtalerexchange.install @@ -1 +1,2 @@ usr/lib/*/*.so.* +usr/share/ diff --git a/debian/taler-exchange-dev.install b/debian/taler-exchange-dev.install index 90d8c987f..0b2ea583f 100644 --- a/debian/taler-exchange-dev.install +++ b/debian/taler-exchange-dev.install @@ -1,3 +1,2 @@ usr/include -usr/lib/*/*.so usr/lib/*/pkgconfig diff --git a/debian/taler-exchange.config b/debian/taler-exchange.config index 6daa6818e..9cb12cd78 100644 --- a/debian/taler-exchange.config +++ b/debian/taler-exchange.config @@ -4,19 +4,25 @@ set -e . /usr/share/debconf/confmodule -db_input low gnunet-systempeer/username || true +db_input low taler-exchange/eusername || true db_go -db_input low gnunet-systempeer/groupname || true +db_input low taler-exchange/rsecusername || true db_go -db_input medium gnunet-systempeer/autostart || true +db_input low taler-exchange/esecusername || true db_go -db_input medium gnunet-dns/libnsswitch || true +db_input low taler-exchange/wireusername || true db_go -db_input medium gnunet-user/proxy || true +db_input low taler-exchange/aggrusername || true +db_go + +db_input low taler-exchange/groupname || true +db_go + +db_input medium taler-exchange/autostart || true db_go db_stop diff --git a/debian/taler-exchange.install b/debian/taler-exchange.install index 984cba92b..04fc74fa9 100644 --- a/debian/taler-exchange.install +++ b/debian/taler-exchange.install @@ -1,4 +1,3 @@ etc/taler.conf usr/bin/ usr/lib/*/taler/ -usr/share/ diff --git a/debian/taler-exchange.postinst b/debian/taler-exchange.postinst index d943647b2..fb34ebe04 100644 --- a/debian/taler-exchange.postinst +++ b/debian/taler-exchange.postinst @@ -8,13 +8,25 @@ case "${1}" in configure) db_version 2.0 - db_get taler-systempeer/username - _USERNAME="${RET:-taler}" + db_get taler-exchange/eusername + _EUSERNAME="${RET:-taler-exchange-httpd}" - db_get taler-systempeer/groupname - _GROUPNAME="${RET:-taler}" + db_get taler-exchange/rsecusername + _RSECUSERNAME="${RET:-taler-helper-rsa}" - db_get taler-systempeer/autostart + db_get taler-exchange/esecusername + _ESECUSERNAME="${RET:-taler-helper-eddsa}" + + db_get taler-exchange/wireusername + _WIREUSERNAME="${RET:-taler-exchange-wire}" + + db_get taler-exchange/aggrusername + _AGGRUSERNAME="${RET:-taler-exchange-aggregator}" + + db_get taler-exchange/groupname + _GROUPNAME="${RET:-taler-private}" + + db_get taler-exchange/autostart _AUTOSTART="${RET}" # boolean db_stop @@ -33,54 +45,133 @@ case "${1}" in echo " done." fi - # Creating taler user if needed - if ! getent passwd ${_USERNAME} > /dev/null + # Creating taler users if needed + if ! getent passwd ${_EUSERNAME} > /dev/null then - echo -n "Creating new Taler user ${_USERNAME}:" - adduser --quiet --system --ingroup ${_GROUPNAME} --home ${TALER_HOME} ${_USERNAME} + echo -n "Creating new Taler user ${_EUSERNAME}:" + adduser --quiet --system --ingroup ${_GROUPNAME} --home ${TALER_HOME}/httpd ${_EUSERNAME} + echo " done." + fi + if ! getent passwd ${_RSECUSERNAME} > /dev/null + then + echo -n "Creating new Taler user ${_RSECUSERNAME}:" + adduser --quiet --system --ingroup ${_GROUPNAME} --home ${TALER_HOME}/helper-rsa ${_USERNAME} + echo " done." + fi + if ! getent passwd ${_ESECUSERNAME} > /dev/null + then + echo -n "Creating new Taler user ${_ESECUSERNAME}:" + adduser --quiet --system --ingroup ${_GROUPNAME} --home ${TALER_HOME}/helper-eddsa ${_ESECUSERNAME} + echo " done." + fi + if ! getent passwd ${_WIREUSERNAME} > /dev/null + then + echo -n "Creating new Taler user ${_WIREUSERNAME}:" + adduser --quiet --system --home ${TALER_HOME}/wire ${_WIREUSERNAME} + echo " done." + fi + if ! getent passwd ${_AGGRUSERNAME} > /dev/null + then + echo -n "Creating new Taler user ${_AGGRUSERNAME}:" + adduser --quiet --system --home ${TALER_HOME}/aggregator ${_AGGRUSERNAME} echo " done." fi - # Add a special secured group - TALERDNS_GROUP="talerdns" - - # Creating talerdns group if needed - if ! getent group ${TALERDNS_GROUP} > /dev/null - then - echo -n "Creating new secured Taler group ${TALERDNS_GROUP}:" - addgroup --quiet --system ${TALERDNS_GROUP} - echo " done." - fi - -fi - -# Writing new values to configuration file -echo -n "Writing new configuration file:" -CONFIG_NEW=$(tempfile) + # Writing new values to configuration file + echo -n "Writing new configuration file:" + CONFIG_NEW=$(tempfile) cat > "${CONFIG_NEW}" < "/etc/systemd/system/taler.service" < "/etc/systemd/system/taler-exchange-httpd.service" < "/etc/systemd/system/taler-exchange-helper-rsa.service" < "/etc/systemd/system/taler-exchange-helper-eddsa.service" < "/etc/systemd/system/taler-exchange-wirewatch.service" < "/etc/systemd/system/taler-exchange-transfer.service" < "/etc/systemd/system/taler-exchange-aggregator.service" <