aboutsummaryrefslogtreecommitdiff
path: root/debian/taler-exchange.postinst
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-07-16 17:31:19 +0200
committerFlorian Dold <florian@dold.me>2021-07-16 17:31:19 +0200
commit65d145b78577a4e1770a02ec95ed7770f5b0bfb0 (patch)
tree721d991fe31c2fa8dc04a530b7ad402ece846f28 /debian/taler-exchange.postinst
parentc3d6471dafefd3f193f24f317e45c05e4e1fc330 (diff)
debian: fix config link creation
Diffstat (limited to 'debian/taler-exchange.postinst')
-rw-r--r--debian/taler-exchange.postinst21
1 files changed, 11 insertions, 10 deletions
diff --git a/debian/taler-exchange.postinst b/debian/taler-exchange.postinst
index e8ef11d69..901f768a5 100644
--- a/debian/taler-exchange.postinst
+++ b/debian/taler-exchange.postinst
@@ -4,17 +4,19 @@ set -e
. /usr/share/debconf/confmodule
+TALER_HOME="/var/lib/taler-exchange"
+
# usage: fixperm user:group perms file
function fixperm() {
chown "$1" "$3"
chmod "$2" "$3"
}
-# usage: lncfg user target
+# usage: lncfg user home target
function lncfg() {
- mkdir ~$1/.config
- chown $1:$1 ~$1/.config
- ln -sf $1/.config/taler.conf $2
+ mkdir $TALER_HOME/$2/.config
+ chown $1:$1 $TALER_HOME/$2/.config
+ ln -sf $TALER_HOME/$2/.config/taler.conf $3
}
case "${1}" in
@@ -45,7 +47,6 @@ configure)
db_stop
CONFIG_FILE="/etc/default/taler-exchange"
- TALER_HOME="/var/lib/taler-exchange"
# Creating taler groups as needed
if ! getent group ${_GROUPNAME} >/dev/null; then
@@ -244,11 +245,11 @@ EOF
echo "done."
echo -n "Linking config files"
- lncfg ${_EUSERNAME} /etc/taler/exchange-service-default.conf
- lncfg ${_RSECUSERNAME} /etc/taler/exchange-service-default.conf
- lncfg ${_ESECUSERNAME} /etc/taler/exchange-service-default.conf
- lncfg ${_AGGRUSERNAME} /etc/taler/exchange-service-default.conf
- lncfg ${_WIREUSERNAME} /etc/taler/exchange-service-wire.conf
+ lncfg ${_EUSERNAME} httpd /etc/taler/exchange-service-default.conf
+ lncfg ${_RSECUSERNAME} secmod-rsa /etc/taler/exchange-service-default.conf
+ lncfg ${_ESECUSERNAME} secmod-eddsa /etc/taler/exchange-service-default.conf
+ lncfg ${_AGGRUSERNAME} aggregator /etc/taler/exchange-service-default.conf
+ lncfg ${_WIREUSERNAME} wire /etc/taler/exchange-service-wire.conf
echo " done"
# Cleaning