summaryrefslogtreecommitdiffstats
path: root/misc/upclient
diff options
context:
space:
mode:
authorpat <pat@FreeBSD.org>2001-11-19 06:38:34 +0000
committerpat <pat@FreeBSD.org>2001-11-19 06:38:34 +0000
commit23752b84ee1d556bc2cb3d746a7b0a9b1a24a1aa (patch)
treeac8e045448dc79778e26b6c6d501410764a974c1 /misc/upclient
parentdbe9af44a50f043147b866c706d6a1d4e1c06397 (diff)
downloadFreeBSD-ports-23752b84ee1d556bc2cb3d746a7b0a9b1a24a1aa.zip
FreeBSD-ports-23752b84ee1d556bc2cb3d746a7b0a9b1a24a1aa.tar.gz
Update to 4.2.1.23 The Uptimes Project is back!
PR: 32080 Submitted by: maintainer Approved by: lioux
Diffstat (limited to 'misc/upclient')
-rw-r--r--misc/upclient/Makefile84
-rw-r--r--misc/upclient/distinfo2
-rw-r--r--misc/upclient/files/patch-aa17
-rw-r--r--misc/upclient/files/patch-ab15
-rw-r--r--misc/upclient/files/patch-options.c37
-rw-r--r--misc/upclient/files/patch-options.h28
-rw-r--r--misc/upclient/files/patch-stats-bsd.c184
-rw-r--r--misc/upclient/files/patch-upchk15
-rw-r--r--misc/upclient/files/upclient.sh93
-rw-r--r--misc/upclient/pkg-descr2
-rw-r--r--misc/upclient/pkg-message28
-rw-r--r--misc/upclient/pkg-plist13
12 files changed, 248 insertions, 270 deletions
diff --git a/misc/upclient/Makefile b/misc/upclient/Makefile
index bad8791..d13ccf3 100644
--- a/misc/upclient/Makefile
+++ b/misc/upclient/Makefile
@@ -6,33 +6,81 @@
#
PORTNAME= upclient
-PORTVERSION= 4.2.1.21
-PORTREVISION= 1
+PORTVERSION= 4.2.1.23
CATEGORIES= misc
-MASTER_SITES= http://uptimes.atomicvoid.net/files/ \
- ftp://ftp.uptimes.net/pub/uptimes/ \
- http://www.uptimes.net/download/
+MASTER_SITES= http://uptimes.atomicvoid.net/files/
MAINTAINER= clefevre@citeweb.net
-BROKEN= The 'uptime' project is closed for an undetermined period of \
- time. You are advised to shutdown your uptime client until \
- the new version is ready. See http://www.uptimes.net/ for \
- details.
+# Global variables
+#
ALL_TARGET= bsd
BUILD_WRKSRC= ${WRKSRC}/src
-post-patch:
- @${PERL} -pi.fbsd -e 's.!!PREFIX!!.${PREFIX}.g' ${WRKSRC}/scripts/upchk
+MSG_FILE= ${PKGDIR}/pkg-message
+PKGMESSAGE= ${WRKDIR}/pkg-message
+
+# Local variables
+#
+
+DOC_FILES= AUTHORS COPYING FAQ HISTORY INSTALL README TODO
+
+.include <bsd.port.pre.mk>
-do-install:
- @${INSTALL_SCRIPT} ${FILESDIR}/upclient.sh ${PREFIX}/etc/rc.d/upclient.sh
- @${INSTALL_DATA} -m 600 ${WRKSRC}/upclient.conf ${PREFIX}/etc/upclient.conf.sample
+# Post-patch
+#
+
+post-patch: patch-script patch-message
+
+patch-script:
+ @${PERL} -pi.fbsd -e 's.%%PREFIX%%.${PREFIX}.g' ${WRKSRC}/scripts/upchk
+
+patch-message:
+ @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE}
+
+# Install
+#
+
+do-install: install-program install-sample install-script
+
+install-program:
+ @${INSTALL_PROGRAM} -g kmem -m 2555 ${WRKSRC}/src/upclient \
+ ${PREFIX}/sbin/upclient
+
+install-sample:
+ @${INSTALL_DATA} -m 600 ${WRKSRC}/conf/upclient.conf \
+ ${PREFIX}/etc/upclient.conf.sample
+
+install-script:
@${INSTALL_SCRIPT} ${WRKSRC}/scripts/upchk ${PREFIX}/sbin/upchk
- @${INSTALL_PROGRAM} -g kmem -m 2555 ${WRKSRC}/src/upclient ${PREFIX}/sbin/upclient
-post-install:
- @${CAT} ${PKGMESSAGE} | ${SED} 's:/usr/local:${PREFIX}:g'
+# Post-install
+#
+
+post-install: install-conf install-startup install-doc display-message
+
+install-conf:
+.if !exists(${PREFIX}/etc/upclient.conf)
+ @${CP} -p ${PREFIX}/etc/upclient.conf.sample \
+ ${PREFIX}/etc/upclient.conf
+.endif
+
+install-startup:
+ @${INSTALL_SCRIPT} ${FILESDIR}/upclient.sh \
+ ${PREFIX}/etc/rc.d/upclient.sh
+
+install-doc:
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for file in ${DOC_FILES}
+ @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+.endfor
+.endif
+
+display-message:
+ @${ECHO_MSG}
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO_MSG}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/misc/upclient/distinfo b/misc/upclient/distinfo
index 4bde50c..7e09818 100644
--- a/misc/upclient/distinfo
+++ b/misc/upclient/distinfo
@@ -1 +1 @@
-MD5 (upclient-4.2.1.21.tar.gz) = 5b6ceecabb36921bbcf7dd6eebdb73c2
+MD5 (upclient-4.2.1.23.tar.gz) = 4c23b4623ecd490b5d3e31ac67f20feb
diff --git a/misc/upclient/files/patch-aa b/misc/upclient/files/patch-aa
index b743569..7a5c4bb 100644
--- a/misc/upclient/files/patch-aa
+++ b/misc/upclient/files/patch-aa
@@ -1,6 +1,6 @@
---- src/Makefile.orig Mon Dec 18 14:44:48 2000
-+++ src/Makefile Sat Dec 30 02:44:49 2000
-@@ -8,7 +8,7 @@
+--- src/Makefile.orig Sun Jun 17 00:48:35 2001
++++ src/Makefile Sun Nov 18 15:58:37 2001
+@@ -9,7 +9,7 @@
####
# Location of config file (for example /etc/upclient.conf)
#
@@ -9,16 +9,7 @@
####
-@@ -41,7 +41,7 @@
-
- bsd:
- $(MAKE) CC=gcc \
-- LDFLAGS= \
-+ LDFLAGS="-lkvm" \
- OBJECTS='stats-bsd.c $(STDOPTS)' \
- CFLAGS='-DPLATFORM_BSD -DCONFIGFILE=\"$(CONFIGFILE)\"' \
- upclient
-@@ -88,7 +88,7 @@
+@@ -113,7 +113,7 @@
CFLAGS='-DPLATFORM_WINNT -DCONFIGFILE=\"$(CONFIGFILE)\"' \
upclient
diff --git a/misc/upclient/files/patch-ab b/misc/upclient/files/patch-ab
index 1f1af40..df189f5 100644
--- a/misc/upclient/files/patch-ab
+++ b/misc/upclient/files/patch-ab
@@ -1,16 +1,13 @@
---- upclient.conf.orig Wed Dec 27 00:48:16 2000
-+++ upclient.conf Sat Dec 30 06:11:27 2000
-@@ -4,11 +4,11 @@
- # upclient.conf
- #
-
--PidFile = /home/alex/.upclient.pid # Location of pid file
-+PidFile = /var/run/upclient.pid # Location of pid file
+--- conf/upclient.conf.orig Sat Jun 16 18:33:54 2001
++++ conf/upclient.conf Sun Nov 18 17:33:13 2001
+@@ -8,8 +8,8 @@
AuthKey = <your_authkey> # Your Authorization key
-Interval = 120 # Transmit interval
+-UptimeServer = data.uptimes.net # Uptimes Project's data server
+Interval = 550 # Transmit interval
- UptimeServer = data.uptimes.net # Uptimes Project's data server
++UptimeServer = uptimes.wonko.com # Uptimes Project's data server
SendIdleTime = 1 # Send your idle time
+ SendLoadAvg = 1 # Send load average
diff --git a/misc/upclient/files/patch-options.c b/misc/upclient/files/patch-options.c
index c6773e9..5f768b4 100644
--- a/misc/upclient/files/patch-options.c
+++ b/misc/upclient/files/patch-options.c
@@ -1,26 +1,15 @@
---- src/options.c.orig Wed Dec 27 00:41:53 2000
-+++ src/options.c Sat Dec 30 06:09:57 2000
-@@ -23,11 +23,7 @@
+--- src/options.c.orig Sat Jun 16 21:15:04 2001
++++ src/options.c Sun Nov 18 17:40:06 2001
+@@ -16,9 +16,9 @@
+ * These are the configuration options available.
+ */
+ char cfg_authkey[AUTHKEY_REQUIRED_LEN+1] = "";
+-char cfg_upserver[UPSERVER_MAXLEN+1] = "data.uptimes.net";
+-int cfg_interval = 120;
+-char cfg_pidfile[PIDFILE_MAXLEN+1] = ".upclient.pid";
++char cfg_upserver[UPSERVER_MAXLEN+1] = "uptimes.wonko.com";
++int cfg_interval = 550;
++char cfg_pidfile[PIDFILE_MAXLEN+1] = "/var/run/upclient.pid";
+ char cfg_proxyserver[PROXYSERVER_MAXLEN+1] = "";
int cfg_proxyport = 8080;
char cfg_proxyuser[PROXYUSER_MAXLEN+1] = "";
- char cfg_proxypass[PROXYPASS_MAXLEN+1] = "";
--#if defined(PLATFORM_BSD)
--int cfg_sendidle = 0;
--#else
- int cfg_sendidle = 1;
--#endif
- #if defined(PLATFORM_UNIXWARE)
- int cfg_sendload = 0;
- #else
-@@ -124,11 +120,7 @@
- strcpy(cfg_pidfile, value);
- }
- else if(strcmp(key, "SendIdleTime") == 0) {
--#if defined(PLATFORM_BSD)
-- ;
--#else
- cfg_sendidle = atol(value);
--#endif
- }
- else if(strcmp(key, "SendLoadAvg") == 0) {
- #if defined(PLATFORM_UNIXWARE)
diff --git a/misc/upclient/files/patch-options.h b/misc/upclient/files/patch-options.h
index ae8744b..d3b6d58 100644
--- a/misc/upclient/files/patch-options.h
+++ b/misc/upclient/files/patch-options.h
@@ -1,26 +1,14 @@
---- src/options.h.orig Mon Dec 18 01:22:43 2000
-+++ src/options.h Sat Dec 30 02:49:11 2000
-@@ -33,19 +33,11 @@
- extern int cfg_proxyport;
+--- src/options.h.orig Sat Jun 16 17:45:50 2001
++++ src/options.h Sun Nov 18 16:08:56 2001
+@@ -34,11 +34,7 @@
extern char cfg_proxyuser[PROXYUSER_MAXLEN+1];
extern char cfg_proxypass[PROXYPASS_MAXLEN+1];
--#if defined(PLATFORM_BSD)
extern int cfg_sendidle;
--#else
--extern int cfg_sendidle;
--#endif
-#if defined(PLATFORM_UNIXWARE)
--extern cfg_sendload;
+ extern int cfg_sendload;
-#else
--extern cfg_sendload;
+-extern int cfg_sendload;
-#endif
--extern cfg_sendos;
--extern cfg_sendoslevel;
--extern cfg_sendcpu;
-+extern int cfg_sendload;
-+extern int cfg_sendos;
-+extern int cfg_sendoslevel;
-+extern int cfg_sendcpu;
-
- /* External global variables: set to reflect config options */
- extern int have_proxyserver;
+ extern int cfg_sendos;
+ extern int cfg_sendoslevel;
+ extern int cfg_sendcpu;
diff --git a/misc/upclient/files/patch-stats-bsd.c b/misc/upclient/files/patch-stats-bsd.c
index d53fa93..b5aea3f 100644
--- a/misc/upclient/files/patch-stats-bsd.c
+++ b/misc/upclient/files/patch-stats-bsd.c
@@ -1,21 +1,6 @@
---- src/stats-bsd.c.orig Mon Dec 18 14:32:19 2000
-+++ src/stats-bsd.c Sat Dec 30 03:26:15 2000
-@@ -12,57 +12,153 @@
- /* System includes */
- #include <stdio.h>
- #include <errno.h>
-+#include <fcntl.h>
-+#include <limits.h>
-+#include <kvm.h>
- #include <syslog.h>
- #include <sys/time.h>
- #include <sys/param.h>
- #include <sys/sysctl.h>
-+#include <sys/dkstat.h>
-+#include <devstat.h>
- #include <sys/utsname.h>
-
- /**
+--- src/stats-bsd.c.orig Sat Jun 16 21:12:53 2001
++++ src/stats-bsd.c Sun Nov 18 17:33:52 2001
+@@ -26,37 +26,50 @@
* @desc Get statistics
*/
void getstats(unsigned long *puptime, double *pload, int *pidle, char *os, char *oslevel, char *cpu) {
@@ -24,137 +9,68 @@
- time_t now;
size_t size;
- double loadavgs[2];
-- int mib[2];
-+ int mib [2];
-+
-+ { /* ========== uptime ========== */
+ int mib[2];
+
+- /* Get uptime */
+- time(&now);
++ { /* ========== uptime ========== */
+ static struct timeval boottime;
+ static int initialized = 0;
++ time_t now;
+
+ if (!initialized) {
+ initialized = 1;
+
-+ mib [0] = CTL_KERN;
-+ mib [1] = KERN_BOOTTIME;
-+
-+ size = sizeof (boottime);
-
-- /* Get uptime */
-- time(&now);
-- mib[0] = CTL_KERN;
-- mib[1] = KERN_BOOTTIME;
-- size = sizeof(boottime);
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_BOOTTIME;
+ size = sizeof(boottime);
- if(sysctl(mib, 2, &boottime, &size, NULL, 0) != -1 && (boottime.tv_sec != 0)) {
-- *puptime = now - boottime.tv_sec;
-- *puptime /= 60;
-- }
--
-- if(cfg_sendload) {
-- /* Get load average */
-- getloadavg(loadavgs, 3);
-- /* Use the 3rd element (15 minute load average) */
-- *pload = loadavgs[2];
++
+ if (sysctl (mib, 2, &boottime, &size, NULL, 0) == -1)
+ err (1, "sysctl: kern.boottime");
- }
-
-- if(cfg_sendos) {
-- /* Get os info */
-- uname(&uts);
++ }
++
+ if (boottime.tv_sec) {
+ time_t now;
+
+ time (&now);
+
-+ *puptime = (now - boottime.tv_sec) / 60;
-+ }
+ *puptime = now - boottime.tv_sec;
+ *puptime /= 60;
+ }
+ }
+
-+ if (cfg_sendidle) { /* ========== idle_time ========== */
-+ static kvm_t *kp;
-+ static struct nlist namelist [] = {
-+#define X_CP_TIME 0
-+ { "_cp_time" },
-+ { NULL },
-+ };
++ if(cfg_sendload) { /* ========== loadavg ========== */
++ double loadavgs[3] = { 0. };
+
+- if(cfg_sendload) {
+- /* Get load average */
+ getloadavg(loadavgs, 3);
+ /* Use the 3rd element (15 minute load average) */
+ *pload = loadavgs[2];
+ }
+
+- if(cfg_sendos) {
+- /* Get os info */
+- uname(&uts);
+- }
++ if(cfg_sendcpu) { /* ========== cpu ========== */
++ static char buf [CPU_SIZE] = "";
+ static int initialized = 0;
+
+ if (!initialized) {
-+ char errbuf [_POSIX2_LINE_MAX];
+ initialized = 1;
-+
-+ setgid (getgid ());
-+
-+ kp = kvm_openfiles (NULL, NULL, NULL, O_RDONLY, errbuf);
-+
-+ if (!kp)
-+ warn ("kvm_openfiles: %s", errbuf);
-+ else if (kvm_nlist (kp, namelist) == -1)
-+ warn ("kvm_nlist: %s", kvm_geterr (kp));
-+ }
-+
-+ if (kp) {
-+ long ctime [CPUSTATES];
-+ static long stime [CPUSTATES];
-+ static int first_time = 1;
-+
-+ if (first_time) {
-+ first_time = 0;
-+
-+ if (kvm_read (kp, namelist [X_CP_TIME].n_value,
-+ stime, sizeof (stime)) == -1)
-+ warn ("kvm_read: %s", kvm_geterr (kp));
-+ else
-+ sleep (1); /* to avoid the initial 0 idle value */
- }
- if(cfg_sendcpu) {
- /* Get CPU info */
-- mib[0] = CTL_HW;
-- mib[1] = HW_MODEL;
-- size = CPU_SIZE;
+ mib[0] = CTL_HW;
+ if(cfg_sendcpulevel == 1) {
+ mib[1] = HW_MACHINE; /* Send architecture */
+@@ -64,17 +77,35 @@
+ mib[1] = HW_MODEL; /* Send architecture's specific model */
+ }
+ size = CPU_SIZE;
- sysctl(mib, 2, cpu, &size, NULL, 0);
-+ if (kvm_read(kp, namelist [X_CP_TIME].n_value,
-+ ctime, sizeof (ctime)) == -1)
-+ warn ("kvm_read: %s", kvm_geterr (kp));
-+ else {
-+ int state;
-+ double time = 0.;
-+
-+ for (state = 0; state < CPUSTATES; state++)
-+ time += ctime [state] - stime [state];
-+
-+ if (time == 0.)
-+ time = 1.;
-+
-+ *pidle = (ctime [CP_IDLE] - stime [CP_IDLE]) * 100. / time;
-+
-+ for (state = 0; state < CPUSTATES; state++)
-+ stime [state] = ctime [state];
-+ }
-+ } else
-+ cfg_sendidle = 0;
-+ }
-+
-+ if (cfg_sendload) { /* ========== loadavg ========== */
-+ double loadavgs [3] = { 0. };
-+
-+ getloadavg (loadavgs, 3);
-+
-+ *pload = loadavgs [2];
-+ }
-+
-+ if (cfg_sendcpu) { /* ========== cpu ========== */
-+ static char buf [CPU_SIZE] = "";
-+ static int initialized = 0;
-+
-+ if (!initialized) {
-+ initialized = 1;
-+
-+ mib [0] = CTL_HW;
-+ mib [1] = HW_MODEL;
-+
-+ size = sizeof (buf);
+
+ if (sysctl (mib, 2, buf, &size, NULL, 0) == -1)
+ warn ("sysctl: hw.model");
@@ -165,24 +81,26 @@
}
if(cfg_sendos) {
-- strncpy(os, uts.sysname, OS_SIZE - 1);
-- if(cfg_sendoslevel) {
-- strncpy(oslevel, uts.release, OSLEVEL_SIZE - 1);
+ static struct utsname uts;
+ static int initialized = 0;
+
+ if (!initialized) {
+ initialized = 1;
-+
++
+ uname(&uts);
+ }
+
-+ strncpy (os, uts.sysname, OS_SIZE - 1);
+ strncpy(os, uts.sysname, OS_SIZE - 1);
+ os [OS_SIZE - 1] = 0;
+
-+ if (cfg_sendoslevel) {
-+ strncpy (oslevel, uts.release, OSLEVEL_SIZE - 1);
+ if(cfg_sendoslevel) {
+ strncpy(oslevel, uts.release, OSLEVEL_SIZE - 1);
+ oslevel [OSLEVEL_SIZE - 1] = 0;
}
}
- }
+
+- if(cfg_sendidle) {
++ if(cfg_sendidle) { /* ========== idle_time ========== */
+ static kvm_t *kp;
+ static int initialized = 0;
+ static struct nlist namelist [] = {
diff --git a/misc/upclient/files/patch-upchk b/misc/upclient/files/patch-upchk
index 434f5dc..dc4871d 100644
--- a/misc/upclient/files/patch-upchk
+++ b/misc/upclient/files/patch-upchk
@@ -1,16 +1,11 @@
---- scripts/upchk.orig Wed Nov 29 01:19:14 2000
-+++ scripts/upchk Sat Dec 30 00:19:54 2000
-@@ -24,11 +24,11 @@
+--- scripts/upchk.orig Fri Jun 1 01:30:24 2001
++++ scripts/upchk Sun Nov 18 16:45:59 2001
+@@ -24,7 +24,7 @@
#
# change this to the full path AND name of your upclient executable:
--upclient="/home/mydir/upclient"
-+upclient="!!PREFIX!!/sbin/upclient"
+-upclient="/usr/local/sbin/upclient"
++upclient="%%PREFIX%%/sbin/upclient"
# change this to the name of your upclient's pidfile (as defined in
# config.h of the upclient distribution)
--pidfile="/home/mydir/upclient.pid"
-+pidfile="/var/run/upclient.pid"
-
- ########## you probably don't need to change anything below here ##########
-
diff --git a/misc/upclient/files/upclient.sh b/misc/upclient/files/upclient.sh
index 70470e6..f124a7f 100644
--- a/misc/upclient/files/upclient.sh
+++ b/misc/upclient/files/upclient.sh
@@ -1,35 +1,80 @@
#!/bin/sh
+#
+# $FreeBSD$
+#
+# Start or stop upclient.
+#
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
-fi
+rc_file=${0##*/}
+rc_arg=$1
-if [ -f ${PREFIX}/etc/upclient.conf ]; then
- if grep -qs '^[ ]*AuthKey[ ]*=' ${PREFIX}/etc/upclient.conf; then
- if grep -qs '^[ ]*AuthKey[ ]*=[ ]*<your_authkey>' ${PREFIX}/etc/upclient.conf; then
- echo "upclient: AuthKey not configured in ${PREFIX}/etc/upclient.conf -- aborted." >&2
- exit 1
- fi
- else
- echo "upclient: ${PREFIX}/etc/upclient.conf is out of date -- aborted." >&2
- exit 1
- fi
-else
- echo "upclient: ${PREFIX}/etc/upclient.conf doesn't exist -- aborted." >&2
- exit 1
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${rc_file}\$"); then
+ echo "${rc_file}: Cannot determine PREFIX." >&2
+ echo "Please use the complete pathname." >&2
+ exit 64
fi
-case "$1" in
+program_dir=${PREFIX}/sbin
+program_file=upclient
+program_path=${program_dir}/${program_file}
+
+config_dir=${PREFIX}/etc
+config_file=${program_file}.conf
+config_path=${config_dir}/${config_file}
+
+pid_dir=/var/run
+pid_file=${program_file}.pid
+pid_path=${pid_dir}/${pid_file}
+
+syslog_facility=daemon.err
+
+case "$rc_arg" in
start)
- [ -x ${PREFIX}/sbin/upclient ] && ${PREFIX}/sbin/upclient > /dev/null && echo -n ' upclient'
- ;;
+ if [ ! -x ${program_path} ]; then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: ${program_path} is missing."
+ exit 72
+ fi
+ if [ ! -f ${config_path} ]; then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: ${config_path} is missing."
+ exit 72
+ fi
+ ws=" "
+ if ! grep -qs "^[$ws]*AuthKey[$ws]*=" ${config_path}; then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: AuthKey is missing from" \
+ "${config_path}."
+ exit 72
+ fi
+ if grep -qs "^[$ws]*AuthKey[$ws]*=[$ws]*<your_authkey>" ${config_path}
+ then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: AuthKey isn't configured in" \
+ "${config_path}."
+ exit 72
+ fi
+ ${program_path} &&
+ echo -n " ${program_file}"
+ ;;
stop)
- [ -r /var/run/upclient.pid ] && kill `cat /var/run/upclient.pid` > /dev/null && echo -n ' upclient'
- ;;
+ if [ -r ${pid_path} ]; then
+ kill $(cat ${pid_path}) 2> /dev/null
+ else
+ killall ${program_file} 2> /dev/null
+ fi
+ ;;
+restart)
+ $0 stop
+ $0 start
+ ;;
+status)
+ ps -auxww | egrep ${program_file} | egrep -v "($0|egrep)"
+ ;;
*)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
+ echo "usage: ${rc_file} {start|stop|restart|status}" >&2
+ exit 64
+ ;;
esac
exit 0
diff --git a/misc/upclient/pkg-descr b/misc/upclient/pkg-descr
index 7dcce57..2b6e9e8d 100644
--- a/misc/upclient/pkg-descr
+++ b/misc/upclient/pkg-descr
@@ -2,4 +2,4 @@ Uptime Client is a little program that keeps track of your uptime and
sends it to a server where you can compare it to many other hosts and
browse through various statistical information.
-WWW: http://www.uptimes.net/
+WWW: http://uptimes.wonko.com/
diff --git a/misc/upclient/pkg-message b/misc/upclient/pkg-message
index 0e97ac3..aa66e81 100644
--- a/misc/upclient/pkg-message
+++ b/misc/upclient/pkg-message
@@ -1,25 +1,23 @@
Before running the client for the first time, be sure to:
- 1. visit the Server Uptimes project web site and register yourself
- (WWW: http://www.uptimes.net/bottom.html?show=createaccount).
-
- 2. validate your registration
- (WWW: http://www.uptimes.net/bottom.html?show=validate).
-
- 2. log in (WWW: http://www.uptimes.net/bottom.html?show=login).
-
- 3. Add your host (WWW: http://www.uptimes.net/bottom.html?show=addhost).
+ 1. visit the Uptimes project's web site and register yourself
+ (WWW: http://uptimes.wonko.com/newuser.php).
+ 2. log in (WWW: http://uptimes.wonko.com/).
+ 3. Add your host (WWW: http://uptimes.wonko.com/hosts.php?op=add).
+ It is very important that you do not lose the generated key
+ since, for instance, they are no way to get it back by any way.
Note that in order to send your uptime information to the uptime server,
you hosts need more-or-less full-time Internet access.
-You will also have to edit /usr/local/etc/upclient.conf:
-
- - AuthKey is the ID you've received when you added your host
- (WWW: http://www.uptimes.net/bottom.html?show=hosts).
+You will also have to edit %%PREFIX%%/etc/upclient.conf:
+ - AuthKey is the ID you've received when you added your host.
- Interval is the amount of time between each update.
- (WWW: http://www.uptimes.net/stuff/protocol.html)
-
+ (WWW: http://uptimes.wonko.com/uptimes42.html).
Don't set this higher than 10 minutes, or else your host
won't appear in the list.
+ - UptimeServer is the Uptimes Project's data server, currently
+ uptimes.wonko.com (Since the official Uptimes Project's data
+ server has been terminated, data.uptimes.net must not be used
+ anymore. So, please, take care about that).
diff --git a/misc/upclient/pkg-plist b/misc/upclient/pkg-plist
index eca9fa1..8833786 100644
--- a/misc/upclient/pkg-plist
+++ b/misc/upclient/pkg-plist
@@ -1,6 +1,15 @@
+@comment $FreeBSD$
etc/rc.d/upclient.sh
+@unexec if cmp -s %D/etc/upclient.conf %D/etc/upclient.conf.sample; then rm -f %D/etc/upclient.conf; fi
etc/upclient.conf.sample
-@exec [ -f %B/upclient.conf ] || cp %B/%f %B/upclient.conf
-@unexec if cmp -s %B/%f %B/upclient.conf; then rm -f %B/upclient.conf; fi
+@exec [ -f %D/etc/upclient.conf ] || cp -p %D/etc/upclient.conf.sample %D/etc/upclient.conf
sbin/upchk
sbin/upclient
+%%PORTDOCS%%share/doc/upclient/AUTHORS
+%%PORTDOCS%%share/doc/upclient/COPYING
+%%PORTDOCS%%share/doc/upclient/FAQ
+%%PORTDOCS%%share/doc/upclient/HISTORY
+%%PORTDOCS%%share/doc/upclient/INSTALL
+%%PORTDOCS%%share/doc/upclient/README
+%%PORTDOCS%%share/doc/upclient/TODO
+%%PORTDOCS%%@dirrm share/doc/upclient
OpenPOWER on IntegriCloud