sysutils/tuptime: update to 3.4.0

PR:	231632
Submitted by:	rfraile@rfraile.eu
Approved by:	tcberner (mentor, implicit), jeremy@smart-serv.net (maintainer)
This commit is contained in:
Fernando Apesteguía 2018-09-25 16:25:43 +00:00
parent 3e4fbe67b3
commit 7fea5f4262
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=480685
4 changed files with 31 additions and 25 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= tuptime
DISTVERSION= 3.3.3
DISTVERSION= 3.4.0
CATEGORIES= sysutils
MAINTAINER= jeremy@smart-serv.net
@ -13,22 +13,20 @@ LICENSE= GPLv2
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>=2.7:databases/py-sqlite3@${PY_FLAVOR}
USES= python:run shebangfix
SHEBANG_FILES= ${WRKSRC}/src/tuptime
USE_GITHUB= yes
GH_ACCOUNT= rfrail3
USE_RC_SUBR= ${PORTNAME}
NO_BUILD= yes
NO_ARCH= yes
USE_RC_SUBR= ${PORTNAME}
SHEBANG_FILES= ${WRKSRC}/src/tuptime ${WRKSRC}/scripts/*
SUB_FILES= pkg-message
PLIST_FILES= bin/tuptime \
${EXAMPLESDIR}/db-tuptime-migrate.sh \
${EXAMPLESDIR}/db-tuptime-migrate-3.0-to-3.1.sh
man/man1/tuptime.1.gz
do-install:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/src/tuptime ${STAGEDIR}${PREFIX}/bin/tuptime
${INSTALL_SCRIPT} ${WRKSRC}/scripts/db-tuptime-migrate.sh ${STAGEDIR}${EXAMPLESDIR}/db-tuptime-migrate.sh
${INSTALL_SCRIPT} ${WRKSRC}/scripts/db-tuptime-migrate-3.0-to-3.1.sh ${STAGEDIR}${EXAMPLESDIR}/db-tuptime-migrate-3.0-to-3.1.sh
${INSTALL_MAN} ${WRKSRC}/src/man/tuptime.1 ${STAGEDIR}${MANPREFIX}/man/man1
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1519352885
SHA256 (rfrail3-tuptime-3.3.3_GH0.tar.gz) = be4dc5207859eeb0e6cfef206db5dd62b553e69ac0641c7203278cdd61c95bea
SIZE (rfrail3-tuptime-3.3.3_GH0.tar.gz) = 35348
TIMESTAMP = 1537724492
SHA256 (rfrail3-tuptime-3.4.0_GH0.tar.gz) = 9f917daed6d3a6f592072a3165d99c7b41fc4e8ed6e2e4fbc4ab670fb0c1c82b
SIZE (rfrail3-tuptime-3.4.0_GH0.tar.gz) = 43003

View File

@ -1,12 +1,13 @@
======================================================================
tuptime requires the following be added to /etc/crontab:
tuptime requires execution at startup and shutdown on rc.d, please
add to /etc/rc.conf:
tuptime_enable="YES"
tuptime requires a scheduled execution on cron, please add to
/etc/crontab:
*/5 * * * * root %%PREFIX%%/bin/tuptime -x > /dev/null
If you are upgrading from an older version you need to run the following scripts:
%%EXAMPLESDIR%%/db-tuptime-migrate.sh
%%EXAMPLESDIR%%/db-tuptime-migrate-3.0-to-3.1.sh
======================================================================

View File

@ -1,32 +1,39 @@
# $FreeBSD$
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: tuptime
# REQUIRE: DAEMON
# KEYWORD: nojail shutdown
. /etc/rc.subr
name="tuptime"
rcvar=tuptime_enable
command="%%PREFIX%%/bin/tuptime"
tuptime_user="tuptime"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
export PATH=$PATH:/usr/local/bin/
tuptime_start()
{
command_args="-x"
$command $command_args
if /usr/sbin/pw usershow "${tuptime_user}" >/dev/null 2>&1; then
su -m ${tuptime_user} -c "$name $command_args"
else
$name $command_args
fi
}
tuptime_stop()
{
command_args="-xg"
$command $command_args
if /usr/sbin/pw usershow "${tuptime_user}" >/dev/null 2>&1; then
su -m ${tuptime_user} -c "$name $command_args"
else
$name $command_args
fi
}
load_rc_config $name