Skip to content

Commit

Permalink
correct the deb and rpm hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
qrkourier committed Feb 20, 2024
1 parent e1e2de8 commit ff12270
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions programs/ziti-edge-tunnel/package/deb/postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ install -m 644 @CPACK_SHARE_DIR@/@SYSTEMD_UNIT_FILE_NAME@ @SYSTEMD_UNIT_DIR@/@SY
# with an explanation or warning or link is an alternative to removing it, but it would only work for this deb, not the
# rpm, artifact of this build because rpm creates unwanted *.rpmsave backups of files that were modified after the
# specified version was installed
unlink @CPACK_SHARE_DIR@/@SYSTEMD_UNIT_FILE_NAME@
if [ -e @CPACK_SHARE_DIR@/@SYSTEMD_UNIT_FILE_NAME@ ]; then
unlink @CPACK_SHARE_DIR@/@SYSTEMD_UNIT_FILE_NAME@
fi


# Source debconf library.
. /usr/share/debconf/confmodule
Expand Down Expand Up @@ -106,7 +109,7 @@ fi

if [ "$1" = "configure" ]; then
# if interactive and stdin is a tty
if [ $DEBIAN_FRONTEND != "noninteractive" -a -t 0 ]; then
if [ "$DEBIAN_FRONTEND" != "noninteractive" -a -t 0 ]; then
ssize=$(tput cols)
else
ssize=80
Expand Down
4 changes: 3 additions & 1 deletion programs/ziti-edge-tunnel/package/rpm/post.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ if [ $1 -ne 0 ]; then
# delete the old copy of the unit file to reduce confusion; modifying the file with an explanation or warning or
# link is an alternative to removing it, but that causes unwanted *.rpmsave backups since it is then presumed to be
# a user modification
unlink @CPACK_SHARE_DIR@/$SYSTEMD_UNIT_FILE_NAME
if [ -e @CPACK_SHARE_DIR@/$SYSTEMD_UNIT_FILE_NAME ]; then
unlink @CPACK_SHARE_DIR@/$SYSTEMD_UNIT_FILE_NAME
fi
fi

%systemd_post $SYSTEMD_SERVICE_NAME
Expand Down

0 comments on commit ff12270

Please sign in to comment.