1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Fix rc script

- Remove @stopdaemon
- Bump PORTREVISION

PR:		ports/169251
Submitted by:	Mark Felder <feld@feld.me>
Approved by:	Rodrigo OSORIO <rodrigo@bebik.net> (maintainer)
This commit is contained in:
Steve Wills 2012-06-29 16:22:41 +00:00
parent cdd9bb61a7
commit f71c51f66e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=300217
3 changed files with 43 additions and 5 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= smokeping
PORTVERSION= 2.6.7
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= net-mgmt www
MASTER_SITES= http://oss.oetiker.ch/smokeping/pub/ \
http://smokeping.cs.pu.edu.tw/pub/

View File

@ -2,7 +2,7 @@
# $FreeBSD$
# PROVIDE: smokeping
# REQUIRE: sshd
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Define these smokeping_* variables in one of these files:
@ -23,7 +23,7 @@ smokeping_group=${smokeping_group-"%%GROUPS%%"}
. /etc/rc.subr
name="smokeping"
rcvar=smokeping_enable
rcvar="smokeping_enable"
load_rc_config $name
command="/usr/local/bin/smokeping"
command_args="--logfile=${smokeping_logfile}"
@ -31,11 +31,50 @@ pidfile="${smokeping_pidfile}"
extra_commands="reload"
reload_cmd="smokeping_reloadcmd"
start_precmd="smokeping_startprecmd"
stop_cmd="smokeping_stopcmd"
status_cmd="smokeping_statuscmd"
smokeping_reloadcmd()
{
$command --reload
}
run_rc_command "$1"
smokeping_statuscmd()
{
if [ ! -e $pidfile ];
then
echo "pidfile does not exist. $name is not running?";
exit 1;
fi
if pgrep -F $pidfile >/dev/null;
then
echo "$name is running.";
else
echo "$name is not running.";
exit 1;
fi
}
smokeping_stopcmd()
{
if pgrep -F $pidfile >/dev/null;
then
kill $sig_stop `cat $pidfile`;
wait_for_pids `cat $pidfile`;
else
echo "$name is not running.";
exit 1;
fi
}
smokeping_startprecmd()
{
if [ ! -e $smokeping_logfile ];
then
install -o %%USERS%% -g %%GROUPS%% /dev/null $smokeping_logfile || echo "ERROR: Could not initialize logfile at $smokeping_logfile.";
fi
}
run_rc_command "$1"

View File

@ -1,4 +1,3 @@
@stopdaemon smokeping
bin/smokeinfo
bin/smokeping
bin/smokeping_cgi