#!/bin/sh #--------------------------------------------------------------------------- # /var/install/bin/pre-setup-services-apcupsd-menu # # Creation: 2019-02-20 hbfl # Last Update: $Id$ # # Copyright (c) 2019-@@YEAR@@ the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #--------------------------------------------------------------------------- # create the modules file for apcupsd # that was found in the menu-root from the system # --------------------------------------------------------------------------- # create apcuspd menu # --------------------------------------------------------------------------- create_apcupsd_menu() { { echo '' echo '' echo 'apcupsd' echo 'Administration of Package Apcupsd' echo 'View documentation' echo 'Edit configuration' echo 'Advanced configuration handling' echo 'Show status' echo 'Stop service' echo 'Start service' echo 'Restart service' echo '' installed=$(eisman check apcupsd-cgi) if [ "${installed}" = "installed" ] then echo "Apcupsd web monitoring" fi installed=$(eisman check upsmonitor) if [ "${installed}" = "installed" ] then echo "Apcupsd web monitoring" fi } > ${menu_file} chmod 0640 ${menu_file} } # --------------------------------------------------------------------------- # main # --------------------------------------------------------------------------- main() { menu_file="${4}" create_apcupsd_menu exit 0 } # --------------------------------------------------------------------------- # exec main # --------------------------------------------------------------------------- main "${@}" # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------