Commit 3ab5248a authored by Raine Makelainen's avatar Raine Makelainen

[nemo-systemsettings] Remove vpn-updown script and service. Contributes to JB#41460

parent f44b4892
......@@ -56,7 +56,6 @@ make %{?_smp_mflags}
%install
rm -rf %{buildroot}
%qmake5_install
chmod +x %{buildroot}/%{_bindir}/vpn-updown.sh
%post -p /sbin/ldconfig
......@@ -67,8 +66,6 @@ chmod +x %{buildroot}/%{_bindir}/vpn-updown.sh
%{_libdir}/qt5/qml/org/nemomobile/systemsettings/libnemosystemsettings.so
%{_libdir}/qt5/qml/org/nemomobile/systemsettings/qmldir
%{_libdir}/libsystemsettings.so.*
%{_libdir}/systemd/user/vpn-updown.service
%{_bindir}/vpn-updown.sh
%dir %attr(0775, root, privileged) /etc/location
%config %attr(0664, root, privileged) /etc/location/location.conf
......
......@@ -91,12 +91,6 @@ pkgconfig.path = $$target.path/pkgconfig
locationconfig.files = $$PWD/location.conf
locationconfig.path = /etc/location
scripts.path = /usr/bin/
scripts.files = vpn-updown.sh
servicefiles.path = /usr/lib/systemd/user/
servicefiles.files = vpn-updown.service
QMAKE_PKGCONFIG_NAME = lib$$TARGET
QMAKE_PKGCONFIG_VERSION = $$VERSION
QMAKE_PKGCONFIG_DESCRIPTION = System settings application development files
......@@ -105,4 +99,4 @@ QMAKE_PKGCONFIG_INCDIR = $$develheaders.path
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
QMAKE_PKGCONFIG_REQUIRES = Qt5Core Qt5DBus profile nemomodels-qt5 libsailfishkeyprovider connman-qt5
INSTALLS += target develheaders pkgconfig scripts servicefiles locationconfig
INSTALLS += target develheaders pkgconfig locationconfig
[Unit]
Description=Automatic up/down for configured VPN connections
[Service]
Type=oneshot
ExecStart=/usr/bin/vpn-updown.sh up
ExecStop=/usr/bin/vpn-updown.sh down
RemainAfterExit=yes
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: $0 up|down"
exit 1
fi
METHOD=
if [ "$1" = "up" ]; then
METHOD=net.connman.vpn.Connection.Connect
elif [ "$1" = "down" ]; then
METHOD=net.connman.vpn.Connection.Disconnect
else
echo "Usage: $0 up|down"
exit 2
fi
logger "$0 $1"
for FILE in $(find /home/nemo/.local/share/system/vpn -mindepth 1 -maxdepth 1); do
TOKEN=$(basename $FILE)
OBJECTPATH=/net/connman/vpn/connection/$TOKEN
/bin/dbus-send --system --dest=net.connman.vpn --print-reply $OBJECTPATH $METHOD
logger "Invoked $METHOD for $OBJECTPATH"
done
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment