diff --git a/spoof-dpi.service b/spoof-dpi.service index 83fcb0f..d8bf6d0 100644 --- a/spoof-dpi.service +++ b/spoof-dpi.service @@ -9,4 +9,5 @@ ExecStart=/usr/bin/spoof-dpi --no-banner --enable-doh Restart=on-failure [Install] -WantedBy=multi-user.target +WantedBy=default.target +Alias=spoofdpi.service diff --git a/spoofdpi.spec b/spoofdpi.spec index a9e88d1..5128573 100644 --- a/spoofdpi.spec +++ b/spoofdpi.spec @@ -5,7 +5,7 @@ Summary: A simple and fast software designed to bypass Deep Packet Inspection Name: spoofdpi Version: 0.10.6 -Release: 1 +Release: 2 License: Apache-2.0 Group: Networking/Other Url: https://github.com/xvzc/SpoofDPI @@ -28,6 +28,11 @@ A simple and fast software designed to bypass Deep Packet Inspection %{_userunitdir}/spoof-dpi.service %post +# migrate from incorrect systemd unit +if test -L /etc/systemd/user/multi-user.target.wants/spoof-dpi.service; then + systemctl --global disable spoof-dpi.service && \ + systemctl --global preset spoof-dpi.service || : +fi %systemd_user_post spoof-dpi.service %preun