summaryrefslogtreecommitdiffstats
path: root/scripts/common.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/common.sh.in')
-rw-r--r--scripts/common.sh.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/common.sh.in b/scripts/common.sh.in
index 3f63fc053..ae1c5cf09 100644
--- a/scripts/common.sh.in
+++ b/scripts/common.sh.in
@@ -38,6 +38,7 @@ sbindir=@sbindir@
udevdir=@udevdir@
udevruledir=@udevruledir@
sysconfdir=@sysconfdir@
+localstatedir=@localstatedir@
ETCDIR=${ETCDIR:-/etc}
DEVDIR=${DEVDIR:-/dev/disk/by-vdev}
@@ -72,6 +73,8 @@ SYSCTL=${SYSCTL:-/sbin/sysctl}
UDEVADM=${UDEVADM:-/sbin/udevadm}
AWK=${AWK:-/usr/bin/awk}
+ZED_PIDFILE=${ZED_PIDFILE:-${localstatedir}/run/zed.pid}
+
COLOR_BLACK="\033[0;30m"
COLOR_DK_GRAY="\033[1;30m"
COLOR_BLUE="\033[0;34m"
@@ -745,3 +748,9 @@ stack_check() {
fi
fi
}
+
+kill_zed() {
+ if [ -f $ZED_PIDFILE ]; then
+ kill $(cat $ZED_PIDFILE)
+ fi
+}