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

correct the deb and rpm hooks #805

Merged
merged 1 commit into from
Feb 21, 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
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
Loading