Difference between revisions of "Apcupsd"
From CBLFS
Jump to navigationJump to searchLine 19: | Line 19: | ||
Compile the package: | Compile the package: | ||
− | + | You will need to check and set USB to the correct device. Most new UPS use a USB, but it might not... | |
− | ./configure --prefix=/opt/apc --with-log-dir=/var/log \ | + | ./configure --prefix=/opt/apc --with-log-dir=/var/log \ |
--enable-usb --with-upstype=usb --with-upscable=usb && | --enable-usb --with-upstype=usb --with-upscable=usb && | ||
make | make |
Revision as of 21:44, 16 February 2007
Download Source: | http://superb-west.dl.sourceforge.net/sourceforge/apcupsd/apcupsd-3.14.0.tar.gz |
---|
Contents
Introduction to Apcupsd
Apcupsd is a deamon that talks with APC ups and monitors it's status. There are alot of devices that it will work with one should read up on it.
Dependencies
Required
Non-Multilib
Compile the package:
You will need to check and set USB to the correct device. Most new UPS use a USB, but it might not...
./configure --prefix=/opt/apc --with-log-dir=/var/log \ --enable-usb --with-upstype=usb --with-upscable=usb && make
Install the package
make install
Multilib
This package does not provide any libraries so only one installation is needed.
32Bit
Compile the package:
CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" PKG_CONFIG_PATH="$PKG_CONFIG_PATH32" USE_ARCH=32 \ ./configure --prefix=/usr --with-log-dir=/var/log \ --enable-usb --with-upstype=usb --with-upscable=usb && make
Install the package
make install
N32
TO DO!
64Bit
Compile the package
CC="gcc ${BUILD32}" CXX="g++ ${BUILD64}" PKG_CONFIG_PATH="$PKG_CONFIG_PATH64" USE_ARCH=64 \ ./configure --prefix=/usr --with-log-dir=/var/log \ --enable-usb --with-upstype=usb --with-upscable=usb && make
Install the package
make install
Configuring
BootScript
Init script IS NOT yet included in the blfs-bootscripts package.
#!/bin/sh # Begin $rc_base/init.d/apcupsd
# Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by zippo zippo@oppiz.net
#$LastChangedBy: oppiz #$Date: 2007-02-15 00:13:00Hrs
. /etc/sysconfig/rc . $rc_functions
case "$1" in start) boot_mesg "Starting Apcupsd Server..." loadproc /sbin/apcupsd sleep 1 ;;
stop) boot_mesg "Stopping Apcupsd Server..." killproc /sbin/apcupsd ;;
reload) boot_mesg "Reloading Apcupsd Server..." reloadproc /sbin/apcupsd ;;
restart) $0 stop sleep 1 $0 start ;;
status) statusproc /sbin/apcupsd ;;
*) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac
# End $rc_base/init.d/apcupsd