The officially official Devuan Forum!

You are not logged in.

#1 2025-03-05 21:26:56

forte
Member
Registered: 2025-02-27
Posts: 14  

[SOLVED] Unable to run Mullvad VPN

Hi everyone,

I've recently moved to Devuan and I'm still working out a few issues that I have. The ones that I'm most unfamiliar with are all related to SysVinit, and more specifically I'd like to ask for some assistance with getting Mullvad VPN up and running.

I did search in the forum and found a few matches about this same issue, including one where an init script was suggested and which I've tried, to no avail.

https://dev1galaxy.org/viewtopic.php?id=3500

Unfortunately, after trying this the Mullvad GUI doesn't even launch after I created this script in /etc/init.d/mullvad. Before that, it would launch but with an error saying that the connection did not work, or something around those lines. Which I assume is because of this other error that I got while installing it in the first place (this is from /var/log/apt/term.log):

Preparing to unpack .../mullvad-vpn_2025.4_amd64.deb ...
Unpacking mullvad-vpn (2025.4) ...
Setting up mullvad-vpn (2025.4) ...
/var/lib/dpkg/info/mullvad-vpn.postinst: line 6: systemctl: command not found
dpkg: error processing package mullvad-vpn (--configure):
 installed mullvad-vpn package post-installation script subprocess returned error exit status 127
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for mailcap (3.70+nmu1) ...
Errors were encountered while processing:
 mullvad-vpn

Obviously, something to do with systemd... I wonder if someone here could help me?

Thank you

Offline

#2 2025-03-06 14:56:14

juic3
Member
Registered: 2018-11-27
Posts: 14  

Re: [SOLVED] Unable to run Mullvad VPN

Hello, I'm still running Mullvad on Devuan.
The Mullvad file locations have changed a little, my current /etc/init.d/mullvad file looks like this:

#!/bin/sh
# Generated by sysd2v v0.3  --  http://www.trek.eu.org/devel/sysd2v
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides:       mullvad-daemon.service
# Required-Start: $syslog $local_fs $remote_fs  
# Required-Stop:  $remote_fs
# Should-Start:   $network NetworkManager
# Should-Stop:    $network NetworkManager
# chkconfig: 35 90 10
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    Mullvad VPN daemon
### END INIT INFO
DESC="mullvad-daemon"
DAEMON=/usr/bin/mullvad-daemon
DAEMON_ARGS="-v --disable-stdout-timestamps"
PIDFILE=/var/run/mullvad-daemon.service-sysd2v.pid
START_ARGS="--background --make-pidfile"

Then you need to run 'sudo update-rc.d mullvad defaults' to enable mullvad-daemon.
I just commented out the systemctl lines from the postinst script to get rid off errors while running system updates.

Offline

#3 2025-03-06 18:40:15

forte
Member
Registered: 2025-02-27
Posts: 14  

Re: [SOLVED] Unable to run Mullvad VPN

I'm sorry, do I need to combine this with the script linked in the previous post? Thanks for that as well, just realized it's yours!

If I were to completely remove Mullvad and start over, is this what I should do:

1. Install Mullvad by either:
   a) adding their repository (replacing the code name for "bookworm").
   b) running from the .deb file directly.
2. Create a new file at /etc/init.d/mullvad with the contents of this snippet, followed by the rest of the code from the other post starting at around line 20 onwards.
3. Run sudo update-rc.d mullvad defaults.
4. Reboot?

Clearly, I'm out of my element here. I don't mind using the command line and navigate up and down directories, but I've just never handled anything related to SysVinit. In fact, I've never even handled any systemd services, either.

Anyway, thanks for the help.

Offline

#4 2025-03-07 04:46:26

juic3
Member
Registered: 2018-11-27
Posts: 14  

Re: [SOLVED] Unable to run Mullvad VPN

Just the new one, no combining. Rest of your procedure sounded right.

Offline

#5 2025-03-07 18:20:56

forte
Member
Registered: 2025-02-27
Posts: 14  

Re: [SOLVED] Unable to run Mullvad VPN

All right, that worked perfectly! This leaves me with so many questions such as... why? big_smile From all the example init scripts that I've seen, this seems so much shorter. How did you come up with that? Asking because I'd like to know more about it in case I have to do the same with some other service.

Thank you very much!

Offline

#6 2025-03-08 13:31:15

juic3
Member
Registered: 2018-11-27
Posts: 14  

Re: [SOLVED] Unable to run Mullvad VPN

I guess I must have used the sysd2v script, mentioned in the comments in mullvad init script smile
"# Generated by sysd2v v0.3  --  http://www.trek.eu.org/devel/sysd2v"

Offline

#7 2025-03-09 10:54:11

forte
Member
Registered: 2025-02-27
Posts: 14  

Re: [SOLVED] Unable to run Mullvad VPN

I thought that was just generic boilerplate, and didn't stop to read through but I'll be sure to take a closer look. Thanks again!

Offline

#8 2025-03-15 13:19:48

Deze
Member
Registered: 2021-10-17
Posts: 17  

Re: [SOLVED] Unable to run Mullvad VPN

After installing the app using the Mullvad repository it's a matter of
sudo systemctl start mullvad-daemon or am I missing something?

I would like to autostart this terminal command but haven't found a way that's beginner-friendly.

Last edited by Deze (2025-03-15 16:13:54)


Devuan GNU/Linux 5 (daedalus) x86_64

Offline

#9 2025-03-15 13:34:10

forte
Member
Registered: 2025-02-27
Posts: 14  

Re: [SOLVED] Unable to run Mullvad VPN

The systemctl command is not available on non-systemd distributions. That's why Mullvad VPN doesn't work automatically on Devuan.

1. Create a new file in /etc/init.d called "mullvad".
2. Paste the contents of the script kindly provided by juic3 a few posts back (thanks again).
3. Grant the script with executable permissions by running: sudo chmod +x /etc/init.d/mullvad.
4. Run sudo update-rc.d mullvad defaults.

Mullvad VPN should start automatically now.

Last edited by forte (2025-03-15 13:34:45)

Offline

#10 2025-03-15 16:25:22

Deze
Member
Registered: 2021-10-17
Posts: 17  

Re: [SOLVED] Unable to run Mullvad VPN

This is great, thank you forte and juic3. The steps had to be spelled out to register x).

Last edited by Deze (2025-03-15 16:27:39)


Devuan GNU/Linux 5 (daedalus) x86_64

Offline

#11 2025-03-22 18:41:27

lynch9
Member
Registered: 2024-07-17
Posts: 21  

Re: [SOLVED] Unable to run Mullvad VPN

Had the same problem, great to see it was easier than what I was expecting! I'm happy with OpenVPN and just using mullvad servers though. I don't trust those kinds of "custom" VPN software


Hey, it's lynchian9.
Feel free to reach out via email.

Offline

Board footer