#!/bin/sh #---------------------------------------------------------------------------- # /var/install/bin/pre-setup-services-eisfax-edit-web-auth # # Creation: 2020-02-03 hb # Last Update: $Id$ # # Copyright (c) 2020-@@YEAR@@ Holger Bruenjes, holgerbruenjes(at)gmx(dot)net # # 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. #---------------------------------------------------------------------------- # include config . /etc/config.d/eisfax # exec 2>/tmp/$(basename ${0})-trace$$.log # set -x # --------------------------------------------------------------------------- # create menu # --------------------------------------------------------------------------- create_menu() { { echo "EisFAX Web Auth Administration" echo "eisfax" echo "" echo "" if [ "${EISFAX_WEB_USE}" = "yes" ] then idx=1 while [ ${idx} -le ${EISFAX_WEB_N:-0} ] do project_name='EISFAX_WEB' eval active='${EISFAX_WEB_'${idx}'_ACTIVE}' if [ "${active}" != "yes" ] then idx=$((${idx} + 1)) continue fi ac_all='' eval ac_all='${EISFAX_WEB_'${idx}'_ACCESS_ALL}' if [ "${ac_all}" != "yes" ] then ac_auth='' eval ac_auth='${EISFAX_WEB_'${idx}'_ACCESS_AUTH}' if [ "${ac_auth}" = "yes" ] then web_name='' eval web_name='${EISFAX_WEB_'${idx}'_NAME}' echo "" fi fi idx=$((${idx} + 1)) done fi } > "${menu_file}" chmod 0640 ${menu_file} } # --------------------------------------------------------------------------- # main # --------------------------------------------------------------------------- main() { package_name="${2}" menu_file="${4}" create_menu } # --------------------------------------------------------------------------- # call function main # --------------------------------------------------------------------------- main "${@}" # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------