diff options
| author | Emīls Piņķis <emils@mullvad.net> | 2022-09-02 10:56:54 +0200 |
|---|---|---|
| committer | Emīls Piņķis <emils@mullvad.net> | 2022-09-12 17:29:29 +0200 |
| commit | 9be68db2506f6e5fe28f58acc2495ab8bd3b67d5 (patch) | |
| tree | 375750681e9b3b1a325e12a70f66286c34d26741 | |
| parent | 9598d2efd327fb95d810ce64519f2474b5a7cb46 (diff) | |
| download | mullvadvpn-9be68db2506f6e5fe28f58acc2495ab8bd3b67d5.tar.xz mullvadvpn-9be68db2506f6e5fe28f58acc2495ab8bd3b67d5.zip | |
Add early-boot-blocking unit file
| -rw-r--r-- | dist-assets/linux/after-install.sh | 3 | ||||
| -rw-r--r-- | dist-assets/linux/before-remove.sh | 2 | ||||
| -rw-r--r-- | dist-assets/linux/mullvad-daemon.service | 2 | ||||
| -rw-r--r-- | dist-assets/linux/post-transaction.sh | 3 | ||||
| -rw-r--r-- | gui/tasks/distribution.js | 16 |
5 files changed, 19 insertions, 7 deletions
diff --git a/dist-assets/linux/after-install.sh b/dist-assets/linux/after-install.sh index 632a3b6268..e50af2eaf7 100644 --- a/dist-assets/linux/after-install.sh +++ b/dist-assets/linux/after-install.sh @@ -3,5 +3,6 @@ set -eu chmod u+s "/usr/bin/mullvad-exclude" -systemctl enable "/opt/Mullvad VPN/resources/mullvad-daemon.service" +systemctl enable "/etc/systemd/system/mullvad-daemon.service" systemctl start mullvad-daemon.service +systemctl enable "/etc/systemd/system/mullvad-early-boot-blocking.service" diff --git a/dist-assets/linux/before-remove.sh b/dist-assets/linux/before-remove.sh index 6ffb0669c8..1134c9a51b 100644 --- a/dist-assets/linux/before-remove.sh +++ b/dist-assets/linux/before-remove.sh @@ -22,6 +22,8 @@ fi # the user might've disabled or stopped the service themselves already systemctl stop mullvad-daemon.service || true systemctl disable mullvad-daemon.service || true +systemctl stop mullvad-early-boot-blocking.service || true +systemctl disable mullvad-early-boot-blocking.service || true /opt/Mullvad\ VPN/resources/mullvad-setup reset-firewall || echo "Failed to reset firewall" /opt/Mullvad\ VPN/resources/mullvad-setup remove-device || echo "Failed to remove device from account" diff --git a/dist-assets/linux/mullvad-daemon.service b/dist-assets/linux/mullvad-daemon.service index f8d422df11..843955e043 100644 --- a/dist-assets/linux/mullvad-daemon.service +++ b/dist-assets/linux/mullvad-daemon.service @@ -12,7 +12,7 @@ StartLimitIntervalSec=20 [Service] Restart=always RestartSec=1 -ExecStart=/opt/Mullvad\x20VPN/resources/mullvad-daemon -v --disable-stdout-timestamps +ExecStart=/usr/bin/mullvad-daemon -v --disable-stdout-timestamps [Install] WantedBy=multi-user.target diff --git a/dist-assets/linux/post-transaction.sh b/dist-assets/linux/post-transaction.sh index 78c5115f6f..52edc5bffe 100644 --- a/dist-assets/linux/post-transaction.sh +++ b/dist-assets/linux/post-transaction.sh @@ -2,5 +2,6 @@ # This is to mitigate post-uninstall hooks being ran AFTER post-install hooks # during an upgrade on Fedora. set -eu -systemctl enable "/opt/Mullvad VPN/resources/mullvad-daemon.service" || true +systemctl enable "/etc/systemd/system/mullvad-daemon.service" || true systemctl start mullvad-daemon.service || true +systemctl enable "/etc/systemd/system/mullvad-early-boot-blocking.service" || true diff --git a/gui/tasks/distribution.js b/gui/tasks/distribution.js index 75e0f246cc..45b9ce851b 100644 --- a/gui/tasks/distribution.js +++ b/gui/tasks/distribution.js @@ -171,11 +171,9 @@ const config = { extraFiles: [{ from: distAssets('linux/mullvad-gui-launcher.sh'), to: '.' }], extraResources: [ { from: distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-problem-report')), to: '.' }, - { from: distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-daemon')), to: '.' }, { from: distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-setup')), to: '.' }, { from: distAssets(path.join(getLinuxTargetSubdir(), 'libtalpid_openvpn_plugin.so')), to: '.' }, { from: distAssets(path.join('binaries', '${env.TARGET_TRIPLE}', 'openvpn')), to: '.' }, - { from: distAssets('linux/mullvad-daemon.service'), to: '.' }, ], }, @@ -189,8 +187,13 @@ const config = { '--before-remove', distAssets('linux/before-remove.sh'), '--config-files', - '/opt/Mullvad VPN/resources/mullvad-daemon.service', + '/etc/systemd/system/mullvad-daemon.service', + '--config-files', + '/etc/systemd/system/mullvad-early-boot-blocking.service', + distAssets('linux/mullvad-daemon.service') +'=/etc/systemd/system/', + distAssets('linux/mullvad-early-boot-blocking.service') +'=/etc/systemd/system/', distAssets(path.join(getLinuxTargetSubdir(), 'mullvad')) + '=/usr/bin/', + distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-daemon')) + '=/usr/bin/', distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-exclude')) + '=/usr/bin/', distAssets('linux/problem-report-link') + '=/usr/bin/mullvad-problem-report', distAssets('shell-completions/mullvad.bash') + @@ -212,8 +215,13 @@ const config = { '--rpm-posttrans', distAssets('linux/post-transaction.sh'), '--config-files', - '/opt/Mullvad VPN/resources/mullvad-daemon.service', + '/etc/systemd/system/mullvad-daemon.service', + '--config-files', + '/etc/systemd/system/mullvad-early-boot-blocking.service', + distAssets('linux/mullvad-daemon.service') +'=/etc/systemd/system/', + distAssets('linux/mullvad-early-boot-blocking.service') +'=/etc/systemd/system/', distAssets(path.join(getLinuxTargetSubdir(), 'mullvad')) + '=/usr/bin/', + distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-daemon')) + '=/usr/bin/', distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-exclude')) + '=/usr/bin/', distAssets('linux/problem-report-link') + '=/usr/bin/mullvad-problem-report', distAssets('shell-completions/mullvad.bash') + |
