# # Creator:Andreas Utterberg (andutt) # # Description:Andutteye Surveillance Gentoo portage install specifications for ebuild package. # EMVER="1.24-1" DESCRIPTION="Andutteye Surveillance client software. Andutteye is a system monitoring surveillance tool." SRC_URI="http://andutteye.com/download/andutteye-client-${EMVER}-bin.tar.gz" HOMEPAGE="http://www.andutteye.com" KEYWORDS="x86 ppc sparc alpha amd64 ia64" SLOT="0" LICENSE="Free for non-commersiall use. For company and goverment use a commersial licence are needed" DEPEND="app-admin/sysstat" src_unpack() { einfo "Creating Andutteye directorys" diropts -m 0750 dodir /opt/andutteye dodir /opt/andutteye/utils dodir /opt/andutteye/var einfo "Unpacking Andutteye Surveillance client" unpack ${A} } pkg_preinst() { einfo "Installing Andutteye Surveillance software" insinto /etc/init.d doins ${WORKDIR}/etc/init.d/* insinto /opt/andutteye/bin doins ${WORKDIR}/opt/andutteye/bin/andutteyed insinto /opt/andutteye/utils doins ${WORKDIR}/opt/andutteye/utils/* insinto /opt/andutteye doins ${WORKDIR}/opt/andutteye/LICENSE USERCHECK=`cat ${ROOT}/etc/passwd |grep andutteye` if [ -z "$USERCHECK" ] then einfo "Creating Andutteye Surveillance useraccount" useradd -g root -m -c "Andutteye surveillance user" andutteye fi } pkg_postinst() { if [ ! -d /opt/andutteye/etc ] then mkdir /opt/andutteye/etc fi if [ ! -d /opt/andutteye/var ] then mkdir /opt/andutteye/var fi chown -R andutteye:root ${ROOT}/opt/andutteye chmod -R 750 ${ROOT}/opt/andutteye chmod 755 ${ROOT}/etc/init.d/andutteyed echo if [ ! -f "/opt/andutteye/etc/andutteyed.conf" ] then einfo "Autodiscovering your system and generating a Andutteye configuration..." ${ROOT}/opt/andutteye/bin/andutteyed -genconfig > /dev/null 2>&1 fi echo einfo "Andutteye Surveillance client software have been sucessfully installed on your system" einfo "Make sure that you are satisfied with the autogenerated configuration file located" einfo "under /opt/andutteye/etc. Specify emailadresses and recoveryprograms if needed. or add your" einfo "own monitors or programs." echo einfo "If you are using andutteye client in enterprise mode the ANDUTTEYE_SERVER and ANDUTTEYE_PORT" einfo "must be set in the configuration file. To start monitoring execute the start program under" einfo "/etc/init.d called andutteyed with the start argument." echo einfo "Support, information and documentation can be found at the official site." echo echo }