use ctl install_launcher, only start via launchctl if launcher is installed

This commit is contained in:
Jan Gerber 2015-03-31 20:25:18 +02:00
commit 01e66b647a
2 changed files with 9 additions and 28 deletions

View file

@ -5,9 +5,13 @@ if [[ ! -e "/usr/sbin/miredo" ]]; then
open -W ../Resources/miredo-osx-v1.2.6-beta2.pkg
fi
if [[ -e "$BASE" ]]; then
launchctl start com.openmedialibrary.loginscript
open "$BASE/openmedialibrary/static/html/load.html"
if [[ -e "$HOME/Library/LaunchAgents/com.openmedialibrary.loginscript.plist" ]]; then
launchctl start com.openmedialibrary.loginscript
open "$BASE/openmedialibrary/static/html/load.html"
else
"$BASE/ctl" open
fi
else
python install.py "$BASE" &
open ../Resources/static/install.html
python install.py "$BASE" &
open ../Resources/static/install.html
fi