diff options
author | Jelle van der Waa | 2020-07-05 17:43:13 +0200 |
---|---|---|
committer | Jelle van der Waa | 2020-07-05 17:43:13 +0200 |
commit | 5f3fae017c824ca8c0c194e758f5ab8f68b070ef (patch) | |
tree | 6c1e09245db7282173e3ad9b91d5208611ee9d96 /10-sshd | |
download | aur-networkmanager-dispatcher-sshd.tar.gz |
import from community
Diffstat (limited to '10-sshd')
-rw-r--r-- | 10-sshd | 37 |
1 files changed, 37 insertions, 0 deletions
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 |