Skip to content

Commit

Permalink
fix(pkg): disable kill switch before uninstalling the package
Browse files Browse the repository at this point in the history
  • Loading branch information
tprasadtp committed Feb 18, 2024
1 parent f6175e8 commit c47c4d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions debian/protonwire.preremove
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
set -e
case "$1" in
remove)
echo "Stopping unit potonwire"
systemctl stop -q potonwire || true
echo "Disabling kill switch (if any)"
protonwire disable-killswitch || true
echo "Stopping unit protonwire"
systemctl stop -q protonwire || true

for i in $(seq 100); do
echo "Waiting until unit $unit is stopped [attempt $i]"
if ! systemctl is-active -q potonwire; then
echo "potonwire is stopped."
if ! systemctl is-active -q protonwire; then
echo "protonwire is stopped."
break
fi
sleep 0.5
Expand Down
8 changes: 5 additions & 3 deletions rpm/protonwire.preremove
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@

set -e

echo "Disabling kill switch (if any)"
protonwire disable-killswitch || true
echo "Stopping unit potonwire"
systemctl stop -q potonwire || true
systemctl stop -q protonwire || true

for i in $(seq 100); do
echo "Waiting until unit $unit is stopped [attempt $i]"
if ! systemctl is-active -q potonwire; then
echo "potonwire is stopped."
if ! systemctl is-active -q protonwire; then
echo "protonwire is stopped."
break
fi
sleep 0.5
Expand Down

0 comments on commit c47c4d9

Please sign in to comment.