Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't modify the files in postinst but rather at the build step in deb package (#273) #274

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/install/debian/lsc.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions src/install/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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

Loading