aboutsummaryrefslogtreecommitdiffstats
path: root/x11/slim
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2011-05-02 02:46:39 +0800
committerdougb <dougb@FreeBSD.org>2011-05-02 02:46:39 +0800
commit9129efabd3005514dba624d35b11a03aef69b8e6 (patch)
tree1028ce14c28fa8856b69bb7ae48a2baebea535b5 /x11/slim
parent236e603335fe53aaca0600a54731e2597cbe0e84 (diff)
downloadfreebsd-ports-gnome-9129efabd3005514dba624d35b11a03aef69b8e6.tar.gz
freebsd-ports-gnome-9129efabd3005514dba624d35b11a03aef69b8e6.tar.zst
freebsd-ports-gnome-9129efabd3005514dba624d35b11a03aef69b8e6.zip
Conditionally take advantage of the new get_pidfile_from_conf in rc.subr
PR: ports/156594 Submitted by: me Approved by: maintainer
Diffstat (limited to 'x11/slim')
-rw-r--r--x11/slim/Makefile2
-rw-r--r--x11/slim/files/slim.sh.in15
2 files changed, 15 insertions, 2 deletions
diff --git a/x11/slim/Makefile b/x11/slim/Makefile
index 74611d633fa4..639148312d0b 100644
--- a/x11/slim/Makefile
+++ b/x11/slim/Makefile
@@ -7,7 +7,7 @@
PORTNAME= slim
PORTVERSION= 1.3.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_BERLIOS} \
http://depot.fsck.ch/mirror/distfiles/
diff --git a/x11/slim/files/slim.sh.in b/x11/slim/files/slim.sh.in
index 642cfacd0045..7141f6a38923 100644
--- a/x11/slim/files/slim.sh.in
+++ b/x11/slim/files/slim.sh.in
@@ -30,12 +30,23 @@ load_rc_config $name
command=%%PREFIX%%/bin/slim
command_args="-d"
-pidfile=/var/run/slim.pid
+
+find_pidfile()
+{
+ if type get_pidfile_from_conf >/dev/null 2>&1 &&
+ get_pidfile_from_conf lockfile %%PREFIX%%/etc/${name}.conf; then
+ pidfile="$_pidfile_from_conf"
+ else
+ pidfile="/var/run/${name}.pid"
+ fi
+}
slim_rmfile ()
{
local file
+ [ -z "$pidfile" ] && find_pidfile
+
for file in $pidfile /var/run/slim.auth; do
[ -e "$file" ] && unlink $file
done
@@ -47,6 +58,8 @@ slim_prestop ()
{
local xpid
+ find_pidfile
+
xpid=`ps -axww | grep '/bin/[X] .* -auth /var/run/slim.auth'`
xpid="${xpid## }"
[ -n "$xpid" ] && kill ${xpid%% *}
span title='2015-03-20 18:00:24 +0800'>2015-03-204-19/+18 * Update USE_GITHUB so it does not require GH_COMMIT.bdrewery2015-03-201-1/+1 * - Add LICENSEdecke2015-03-172-1/+3 * - Update to 2.15.2decke2015-03-173-45/+49 * Clean up the rest of the perl@ Makefiles a bit.adamw2015-03-143-15/+6 * finance/tryton28: version updaterm2015-03-0880-200/+160 * - Update to 4.12.2wen2015-03-072-3/+3 * - Update to 1.6.0.14wen2015-03-072-3/+3 * - Add PORTSCOUTsunpoet2015-03-071-0/+2 * Remove expired ports:rene2015-03-018-278/+0 * - Update to 4.7.1jhale2015-02-266-103/+169 * - Remove deprecated USE_KDE4=kdehiermakc2015-02-201