summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelle van der Waa2020-07-05 17:43:13 +0200
committerJelle van der Waa2020-07-05 17:43:13 +0200
commit5f3fae017c824ca8c0c194e758f5ab8f68b070ef (patch)
tree6c1e09245db7282173e3ad9b91d5208611ee9d96
downloadaur-5f3fae017c824ca8c0c194e758f5ab8f68b070ef.tar.gz
import from community
-rw-r--r--.SRCINFO16
-rw-r--r--10-sshd37
-rw-r--r--LICENSE19
-rw-r--r--PKGBUILD17
4 files changed, 89 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2848b0c42fed
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = networkmanager-dispatcher-sshd
+ pkgdesc = Dispatcher Script for sshd
+ pkgver = 1.0
+ pkgrel = 5
+ url = http://www.gnome.org/projects/NetworkManager/
+ arch = any
+ license = MIT
+ depends = networkmanager
+ depends = openssh
+ source = 10-sshd
+ source = LICENSE
+ md5sums = 32b05542b6dca22e2958bd9e1198b08b
+ md5sums = bade437c691452a83923e5064da20757
+
+pkgname = networkmanager-dispatcher-sshd
+
diff --git a/10-sshd b/10-sshd
new file mode 100644
index 000000000000..bc46b1f09bf9
--- /dev/null
+++ b/10-sshd
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+
+if [ -e /sys/fs/cgroup/systemd ]; then
+ case "$2" in
+ up)
+ systemctl start sshd.service
+ ;;
+ vpn-up)
+ systemctl start sshd.service
+ ;;
+ down)
+ systemctl stop sshd.service
+ ;;
+ vpn-down)
+ systemctl stop sshd.service
+ ;;
+ esac
+else
+
+ if [ -e "/etc/rc.d/sshd" ]; then
+ case "$2" in
+ up)
+ /etc/rc.d/sshd start
+ ;;
+ vpn-up)
+ /etc/rc.d/sshd start
+ ;;
+ down)
+ /etc/rc.d/sshd stop
+ ;;
+ vpn-down)
+ /etc/rc.d/sshd stop
+ ;;
+ esac
+ fi
+fi
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..879c7f77f805
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2009-2013 Robert Djubek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d9b62bbfb6fd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,17 @@
+# Maintainer: Jelle van der Waa <jelle vdwaa nl>
+pkgname=networkmanager-dispatcher-sshd
+pkgver=1.0
+pkgrel=5
+pkgdesc="Dispatcher Script for sshd"
+arch=(any)
+license=('MIT')
+url="http://www.gnome.org/projects/NetworkManager/"
+depends=('networkmanager' 'openssh')
+source=("10-sshd" "LICENSE")
+md5sums=('32b05542b6dca22e2958bd9e1198b08b'
+ 'bade437c691452a83923e5064da20757')
+
+package() {
+ install -Dm700 $srcdir/10-sshd $pkgdir/etc/NetworkManager/dispatcher.d/10-sshd
+ install -Dm644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}