3 # RavenCore Hosting Control Panel
4 # Copyright (C) 2005 Corey Henderson
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 # ravencore Startup script for the RavenCore Hosting Control Panel
23 # description: A Free Hosting Control Panel
24 # processname: ravencore.httpd
25 # config: /usr/local/ravencore/etc/ravencore.httpd.conf
26 # pidfile: /usr/local/ravencore/var/run/ravencore.httpd.pid
28 # Adapted for ArchLinux - SharkOS.org :: Chris Tusa <linisys@gmail.com>
32 .
/etc
/ravencore.conf ||
exit 1
35 echo -n $
"Starting control panel: "
37 $RC_ROOT/sbin
/run_cmd rcserver
40 PID
=`pidof -o %PPID /usr/local/ravencore/sbin/ravencore.httpd`
41 PID2
=`cat $RC_ROOT/var/run/rcserver.pid`
44 stat_busy
"Starting Ravencore control panel"
45 [ -z "$PID" ] && $RC_ROOT/sbin
/run_cmd rcserver
50 if [ ! -f $RC_ROOT/var
/run
/install_complete
]; then
54 echo "Thank You for using RavenCore!"
56 echo "The install/upgrade process will not be completed until after you login to the control panel web interface as the admin user, and accept the license agreement (GPL)."
58 # simple loop to get all IP addresses bound to a machine
59 IP_ADDRESSES
=$
(for IFACE
in `ifconfig | grep -v '^ ' | awk '{print $1}'`; do echo $
(for i
in `ifconfig | awk "/^\$IFACE/ {print \\$1}"`; do ifconfig
$i |
grep -o 'addr:[[:digit:]]\{1,3\}\.[[:digit:]]\{1,3\}\.[[:digit:]]\{1,3$
60 for i in $IP_ADDRESSES; do echo "http://"$i":8000/"; done
62 passwd=$(cat $RC_ROOT/.shadow 2> /dev/null)
63 if [ "$passwd" = "ravencore" ]; then
64 echo "NOTE: You have not yet set your admin password!"
65 echo "You can do this by running this as root: "$RC_ROOT"/sbin/run_cmd passwd"
73 stat_busy "Stopping Ravencore control panel"
74 [ ! -z "$PID" ] && kill $PID &> /dev/null
88 echo "usage: $0 {start|stop|restart}"