Some pkill implementations match on /proc/pid/stat which is limited to 15 characters [1]. $KEYBOARD defaults to svkbd-mobile-intl which is more then 15 characters, so use -f to match the full string. Note that sxmo uses busybox pkill by default which does not have this limit. [1] https://manpages.debian.org/buster/procps/pgrep.1.en.html (Notes) Signed-off-by: Anjandev Momi <anjan@momi.ca>
18 lines
422 B
Bash
Executable file
18 lines
422 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
# This script is called prior to suspending
|
|
|
|
# include common definitions
|
|
# shellcheck source=scripts/core/sxmo_common.sh
|
|
. "$(dirname "$0")/sxmo_common.sh"
|
|
|
|
pkill -STOP conky
|
|
pkill clickclack
|
|
pkill -f "$KEYBOARD"
|
|
|
|
# If this script returns a non-zero exit code, suspension will be cancelled
|
|
|
|
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/presuspend" ]; then
|
|
"$XDG_CONFIG_HOME/sxmo/hooks/presuspend"
|
|
exit $?
|
|
fi
|