25 lines
392 B
Bash
25 lines
392 B
Bash
|
#! /bin/sh
|
||
|
main() {
|
||
|
if ! pgrep krunner > /dev/null 2>&1; then
|
||
|
return 0
|
||
|
fi
|
||
|
killall krunner
|
||
|
for i in {1..100}; do
|
||
|
if ! pgrep krunner > /dev/null 2>&1; then break ;fi
|
||
|
sleep 0.01
|
||
|
if (( $i > 99 )); then
|
||
|
killall -9 krunner
|
||
|
fi
|
||
|
done
|
||
|
if pgrep krunner > /dev/null 2>&1; then
|
||
|
tsk_log "Failed to kill krunner" 1
|
||
|
return 1
|
||
|
else
|
||
|
tsk_log "Killed krunner"
|
||
|
return 0
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
main $@
|
||
|
|