Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi, guys,
I asked there (http://dns323.kood.org/forum/viewtopic.php?id=7349) but nobody answered.
So I'm trying a chance here
Can somebody kindly compile and set as a package the network ups tools (NUT) with snmp-ups and CGI support (--with-snmp --with-cgi options) for my DNS-343 with ffp-0.7
NUT 2.6.5 here: https://github.com/networkupstools/nut
all mans here: http://buildbot.networkupstools.org/~bu … ing_source
P.S. And I do not know where to find libsnmp package or its files
Thanks a lot for your help,
Stranger
Last edited by Stranger (2013-03-16 21:27:03)
Offline
Here you are: nut-2.6.5-arm-0.txz. It's at least dependent on libusb-1.0 and libgd, which are on the same page (and in slacker). libgd is dependent on libpng and libjpeg.
Let me know if you have developed any startscripts and configuration files, which can be added to the package.
Offline
Urah-urah-urah!!!
Thank you.
I'll test and report
P.S. Guys, you are like wizards!!!
Stranger
Offline
1. snmp-ups is working as well as net-snmp!
2. could not understand whether .cgi works
3. does somebody need a short instruction (for snmp configs)?
3. Please place the "/ffp/start/upsd.sh.new" script into appropriate path with rw-r--r-- (644) permissions
Content of the "/ffp/start/upsd.sh.new":
#!/ffp/bin/sh
# Original by Stranger
# PROVIDE: upsd
# REQUIRE: none
. /ffp/etc/ffp.subr
name="upsd"
command="/ffp/sbin/upsd"
upsd_configuration="/ffp/etc/upsd.conf"
upsd_flags=""
required_files="/ffp/etc/ups.conf"
extra_commands="reload logstart logstop"
start_cmd="upsd_start"
stop_cmd="upsd_stop"
status_cmd="upsd_status"
check_cmd="upsd_check"
reload_cmd="upsd_reload"
logstart_cmd="upsd_logstart"
logstop_cmd="upsd_logstop"
# user settings
ups_name="your-ups-name-here"
upsdrvctl_command="/ffp/bin/upsdrvctl"
log_command="/ffp/bin/upslog"
log_file="/path/to/log-file.log"
log_format="%TIME @Y@m@d,@H@M@S%,%VAR battery.charge%,%VAR input.voltage%,%VAR ups.load%,[%VAR ups.status%],%VAR ups.temperature%,%VAR input.frequency%"
mon_command="/ffp/sbin/upsmon"
upsd_start()
{
echo "Starting driver"
$upsdrvctl_command start 2>&1
echo "Starting ups data server"
$command 2>&1
echo "Starting ups monitoring..."
$mon_command 2>&1
}
upsd_stop()
{
echo "Stopping ups monitoring..."
$mon_command -c stop
echo "Stopping ups data server"
[ $(pidof -g upsd) -gt 0 ] && $command -c stop 2>&1
echo "Stopping driver"
$upsdrvctl_command stop 2>&1
}
upsd_status()
{
if [ $(pidof -g upsmon) -gt 0 ]; then
echo "ups monitoring are running... with pids $(pidof upsmon)"
else
echo "ups monitoring are stopped"
fi
if [ $(pidof -g upsd) -gt 0 ]; then
echo "upsd services are running... with pids $(pidof upsd)"
else
echo "upsd services are stopped"
fi
if [ $(pidof -g snmp-ups) -gt 0 ]; then
echo "snmp-ups drivers are running... with pids $(pidof snmp-ups)"
else
echo "snmp-ups drivers are stopped"
fi
}
upsd_reload()
{
echo "Reloading upsmon configuration ..."
$mon_command -c reload 2>&1
echo "Reloading upsd configuration ..."
$command -c reload 2>&1
}
upsd_logstart()
{
echo "Starting log to file ${log_file}"
$log_command -f "$log_format" -s $ups_name -l "$log_file" 2>&1
}
upsd_logstop()
{
echo "Stopping log to file ${log_file}"
if [ $(pidof -g upslog) -gt 0 ]; then
echo "log service is running... stopping it..."
kill -9 $(pidof upslog) 2>&1
else
echo "log service is not running"
fi
}
run_rc_command "$1"
Last edited by Stranger (2013-03-22 23:58:51)
Offline
Some minor changes in files (in order to start the package smoothly...)
/ffp/etc/upssched.conf.sample:
change lines
# PIPEFN /var/state/ups/upssched/upssched.pipe
# LOCKFN /var/state/ups/upssched/upssched.lock
to
# PIPEFN /var/state/ups/upssched.pipe
# LOCKFN /var/state/ups/upssched.lock
file /ffp/etc/upsmon.conf.sample
change line
# NOTIFYCMD /usr/local/ups/bin/notifyme
to
# NOTIFYCMD /ffp/sbin/upssched
Offline
I processed your suggestions in version #1:
http://downloads.zyxel.nas-central.org/ … S.html#nut
Offline
Thanks again.
Offline