#! /bin/sh if ! pgrep krunner > /dev/null 2>&1; then exit 0 fi killall krunner for i in {1..100}; do if ! pgrep krunner; 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 exit 1 else tsk_log "Killed krunner" exit 0 fi