install: all
$(INSTALL) trinketd /usr/local/sbin/trinketd
- $(INSTALL) rc.d/trinketd /usr/local/etc/rc.d/trinketd
+ $(INSTALL) rc.d/trinketd /usr/local/etc/rc.d/trinketd
+ [ -d /var/db/trinket ] || mkdir -p /var/db/trinket
+ [ -f /var/log/trinketd.log ] || touch /var/log/trinketd.log
--- /dev/null
+Trinketd - driver and collecting tool for Atom Pro/Atom mini 2.
+
+The tool was developed for FreeBSD but it should be very easy to port it on
+Linux.
+
+trinketd [-d] [-p pidfile] [-P period] [-D datadir] [-i tics] [-l logfile]
+
+-i d - daemonize
+-p pidfile - create a pid-file
+-P period - collection period, in seconds, default 300 secs
+-D datadir - directory to place output file, default stdout
+-i tics - the number of samples for the moving average, default 1
+-l logfile - name of log file, if absent will send to syslog if daemonize else
+ stderr
+
+Copyright (c) 2016, Teodor Sigaev <teodor@sigaev.ru>
usage(const char *errmsg) {
puts("trinketd - collecting info from AtomPro");
puts("Copyright (c) 2016, Teodor Sigaev <teodor@sigaev.ru>");
- puts("trinketd [-d] [-p pidfile] [-P period] [-D datadir] [-i tics]");
+ puts("trinketd [-d] [-p pidfile] [-P period] [-D datadir] [-i tics] [-l logfile");
if (errmsg) {
puts("");