Skip to content

Commit

Permalink
(Linux) DEB/RPM package cancel installation if there is 'ivpn' snap p…
Browse files Browse the repository at this point in the history
…ackage already installed
  • Loading branch information
stenya committed Jul 20, 2022
1 parent c2c5514 commit 2e2d839
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/References/Linux/package_scripts/before-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

echo "[*] Before install (<%= version %> : <%= pkg %> : $1)"

# Skip installation if 'ivpn' snap pachage already installed
snap list ivpn > /dev/null 2>&1 && echo "[!] INSTALLATION CANCELED: The snap package 'ivpn' is already installed. Please, uninstall the 'ivpn' snap package first." && exit 1

# When removing package: $1==0 for RPM; $1 == "remove" for DEB
_IS_REMOVE=0
if [ "$1" = "remove" -o "$1" = "0" ]; then
Expand Down

0 comments on commit 2e2d839

Please sign in to comment.