##----------------------------------------------------------------------------- ## /etc/rc.d/rc999.cpanel __FLI4LVER__ ## ## Creation: 23.06.2002 gk ## Last Update: $Id$ ## ## Copyright (c) 2002-2006 - Georg Kainzbauer ## Helmut Hummel ## Copyright (c) 2006-2016 - fli4l-Team ## ## 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. ##----------------------------------------------------------------------------- case $OPT_CPANEL in yes) begin_script CPANEL "starting CPANEL on Port $CPANEL_PORT ... " mkdir -p /usr/local/cpanel echo "#!/bin/sh" > /usr/local/cpanel/script echo "off" > /var/run/cpanel.status case $CPANEL_STATUSLED in DSL) cat >> /usr/local/cpanel/script <<-EOF echo "off" > /var/run/cpanel.status [ -f /var/run/pppoe.up ] && echo "on" > /var/run/cpanel.status EOF ;; ISDN) cat >> /usr/local/cpanel/script <<-EOF echo "off" > /var/run/cpanel.status isdnctrl status all | grep -q to && echo "on" > /var/run/cpanel.status EOF ;; DSLISDN) cat >> /usr/local/cpanel/script <<-EOF echo "off" > /var/run/cpanel.status [ -f /var/run/pppoe.up ] && echo "on" > /var/run/cpanel.status isdnctrl status all | grep -q to && echo "on" > /var/run/cpanel.status EOF ;; SCRIPT) for idx in `seq 1 $CPANEL_SCRIPTLINE_N` do eval echo '$CPANEL_SCRIPTLINE_'$idx >> /usr/local/cpanel/script done ;; esac for idx in `seq 1 14` do eval 'echo "$CPANEL_FUNKTION'$idx'" > /usr/local/cpanel/funktion'$idx done chmod -R u+rx /usr/local/cpanel cpanel $CPANEL_PORT $CPANEL_SWITCHTIME $CPANEL_SCRIPTTIME & end_script ;; esac