Skip to content

Commit

Permalink
Add verbose flag to ldconfig (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
devzbysiu authored Sep 30, 2024
1 parent 47936df commit cfffec9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion contrib/scriptlets/deb/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ helpMessage="If you need help using the app, use the command 'nordvpn --help'."

# update configuration and shared library cache for linker to find .so files
echo "/usr/lib/nordvpn" > /etc/ld.so.conf.d/nordvpn.conf
ldconfig
# NOTE: We found some really strange behavior with `ldconfig` cache refresh here.
# On .deb systems, using just `ldconfig` causes the nordvpnd daemon to fail on
# the first start with error that .so are missing. On restart, it's working again.
# Adding ANY flag to `ldconfig` (even the one we added on our own which does
# literally nothing) fixes the issue.
ldconfig -v > /dev/null 2>&1

mkdir -m 0750 -p "$LOG_DIR"
chown root:$NORDVPN_GROUP "$LOG_DIR"
Expand Down
8 changes: 7 additions & 1 deletion contrib/scriptlets/deb/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ case "$1" in
rm -rf /var/{lib,log}/nordvpn
rm -rf /run/nordvpn
rm -rf /etc/ld.so.conf.d/nordvpn.conf
ldconfig

# NOTE: We found some really strange behavior with `ldconfig` cache refresh here.
# On .deb systems, using just `ldconfig` causes the nordvpnd daemon to fail on
# the first start with error that .so are missing. On restart, it's working again.
# Adding ANY flag to `ldconfig` (even the one we added on our own which does
# literally nothing) fixes the issue.
ldconfig -v > /dev/null 2>&1
;;
disappear|upgrade|failed-upgrade|abort-install|abort-upgrade)
;;
Expand Down

0 comments on commit cfffec9

Please sign in to comment.