Bikeshed comments
This commit is contained in:
@@ -1,12 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Are we running systemd?
|
# Enable and start systemd services
|
||||||
if which systemctl >/dev/null 2>&1 && systemctl is-system-running | grep -vq offline >/dev/null 2>&1; then
|
if which systemctl >/dev/null 2>&1 && systemctl is-system-running | grep -vq offline >/dev/null 2>&1; then
|
||||||
# Does `mullvad-daemon.service` exist?
|
|
||||||
if systemctl list-unit-files mullvad-daemon.service >/dev/null 2>&1; then
|
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
||||||
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Are we running systemd?
|
# Enable and start systemd services
|
||||||
if which systemctl >/dev/null 2>&1 && systemctl is-system-running | grep -vq offline >/dev/null 2>&1; then
|
if which systemctl >/dev/null 2>&1 && systemctl is-system-running | grep -vq offline >/dev/null 2>&1; then
|
||||||
# Does `mullvad-daemon.service` exist?
|
|
||||||
if systemctl list-unit-files mullvad-daemon.service >/dev/null 2>&1; then
|
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
||||||
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
# Log out and remove any firewall rules
|
||||||
mullvad-setup reset-firewall || echo "Failed to reset firewall"
|
mullvad-setup reset-firewall || echo "Failed to reset firewall"
|
||||||
mullvad-setup remove-device || echo "Failed to remove device from account"
|
mullvad-setup remove-device || echo "Failed to remove device from account"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Are we running systemd?
|
# Stop the daemon gracefully, and set up firewall rules to prevent network
|
||||||
|
# leaks during upgrade.
|
||||||
if which systemctl >/dev/null 2>&1 && systemctl is-system-running | grep -vq offline >/dev/null 2>&1; then
|
if which systemctl >/dev/null 2>&1 && systemctl is-system-running | grep -vq offline >/dev/null 2>&1; then
|
||||||
# Is `mullvad-daemon.service` running?
|
|
||||||
if systemctl status mullvad-daemon >/dev/null 2>&1; then
|
if systemctl status mullvad-daemon >/dev/null 2>&1; then
|
||||||
mullvad-setup prepare-restart || true
|
mullvad-setup prepare-restart || true
|
||||||
systemctl stop mullvad-daemon.service
|
systemctl stop mullvad-daemon.service
|
||||||
@@ -14,5 +14,5 @@ if which systemctl >/dev/null 2>&1 && systemctl is-system-running | grep -vq off
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Since we are upgrading mullvad-daemon, it will probably have current IP baked into itself.
|
# Clear the cached API IP address.
|
||||||
rm -f /var/cache/mullvad-vpn/api-ip-address.txt
|
rm -f /var/cache/mullvad-vpn/api-ip-address.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user