Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - i1mran92

#1
Development and Code Review / Re: APC UPS new plugin
August 11, 2022, 11:36:25 AM
Quote from: xbb on August 06, 2022, 03:35:27 PM
Quote from: i1mran92 on August 06, 2022, 01:35:42 PM
though not sure if this is normal or not, i did a test to auto shutdown.
it went through the shut down process then it stopped for me to manually reboot or shutdown

the operating system has halted
please press any key to reboot

is there anything i can do to fully shutdown the device?
thanks

apcupsd actions (not the plugin) are controlled via the /usr/local/etc/apcupsd/apccontrol script.

Weirdly the FreeBSD version uses "shutdown -h now" instead of "shutdown -p now". I cannot change that in the plugin.

As a workaround, the apccontrol scripts permits overriding the default actions by creating another script named after the action (in this case "doshutdown") inside the /usr/local/etc/apcupsd/ directory.

For example you can create the script /usr/local/etc/apcupsd/doshutdown and make it executable otherwise it wont be executed by apccontrol.


#!/usr/bin/env sh

set -e

printf "Beginning Shutdown Sequence" | wall
/sbin/shutdown -p now "apcupsd initiated shutdown"

# 99 prevents apccontrol from executing the default doshutdown action
exit 99



thank you. was able to make it shutdown fully with the script.
though i dont actually see "begining Shutdown Sequest" and "apcupsd initiated shutdown" when the shutdown procees was happening. not sure why?
but atleast it is fully shutting down now.

#2
Development and Code Review / Re: APC UPS new plugin
August 06, 2022, 01:35:42 PM
hi there. just updated to the latest opnsense firmware and install apcupsd plugin.

opnsense connect to apc ups server on another device
seems to be working fine.

though not sure if this is normal or not, i did a test to auto shutdown.
it went through the shut down process then it stopped for me to manually reboot or shutdown

the operating system has halted
please press any key to reboot

is there anything i can do to fully shutdown the device?
thanks
#3
was it able to get it save and working again?
#4
Quote from: hloiter on June 19, 2021, 04:46:19 PM
Hi,

i added the files to the individual directories under / usr / local / opensense via WinSCP. Then I created the file /etc/rc.conf.d/apcupsd and executed /usr/local/etc/rc.configure_plugins. After a restart I was able to configure the Apcupsd plugin and my UPS was recognized. My only problem is that the apcupsd daemon is not showing up in the service widget.

Best

hloiter


hi,

i was able to copy everything and did > exec /usr/local/etc/rc.configure_plugins, and reboot.
I was able to see the apcupsd under the service.
so far this is correct right
start and stop service both work. was able to verify the service status when directly ssh into opnsense.
but when i edit anything in the webui, it does not reflect in the actual file of apcupsd.conf
the status in the webgui is also just empty.

but, if i were to manually edit the conf file via ssh, i was able to get it working, though still nothing in webgui?
any edit i do there doesnt seem to do anything.

any help would be greatly appreciated.


EDIT:
i should note that, i am using as a slave. the apcuspd is running on another machine as master
used cable type ether, ups type net, ups device IP:3551 ( the device running apcupsd as master )
if manual edit conf file, it works. apcacces show the related information and running
#5
Quote from: hloiter on June 19, 2021, 01:48:05 PM
Hi,

i think the file apcupsd.inc is missing in the directory /usr/local/etc/inc/plugins.inc.d.

But I have no idea how to create this file.

Cheers

hloiter

hi. how did you "copy paste" the plugin? there is more that i have to do other than just install the apcupsd pkg correct?
#6
hi there. why dont i see the apcupsd under the service area?
i've manage to install the pkg, but its not showing under service.
please help