Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th August 2005, 11:48
maxx maxx is offline
Member
 
Join Date: Jul 2005
Location: Finland
Posts: 70
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to maxx Send a message via Skype™ to maxx
Default Lost my ipsconfig_server file from /etc/init.d

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
Reply With Quote
Sponsored Links
  #2  
Old 9th August 2005, 12:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Code:
#!/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
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Echo into a file torben Programming/Scripts 5 21st October 2010 09:37
Loading configuration file lance Kernel Questions 2 28th February 2007 20:40


All times are GMT +2. The time now is 17:47.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.