maxx
9th August 2005, 12:48
Hi.
This is a bit stupid, but i was doing things to my server and lost my ispconfig_server file from /etc/init.d/
I have suse 9.3
Could someone post it to me.
Thanks,
Maxx the handyman :rolleyes:
falko
9th August 2005, 13:01
#!/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..."
{INITDIR}/mysqld 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 0
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.