| 151行目: | 151行目: | ||
# Systemd service unit file for the Mullvad VPN daemon | # Systemd service unit file for the Mullvad VPN daemon | ||
# testing if new changes are added | |||
[Unit] | [Unit] | ||
Description=Mullvad VPN daemon | Description=Mullvad VPN daemon | ||
Before=network-online.target | |||
After= | After=mullvad-early-boot-blocking.service NetworkManager.service systemd-resolved.service | ||
StartLimitBurst=5 | StartLimitBurst=5 | ||
StartLimitIntervalSec=20 | StartLimitIntervalSec=20 | ||
RequiresMountsFor=/<Mullvadソフトウェアのインストールディレクトリ>/opt/Mullvad\x20VPN/resources/ | |||
[Service] | [Service] | ||
Restart=always | Restart=always | ||
RestartSec=1 | RestartSec=1 | ||
ExecStart=/<Mullvadソフトウェアのインストールディレクトリ>/ | ExecStart=/<Mullvadソフトウェアのインストールディレクトリ>/usr/bin/mullvad-daemon -v --disable-stdout-timestamps | ||
Environment="MULLVAD_RESOURCE_DIR=/<Mullvadソフトウェアのインストールディレクトリ>/opt/Mullvad VPN/resources/" | |||
[Install] | [Install] | ||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||
<br> | |||
sudo vi /etc/systemd/system/mullvad-early-boot-blocking.service | |||
<br> | |||
# /etc/systemd/system/mullvad-early-boot-blocking.serviceファイル | |||
# Systemd service unit file to block all traffic during early boot. | |||
# This is required since almost no distributions use a `network-pre.target`, | |||
# which implies it's difficult to ensure that the daemon will start and block | |||
# traffic before any network configuration will be applied. | |||
# | |||
[Unit] | |||
Description=Mullvad early boot network blocker | |||
DefaultDependencies=no | |||
Before=basic.target mullvad-daemon.service | |||
[Service] | |||
Type=oneshot | |||
ExecStart=/<Mullvadソフトウェアのインストールディレクトリ>/usr/bin/mullvad-daemon --initialize-early-boot-firewall | |||
[Install] | |||
WantedBy=mullvad-daemon.service | |||
<br> | <br> | ||
デーモンファイルを再読み込みする。<br> | デーモンファイルを再読み込みする。<br> | ||