Files
mullvad-vpn-alpine/mullvad-vpn-daemon/mullvad-vpn-daemon-systemd.post-install
2026-04-23 11:25:44 +02:00

14 lines
571 B
Bash

#!/usr/bin/env bash
set -eu
echo "mullvad-systemd post-install"
# Are we running systemd?
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
# Does `mullvad-daemon.service` exist?
if systemctl list-unit-files mullvad-daemon.service &> /dev/null; then
systemctl enable "/usr/lib/systemd/system/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"
fi
fi