Compare commits
2 Commits
9f1cc0665f
...
c1fe3c1c9b
| Author | SHA1 | Date | |
|---|---|---|---|
| c1fe3c1c9b | |||
|
|
7af09af8d1 |
@@ -2,7 +2,7 @@
|
||||
# Maintainer: Joakim Hulthe <joakim@hulthe.net>
|
||||
pkgname=mullvad-vpn-daemon
|
||||
pkgver=2026.1_git
|
||||
pkgrel=4
|
||||
pkgrel=5
|
||||
pkgdesc="Mullvad VPN system service"
|
||||
url="https://mullvad.net/"
|
||||
arch="all"
|
||||
@@ -33,7 +33,10 @@ install="
|
||||
$pkgname-systemd.post-install
|
||||
$pkgname-systemd.post-upgrade
|
||||
"
|
||||
subpackages="$pkgname-systemd"
|
||||
subpackages="
|
||||
$pkgname-systemd
|
||||
$pkgname-suid
|
||||
"
|
||||
source=""
|
||||
builddir="$srcdir/"
|
||||
options="net suid"
|
||||
@@ -81,10 +84,6 @@ package() {
|
||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-daemon" \
|
||||
"$pkgdir"/usr/bin/mullvad-daemon
|
||||
|
||||
# mullvad-exclude requires setuid
|
||||
install -m4755 -D "$_cargo_target_dir/$CHOST/release/mullvad-exclude" \
|
||||
"$pkgdir"/usr/bin/mullvad-exclude
|
||||
|
||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-problem-report" \
|
||||
"$pkgdir"/usr/bin/mullvad-problem-report
|
||||
|
||||
@@ -103,3 +102,8 @@ systemd() {
|
||||
install -m755 -D "$startdir/mullvadvpn-app/dist-assets/linux/mullvad-early-boot-blocking.service" \
|
||||
"$subpkgdir"/usr/lib/systemd/system/mullvad-early-boot-blocking.service
|
||||
}
|
||||
|
||||
suid() {
|
||||
install -m4755 -D "$_cargo_target_dir/$CHOST/release/mullvad-exclude" \
|
||||
"$subpkgdir"/usr/bin/mullvad-exclude
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/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?
|
||||
|
||||
@@ -1,25 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "mullvad-systemd post-upgrade"
|
||||
# Are we running systemd?
|
||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||
echo "systemctl exists and is running"
|
||||
# Does `mullvad-daemon.service` exist?
|
||||
if systemctl list-unit-files mullvad-daemon.service &> /dev/null; then
|
||||
echo "enable mullvad-daemon"
|
||||
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
||||
echo "start mullvad-daemon"
|
||||
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
||||
echo "enable mullvad-early-boot-blocking"
|
||||
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
||||
else
|
||||
echo "mullvad-daemon.service does not exist!!"
|
||||
systemctl list-unit-files mullvad-daemon.service
|
||||
fi
|
||||
else
|
||||
echo "systemctl does not exit!"
|
||||
fi
|
||||
|
||||
echo "sleep 5"
|
||||
sleep 5
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "mullvad post-deinstall"
|
||||
|
||||
rm -r --interactive=never /var/log/mullvad-vpn/ || \
|
||||
echo "Failed to remove mullvad-vpn logs"
|
||||
rm -r --interactive=never /var/cache/mullvad-vpn/ || \
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "mullvad post-install"
|
||||
|
||||
# Overwrite the cached relay list with the one embedded in the package.
|
||||
mkdir -p /var/cache/mullvad-vpn \
|
||||
&& cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json \
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "mullvad post-upgrade"
|
||||
|
||||
# Overwrite the cached relay list with the one embedded in the package.
|
||||
mkdir /var/cache/mullvad-vpn
|
||||
cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "mullvad pre-deinstall"
|
||||
is_number_re='^[0-9]+$'
|
||||
# Check if we're running during an upgrade step on Fedora
|
||||
# https://fedoraproject.org/wiki/Packaging:Scriptlets#Syntax
|
||||
if [[ "$1" =~ $is_number_re ]] && [ "$1" -gt 0 ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
if [[ "$1" == "upgrade" ]]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# the user might've disabled or stopped the service themselves already
|
||||
systemctl stop mullvad-daemon.service || true
|
||||
systemctl disable mullvad-daemon.service || true
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "mullvad pre-upgrade"
|
||||
# Are we running systemd?
|
||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||
# Is `mullvad-daemon.service` running?
|
||||
|
||||
Reference in New Issue
Block a user