View Single Post
  #3  
Old 29th June 2007, 17:13
royrobinson royrobinson is offline
Junior Member
 
Join Date: Oct 2006
Posts: 13
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Hi Ben

Thanks for your suggestion. My server is running at runlevel 2, therefore I check /etc/dir/rc2.d/S99ispconfig_server as shown below:

root@server0001:/etc/rc2.d# cat S99ispconfig_server
#!/bin/bash
################################################## #############################
# Copyright (c) 2005, projektfarm Gmbh, Till Brehm, Falko Timme
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of ISPConfig nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
################################################## #############################

###################################
#
# ISPConfig Server-Startscript
#
###################################

TMPDIR=/tmp
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin

case "$1" in
start)
echo "Starting ISPConfig system..."
/etc/init.d/mysqld start &> /dev/null
/etc/init.d/mysql start &> /dev/null
sleep 3
/root/ispconfig/httpd/bin/apachectl startssl
/root/ispconfig/sv/ispconfig_wconf &> /dev/null &
/root/ispconfig/php/php -q /root/ispconfig/scripts/shell/firewall.php
if ps ax | grep -iw '/home/admispconfig/ispconfig/tools/clamav/bin/freshclam' | grep -iv 'grep' &> /dev/null ;then
echo "FreshClam is already running!"
else
/home/admispconfig/ispconfig/tools/clamav/bin/freshclam -d -c 10 --datadir=/home/admispconfig/ispconfig/tools/clamav/share/clamav
fi
echo "ISPConfig system is now up and running!"
;;
stop)
echo "Shutting down ISPConfig system..."
array=(`ps ax | grep -iw '/root/ispconfig/sv/ispconfig_wconf' | grep -iv 'grep' | awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`)
element_count=${#array[@]}
index=0
while [ "$index" -lt "$element_count" ]
do
kill -9 ${array[$index]}
let "index = $index + 1"
done
/root/ispconfig/httpd/bin/apachectl stop
array=(`ps ax | grep -iw '/home/admispconfig/ispconfig/tools/clamav/bin/freshclam' | grep -iv 'grep' | awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`)
element_count=${#array[@]}
index=0
while [ "$index" -lt "$element_count" ]
do
kill -9 ${array[$index]}
let "index = $index + 1"
done
echo "ISPConfig system stopped!"
;;
restart)
$0 stop && sleep 3
$0 start
# Remember status and be quiet
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0root@server0001:/etc/rc2.d#

I did not know the exact syntax to check whether there was a link, so I ran the following line:

ln -s /etc/init.d/ispconfig_server /etc/rc2.d/S99ispconfig_server

And got the following. Please advise as I am somewhat puzzled, thanks.

root@server0001:/etc/rc2.d# ln -s /etc/init.d/ispconfig_server /etc/rc2.d/S99ispconfig_server
ln: creating symbolic link `/etc/rc2.d/S99ispconfig_server' to `/etc/init.d/ispconfig_server': File exists


My OS is Ubuntu 6.10 for reference.

All help appreciated.

Roy.
Reply With Quote