From d9c5c3e1e2c33e121caea4fe6371d05233622515 Mon Sep 17 00:00:00 2001 From: David Coutadeur Date: Fri, 12 Apr 2024 15:12:51 +0200 Subject: [PATCH] Don't modify the files in postinst but rather at the build step in deb package (#273) --- src/install/debian/lsc.postinst | 17 ----------------- src/install/debian/rules | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/install/debian/lsc.postinst b/src/install/debian/lsc.postinst index ba5a3eb9..dd8d3358 100644 --- a/src/install/debian/lsc.postinst +++ b/src/install/debian/lsc.postinst @@ -8,23 +8,6 @@ lsc_group=lsc chown -R ${lsc_user}:${lsc_group} ${lsc_logdir} chown ${lsc_user}:${lsc_group} /var/lib/lsc -# Reconfigure files -## logback -sed -i "s:/tmp/lsc/log:${lsc_logdir}:" \ - /etc/lsc/logback.xml -## bin -sed -i \ - -e 's:^CFG_DIR.*:CFG_DIR="/etc/lsc":' \ - -e 's:^LIB_DIR.*:LIB_DIR="/usr/lib/lsc":' \ - -e "s:^LOG_DIR.*:LOG_DIR=\"${lsc_logdir}\":" \ - /usr/bin/lsc \ - /usr/bin/lsc-agent \ - /usr/bin/hsqldb -sed -i \ - -e 's:^VAR_DIR.*:VAR_DIR="/var/lib/lsc":' \ - -e 's:^HSQLDB_PIDFILE.*:HSQLDB_PIDFILE="/run/hsqldb.pid":' \ - /usr/bin/hsqldb - #DEBHELPER# exit 0 diff --git a/src/install/debian/rules b/src/install/debian/rules index 1e67f828..4cc14f56 100755 --- a/src/install/debian/rules +++ b/src/install/debian/rules @@ -38,3 +38,20 @@ override_dh_install: cp -a etc/sql-map-config.d/InetOrgPerson.xml-sample `pwd`/debian/lsc/etc/lsc/sql-map-config.d/InetOrgPerson.xml # Remove useless windows .bat files find debian/lsc -type f -name '*.bat' -delete + # Reconfigure files + ## logback + sed -i "s:/tmp/lsc/log:/var/log/lsc:" \ + `pwd`/debian/lsc/etc/lsc/logback.xml + ## bin + sed -i \ + -e 's:^CFG_DIR.*:CFG_DIR="/etc/lsc":' \ + -e 's:^LIB_DIR.*:LIB_DIR="/usr/lib/lsc":' \ + -e "s:^LOG_DIR.*:LOG_DIR=\"/var/log/lsc\":" \ + `pwd`/debian/lsc/usr/bin/lsc \ + `pwd`/debian/lsc/usr/bin/lsc-agent \ + `pwd`/debian/lsc/usr/bin/hsqldb + sed -i \ + -e 's:^VAR_DIR.*:VAR_DIR="/var/lib/lsc":' \ + -e 's:^HSQLDB_PIDFILE.*:HSQLDB_PIDFILE="/run/hsqldb.pid":' \ + `pwd`/debian/lsc/usr/bin/hsqldb +