visual feedback during updates

This commit is contained in:
j 2016-01-12 20:30:51 +05:30
commit 516397ae44
9 changed files with 274 additions and 25 deletions

12
ctl
View file

@ -54,7 +54,7 @@ hash -r 2>/dev/null
# allow more open files
ulimit -S -n 2048
function remove_loginscript {
function remove_autostart {
if [ $SYSTEM == "Darwin" ]; then
launchd_name="com.openmedialibrary.loginscript"
launchd_plist="$HOME/Library/LaunchAgents/${launchd_name}.plist"
@ -64,15 +64,15 @@ function remove_loginscript {
rm "$launchd_plist"
fi
fi
}
if [ "$1" == "start" ]; then
remove_loginscript
if [ $SYSTEM == "Linux" ]; then
if [ -e "$HOME/.config/autostart/openmedialibrary.desktop" ]; then
rm "$HOME/.config/autostart/openmedialibrary.desktop"
fi
fi
}
if [ "$1" == "start" ]; then
remove_autostart
cd "$BASE/$NAME"
if [ -e $PID ]; then
if ps -p `cat "$PID"` > /dev/null; then
@ -96,7 +96,7 @@ if [ "$1" == "debug" ]; then
exec python3 oml server debug $PID
fi
if [ "$1" == "stop" ]; then
remove_loginscript
remove_autostart
if [ -e $PID ]; then
_PID=`cat $PID`
kill $_PID