case "$1" in
'start')
cd /opt/xampp
./xampp start
;;
'stop')
cd /opt/xampp
./xampp stop
;;
'reload')
cd /opt/xampp
./xampp reload
;;
*)
echo "Usage: $0 { start | stop | reload}"
exit 1
esac
exit 0
# chmod 0750 /etc/rc3.d/S98xampp
# ln -s /etc/rc3.d/S98xampp /etc/rc0.d/K03xampp
# ln -s /etc/rc3.d/S98xampp /etc/rc1.d/K03xampp
# /etc/rc3.d/S98xampp start
# /etc/rc3.d/S98xampp stop
# /etc/rc3.d/S98xampp reload
#!/bin/sh
#
# Update Path to your installed path, path="/opt/xampp"
#
# xampp service autorun/stop
#
# To install service create this file as /etc/init.d/xampp
#
# chmod +x /etc/init.d/xampp
#
# to stop at run level 0 number 16
# ln -s /etc/init.d/xampp /etc/rc0.d/K16xampp
#
# to stop at run level 1 number 16
# ln -s /etc/init.d/xampp /etc/rc1.d/K16xampp
#
# to stop at run level 2 number 16
# ln -s /etc/init.d/xampp /etc/rc2.d/K16xampp
#
# to start at run level 3 number 50
# ln -s /etc/init.d/xampp /etc/rc3.d/S50xampp
#
# be sure to disable apache, remove any Sxxapache files from the
# /etc/rcX.d/ directories. files that start with S only...
#
# the functions start(S) and stop(K) are run at run level change
# example: to only start\stop apache
# change start\stop lines from $path/xampp start and $path/xampp stop
# to $path/xampp startapache and $path/xampp stopapache
path="/opt/xampp"
case "$1" in
'start')
# Starts XAMPP
$path/xampp start
;;
'stop')
# Stops XAMPP
$path/xampp stop
;;
'restart')
# Stops and starts XAMPP
$path/xampp restart
;;
'startapache')
# Starts only the Apache
$path/xampp startapache
;;
'startssl')
# Starts the Apache SSL support. This command activates the
# SSL support permanently, e.g. if you restart XAMPP
# in the future SSL will stay activated
$path/xampp startssl
;;
'startmysql')
# Starts only the MySQL database
$path/xampp startmysql
;;
'startftp')
# Starts the ProFTPD server. Via FTP you can upload files
# for your web server (user "nobody", password "xampp").
# This command activates the ProFTPD permanently, e.g.
# if you restarts XAMPP in the future FTP will stay activated
$path/xampp startftp
;;
'stopapache')
# Stops the Apache
$path/xampp stopapache
;;
'stopssl')
# Stops the Apache SSL support. This command deactivates the
# SSL support permanently, e.g. if you restarts XAMPP
# in the future SSL will stay deactivated
$path/xampp stopssl
;;
'stopmysql')
# Stops the MySQL database
$path/xampp stopmysql
;;
'stopftp')
# Stops the ProFTPD server. This command deactivates the
# ProFTPD permanently, e.g. if you restarts XAMPP in the
# future FTP will stay deactivated
$path/xampp stopftp
;;
*)
echo "Usage: /etc/init.d/xampp <action>"
echo ""
echo "start Start XAMPP (Apache, MySQL and eventually others)"
echo "startapache Start only Apache"
echo "startssl Start only SSL support"
echo "startmysql Start only MySQL"
echo "startftp Start only ProFTPD"
echo ""
echo "stop Stop XAMPP (Apache, MySQL and eventually others)"
echo "stopapache Stop only Apache"
echo "stopssl Stop only SSL support"
echo "stopmysql Stop only MySQL"
echo "stopftp Stop only ProFTPD"
echo ""
echo "reload Reload XAMPP (Apache, MySQL and eventually others)"
echo "reloadapache Reload only Apache"
echo "reloadmysql Reload only MySQL"
echo "reloadftp Reload only ProFTPD"
echo ""
echo "restart Stop and start XAMPP"
echo "security Check XAMPP's security"
echo ""
echo "shell Starts a new shell configured for XAMPP use."
echo ""
echo "Update Path at top to your installed path, path="/opt/xampp""
echo ""
;;
esac
Users browsing this forum: No registered users and 52 guests