| [ PHPXref.com ] | [ Generated: Sun Jul 20 18:16:01 2008 ] | [ ISPConfig 2.2.1 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 #!/bin/bash 2 ############################################################################### 3 # Copyright (c) 2005, projektfarm Gmbh, Till Brehm, Falko Timme 4 # All rights reserved. 5 # 6 # Redistribution and use in source and binary forms, with or without modification, 7 # are permitted provided that the following conditions are met: 8 # 9 # * Redistributions of source code must retain the above copyright notice, 10 # this list of conditions and the following disclaimer. 11 # * Redistributions in binary form must reproduce the above copyright notice, 12 # this list of conditions and the following disclaimer in the documentation 13 # and/or other materials provided with the distribution. 14 # * Neither the name of ISPConfig nor the names of its contributors 15 # may be used to endorse or promote products derived from this software without 16 # specific prior written permission. 17 # 18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 # IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 22 # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 23 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 25 # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 27 # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 ############################################################################### 29 30 ################################### 31 # 32 # ISPConfig Server-Startscript 33 # 34 ################################### 35 36 TMPDIR=/tmp 37 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin 38 39 case "$1" in 40 start) 41 echo "Starting ISPConfig system..." 42 {INITDIR}/mysqld start &> /dev/null 43 sleep 3 44 /root/ispconfig/httpd/bin/apachectl startssl 45 /root/ispconfig/sv/ispconfig_wconf &> /dev/null & 46 /root/ispconfig/php/php -q /root/ispconfig/scripts/shell/firewall.php 47 if ps ax | grep -iw '/home/admispconfig/ispconfig/tools/clamav/bin/freshclam' | grep -iv 'grep' &> /dev/null ;then 48 echo "FreshClam is already running!" 49 else 50 /home/admispconfig/ispconfig/tools/clamav/bin/freshclam -d -c 10 --datadir=/home/admispconfig/ispconfig/tools/clamav/share/clamav 51 fi 52 echo "ISPConfig system is now up and running!" 53 ;; 54 stop) 55 echo "Shutting down ISPConfig system..." 56 array=(`ps ax | grep -iw '/root/ispconfig/sv/ispconfig_wconf' | grep -iv 'grep' | awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`) 57 element_count=${#array[@]} 58 index=0 59 while [ "$index" -lt "$element_count" ] 60 do 61 kill -9 $array[$index]} 62 let "index = $index + 1" 63 done 64 /root/ispconfig/httpd/bin/apachectl stop 65 array=(`ps ax | grep -iw '/home/admispconfig/ispconfig/tools/clamav/bin/freshclam' | grep -iv 'grep' | awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`) 66 element_count=${#array[@]} 67 index=0 68 while [ "$index" -lt "$element_count" ] 69 do 70 kill -9 $array[$index]} 71 let "index = $index + 1" 72 done 73 echo "ISPConfig system stopped!" 74 ;; 75 restart) 76 $0 stop && sleep 3 77 $0 start 78 # Remember status and be quiet 79 ;; 80 *) 81 echo "Usage: $0 {start|stop|restart}" 82 exit 1 83 esac 84 exit 0
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |