diff options
author | fernape <fernape@FreeBSD.org> | 2018-09-26 00:25:43 +0800 |
---|---|---|
committer | fernape <fernape@FreeBSD.org> | 2018-09-26 00:25:43 +0800 |
commit | 98f2b017277fb17bbc951bcf9be5eb9b8caf2428 (patch) | |
tree | d45947a9e8733dbf0414ccea9a95012abf1e691a /sysutils | |
parent | 534e2ed145586ca253ba84457853e9e26faa0453 (diff) | |
download | freebsd-ports-gnome-98f2b017277fb17bbc951bcf9be5eb9b8caf2428.tar.gz freebsd-ports-gnome-98f2b017277fb17bbc951bcf9be5eb9b8caf2428.tar.zst freebsd-ports-gnome-98f2b017277fb17bbc951bcf9be5eb9b8caf2428.zip |
sysutils/tuptime: update to 3.4.0
PR: 231632
Submitted by: rfraile@rfraile.eu
Approved by: tcberner (mentor, implicit), jeremy@smart-serv.net (maintainer)
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/tuptime/Makefile | 14 | ||||
-rw-r--r-- | sysutils/tuptime/distinfo | 6 | ||||
-rw-r--r-- | sysutils/tuptime/files/pkg-message.in | 11 | ||||
-rw-r--r-- | sysutils/tuptime/files/tuptime.in | 23 |
4 files changed, 30 insertions, 24 deletions
diff --git a/sysutils/tuptime/Makefile b/sysutils/tuptime/Makefile index 43e2141bd4d8..80e582a980a0 100644 --- a/sysutils/tuptime/Makefile +++ b/sysutils/tuptime/Makefile @@ -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> diff --git a/sysutils/tuptime/distinfo b/sysutils/tuptime/distinfo index b1ca830f6c53..e4c32e4768b8 100644 --- a/sysutils/tuptime/distinfo +++ b/sysutils/tuptime/distinfo @@ -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 diff --git a/sysutils/tuptime/files/pkg-message.in b/sysutils/tuptime/files/pkg-message.in index c40c87487099..89a9d77859f3 100644 --- a/sysutils/tuptime/files/pkg-message.in +++ b/sysutils/tuptime/files/pkg-message.in @@ -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: - */5 * * * * root %%PREFIX%%/bin/tuptime -x > /dev/null + tuptime_enable="YES" -If you are upgrading from an older version you need to run the following scripts: +tuptime requires a scheduled execution on cron, please add to +/etc/crontab: - %%EXAMPLESDIR%%/db-tuptime-migrate.sh - %%EXAMPLESDIR%%/db-tuptime-migrate-3.0-to-3.1.sh + */5 * * * * root %%PREFIX%%/bin/tuptime -x > /dev/null ====================================================================== diff --git a/sysutils/tuptime/files/tuptime.in b/sysutils/tuptime/files/tuptime.in index c41ee49a0b35..817a7eadd976 100644 --- a/sysutils/tuptime/files/tuptime.in +++ b/sysutils/tuptime/files/tuptime.in @@ -1,32 +1,39 @@ -#!/bin/sh -# # $FreeBSD$ +#!/bin/sh # # 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 |