mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
- Update to to 1.26.b4
PR: 158591 Submitted by: maintainer
This commit is contained in:
parent
e541d77200
commit
84c5423927
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=276880
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= atop
|
||||
PORTVERSION= 1.26.b3
|
||||
PORTVERSION= 1.26.b4
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= ${MASTER_SITE_BERLIOS}
|
||||
MASTER_SITE_SUBDIR=atop-freebsd
|
||||
@ -24,6 +24,8 @@ LOGDIR?= /var/log/atop
|
||||
|
||||
USE_RC_SUBR= atop
|
||||
PLIST_SUB+= LOGDIR="${LOGDIR}"
|
||||
SUB_FILES= pkg-message
|
||||
SUB_LIST= LOGDIR="${LOGDIR}"
|
||||
|
||||
do-install:
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/atop ${PREFIX}/bin
|
||||
@ -38,5 +40,6 @@ do-install:
|
||||
${INSTALL_MAN} ${WRKSRC}/AUTHOR ${WRKSRC}/ChangeLog \
|
||||
${WRKSRC}/README ${DOCSDIR}
|
||||
.endif
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (atop-1.26.fbsd.beta3.tar.bz2) = 5c06ee28cc215a88ccec25555253d5d732d7ce5fb43b8c2931f37283fc40f1c8
|
||||
SIZE (atop-1.26.fbsd.beta3.tar.bz2) = 130202
|
||||
SHA256 (atop-1.26.fbsd.beta4.tar.bz2) = 1ac8ebc8ed47c2789f2eb22b4a84e3b2e624b6c55cc6c827026e3821e861fbb0
|
||||
SIZE (atop-1.26.fbsd.beta4.tar.bz2) = 130254
|
||||
|
@ -21,7 +21,9 @@ atop_pidfile="/var/run/atop.pid"
|
||||
name="atop"
|
||||
rcvar=`set_rcvar`
|
||||
command="%%PREFIX%%/bin/atop"
|
||||
extra_commands="rotate"
|
||||
start_cmd="atop_start"
|
||||
rotate_cmd="atop_rotate"
|
||||
|
||||
atop_start()
|
||||
{
|
||||
@ -29,14 +31,26 @@ atop_start()
|
||||
echo 1>&2 "${name} already running? (pid=$rc_pid)."
|
||||
return 1
|
||||
fi
|
||||
check_startmsgs && echo "Starting ${name}."
|
||||
/usr/sbin/daemon -p $pidfile ${command} -w /var/log/atop/atop_`date '+%Y%m%d'` ${atop_flags} ${atop_interval}
|
||||
echo "Starting ${name}."
|
||||
/usr/sbin/daemon -p $pidfile ${command} -w ${atop_logdir}/atop_`date '+%Y%m%d'` ${atop_flags} ${atop_interval}
|
||||
_run_rc_postcmd
|
||||
}
|
||||
|
||||
atop_rotate()
|
||||
{
|
||||
|
||||
echo "Rotating logfile (${name})."
|
||||
# write final sample and stop
|
||||
sig_stop=SIGUSR2
|
||||
/usr/bin/find $atop_logdir -name atop_???????? -mtime +${atop_keepdays} -exec rm {} \;
|
||||
run_rc_command "restart"
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${atop_logdir="%%LOGDIR%%"}
|
||||
: ${atop_interval=10}
|
||||
: ${atop_keepdays=30}
|
||||
: ${atop_flags=""}
|
||||
|
||||
pidfile="${atop_pidfile}"
|
||||
|
21
sysutils/atop/files/pkg-message.in
Normal file
21
sysutils/atop/files/pkg-message.in
Normal file
@ -0,0 +1,21 @@
|
||||
****************************************************************************
|
||||
|
||||
atop succesfully installed. To run in interactive mode use "atop" command.
|
||||
|
||||
To run the atop in collecting mode from startup, add
|
||||
|
||||
atop_enable="YES"
|
||||
|
||||
in your /etc/rc.conf.
|
||||
|
||||
You will also need to add "rotate" command to the system crontab:
|
||||
|
||||
0 0 * * * %%PREFIX%%/etc/rc.d/atop rotate
|
||||
|
||||
To change number of days to keep the logs (default - 30) use atop_keepdays
|
||||
variable in your /etc/rc.conf file.
|
||||
|
||||
To change default (10 seconds) interval use atop_inteval (e.g. atop_interval=5)
|
||||
in /etc/rc.conf
|
||||
|
||||
****************************************************************************
|
Loading…
Reference in New Issue
Block a user