shell/ssh/install: on macos, load service on script exit
This commit is contained in:
parent
6fd3e9e33e
commit
a2055ed5be
|
@ -6,8 +6,12 @@ fi
|
||||||
|
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
darwin*)
|
darwin*)
|
||||||
|
macos-load-ssh() {
|
||||||
# Comes preinstalled on MacOS
|
# Comes preinstalled on MacOS
|
||||||
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
|
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
|
||||||
|
}
|
||||||
|
# Activate service when script is finished
|
||||||
|
trap macos-load-ssh EXIT
|
||||||
;;
|
;;
|
||||||
linux*)
|
linux*)
|
||||||
if [[ -f /etc/arch-release ]]; then
|
if [[ -f /etc/arch-release ]]; then
|
||||||
|
|
Loading…
Reference in a new issue