summaryrefslogtreecommitdiff
path: root/data/openssh
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-02-25 10:37:30 +0000
committerJay Freeman <saurik@saurik.com>2008-02-25 10:37:30 +0000
commitc7696b0f9d23e045f32b6cd332d46d3fe0a39d40 (patch)
tree626490a93aa5dac6039a7a2007fe26f4a29063f2 /data/openssh
parent9a2e50eedbf47a9b4ea61694e9171ff78746ae9f (diff)
Slightly less irritating package scripts for starting/stopping sshd.
git-svn-id: http://svn.telesphoreo.org/trunk@100 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/openssh')
-rwxr-xr-xdata/openssh/_metadata/postinst3
-rwxr-xr-xdata/openssh/_metadata/prerm3
2 files changed, 4 insertions, 2 deletions
diff --git a/data/openssh/_metadata/postinst b/data/openssh/_metadata/postinst
index 6d47c8d6f..4899fcae7 100755
--- a/data/openssh/_metadata/postinst
+++ b/data/openssh/_metadata/postinst
@@ -1,3 +1,4 @@
#!/bin/sh
-/bin/launchctl load /Library/LaunchDaemons/com.openssh.sshd.plist
+/bin/launchctl list com.openssh.sshd &>/dev/null ||
+ /bin/launchctl load /Library/LaunchDaemons/com.openssh.sshd.plist
exit 0
diff --git a/data/openssh/_metadata/prerm b/data/openssh/_metadata/prerm
index b717b6b1c..17abc80ef 100755
--- a/data/openssh/_metadata/prerm
+++ b/data/openssh/_metadata/prerm
@@ -1,3 +1,4 @@
#!/bin/sh
-/bin/launchctl unload /Library/LaunchDaemons/com.openssh.sshd.plist
+! /bin/launchctl list com.openssh.sshd &>/dev/null ||
+ /bin/launchctl unload /Library/LaunchDaemons/com.openssh.sshd.plist
exit 0