mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
fix: disconnect VPN when sleep/shutdown
This commit is contained in:
@@ -10,6 +10,10 @@ install:
|
||||
install -Dm755 artifacts/usr/bin/gpgui $(DESTDIR)/usr/bin/gpgui; \
|
||||
fi
|
||||
|
||||
# Install the sleep/shutdown scripts
|
||||
install -Dm755 artifacts/usr/lib/systemd/system-sleep/gpclient $(DESTDIR)/usr/lib/systemd/system-sleep/gpclient
|
||||
install -Dm755 artifacts/usr/lib/systemd/system-shutdown/gpclient $(DESTDIR)/usr/lib/systemd/system-shutdown/gpclient
|
||||
|
||||
install -Dm644 artifacts/usr/share/applications/gpgui.desktop $(DESTDIR)/usr/share/applications/gpgui.desktop
|
||||
install -Dm644 artifacts/usr/share/icons/hicolor/scalable/apps/gpgui.svg $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/gpgui.svg
|
||||
install -Dm644 artifacts/usr/share/icons/hicolor/32x32/apps/gpgui.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/gpgui.png
|
||||
@@ -26,6 +30,9 @@ uninstall:
|
||||
rm -f $(DESTDIR)/usr/bin/gpgui-helper
|
||||
rm -f $(DESTDIR)/usr/bin/gpgui
|
||||
|
||||
rm -f $(DESTDIR)/usr/lib/systemd/system-sleep/gpclient
|
||||
rm -f $(DESTDIR)/usr/lib/systemd/system-shutdown/gpclient
|
||||
|
||||
rm -f $(DESTDIR)/usr/share/applications/gpgui.desktop
|
||||
rm -f $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/gpgui.svg
|
||||
rm -f $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/gpgui.png
|
||||
|
3
packaging/files/usr/lib/systemd/system-shutdown/gpclient
Executable file
3
packaging/files/usr/lib/systemd/system-shutdown/gpclient
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/bin/gpclient disconnect
|
5
packaging/files/usr/lib/systemd/system-sleep/gpclient
Executable file
5
packaging/files/usr/lib/systemd/system-sleep/gpclient
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "${1}" == "pre" ]; then
|
||||
/usr/bin/gpclient disconnect
|
||||
fi
|
@@ -60,6 +60,13 @@ make build OFFLINE=@OFFLINE@ BUILD_FE=0
|
||||
%{_datadir}/icons/hicolor/scalable/apps/gpgui.svg
|
||||
%{_datadir}/polkit-1/actions/com.yuezk.gpgui.policy
|
||||
|
||||
%dir /usr/lib/systemd
|
||||
%dir /usr/lib/systemd/system-sleep
|
||||
%dir /usr/lib/systemd/system-shutdown
|
||||
|
||||
/usr/lib/systemd/system-sleep/gpclient
|
||||
/usr/lib/systemd/system-shutdown/gpclient
|
||||
|
||||
%dir %{_datadir}/icons/hicolor
|
||||
%dir %{_datadir}/icons/hicolor/32x32
|
||||
%dir %{_datadir}/icons/hicolor/32x32/apps
|
||||
|
Reference in New Issue
Block a user