85 lines
2.5 KiB
Plaintext
85 lines
2.5 KiB
Plaintext
|
#!/bin/bash
|
|||
|
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
|
|||
|
#dieses Framework wird im CVS Repository
|
|||
|
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verf<72>gung gestellt
|
|||
|
#
|
|||
|
#Lage dieser Datei im Archiv: $Source$
|
|||
|
#
|
|||
|
#(c) 2003 Harald Kueller, Germany
|
|||
|
#This program is free software; you can redistribute it and/or
|
|||
|
#modify ist 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.
|
|||
|
#
|
|||
|
#This program is distributed in the hope that it will be useful,
|
|||
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|||
|
#See the GNU General Public License for more details.
|
|||
|
#
|
|||
|
#You should have received a copy of the GNU General Public License
|
|||
|
#along with this program; if not write to the Free Software Foundation,
|
|||
|
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
#
|
|||
|
#InitScript zum Start des Daemons: innd
|
|||
|
#
|
|||
|
#Letzte <20>nderung von: $Author$
|
|||
|
#Datum der letzten <20>nderung: $Date$
|
|||
|
#Version der Datei: $Revision$
|
|||
|
#
|
|||
|
#$Log$
|
|||
|
#Revision 1.5 2006/09/25 12:49:50 segler
|
|||
|
#inn wants to be stopped without loadproc
|
|||
|
#
|
|||
|
#Revision 1.4 2006/09/25 12:46:24 segler
|
|||
|
#inn wants to be stopped by root
|
|||
|
#
|
|||
|
#Revision 1.3 2006/09/25 10:53:31 segler
|
|||
|
#bug in startup script: if ... - f (-f is correct)
|
|||
|
#postinstall gives all in /opt/inn/db/* to news (not only active files)
|
|||
|
#
|
|||
|
#Revision 1.2 2006/06/29 14:55:14 segler
|
|||
|
#init script starts and stops now
|
|||
|
#
|
|||
|
#Revision 1.1 2006/06/29 14:36:44 segler
|
|||
|
#start environment added. at this time it only generates a cert file (hopefully ;> )
|
|||
|
#
|
|||
|
#
|
|||
|
|
|||
|
source /etc/init.d/functions
|
|||
|
|
|||
|
case "$1" in
|
|||
|
start)
|
|||
|
echo -n "Starting innd"
|
|||
|
if [ ! -f /opt/inn/lib/key.pem ]; then
|
|||
|
openssl req -new -x509 -nodes \
|
|||
|
-out /opt/inn/lib/cert.pem -days 366 \
|
|||
|
-keyout /opt/inn/lib/key.pem
|
|||
|
chown news /opt/inn/lib/cert.pem
|
|||
|
chgrp uucp /opt/inn/lib/cert.pem
|
|||
|
chmod 640 /opt/inn/lib/cert.pem
|
|||
|
chown news /opt/inn/lib/key.pem
|
|||
|
chgrp uucp /opt/inn/lib/key.pem
|
|||
|
chmod 600 /opt/inn/lib/key.pem
|
|||
|
fi
|
|||
|
|
|||
|
loadproc su - news -c /opt/inn/bin/rc.news
|
|||
|
;;
|
|||
|
|
|||
|
stop)
|
|||
|
echo -n "Stopping innd"
|
|||
|
/opt/inn/bin/rc.news stop
|
|||
|
;;
|
|||
|
|
|||
|
restart)
|
|||
|
$0 stop
|
|||
|
sleep 1
|
|||
|
$0 start
|
|||
|
;;
|
|||
|
|
|||
|
*)
|
|||
|
echo "Usage: $0 {start|stop|restart}"
|
|||
|
exit 1
|
|||
|
;;
|
|||
|
|
|||
|
esac
|