shell/ssh/install: on macos, load service on script exit

This commit is contained in:
Henrik Lissner 2016-12-16 20:58:56 -05:00
parent 6fd3e9e33e
commit a2055ed5be

View file

@ -6,8 +6,12 @@ fi
case $OSTYPE in
darwin*)
macos-load-ssh() {
# Comes preinstalled on MacOS
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
}
# Activate service when script is finished
trap macos-load-ssh EXIT
;;
linux*)
if [[ -f /etc/arch-release ]]; then