stop launchd agent via ./ctl stop
This commit is contained in:
parent
393fe7eb6e
commit
74ff203a1a
1 changed files with 5 additions and 0 deletions
5
ctl
5
ctl
|
@ -62,6 +62,11 @@ if [ "$1" == "debug" ]; then
|
||||||
exec python3 oml server $@
|
exec python3 oml server $@
|
||||||
fi
|
fi
|
||||||
if [ "$1" == "stop" ]; then
|
if [ "$1" == "stop" ]; then
|
||||||
|
if [ $SYSTEM == "Darwin" ]; then
|
||||||
|
launchd_name="com.openmedialibrary.loginscript"
|
||||||
|
launchd_plist="$HOME/Library/LaunchAgents/${launchd_name}.plist"
|
||||||
|
test -e "$launchd_plist" && launchctl stop "$launchd_name"
|
||||||
|
fi
|
||||||
test -e $PID && kill `cat $PID`
|
test -e $PID && kill `cat $PID`
|
||||||
test -e $PID && rm $PID
|
test -e $PID && rm $PID
|
||||||
exit $?
|
exit $?
|
||||||
|
|
Loading…
Reference in a new issue