mirror of
https://github.com/serghey-rodin/vesta.git
synced 2026-09-10 16:49:23 +02:00
42 lines
1.1 KiB
Bash
Executable File
42 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# info: restart web server
|
|
# options: NONE
|
|
#
|
|
# The function reloads web server configuration.
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
# Variable&Function #
|
|
#----------------------------------------------------------#
|
|
|
|
# Includes
|
|
source $VESTA/conf/vesta.conf
|
|
source $VESTA/func/main.sh
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
# Action #
|
|
#----------------------------------------------------------#
|
|
|
|
if [ ! -z "$WEB_SYSTEM" ]; then
|
|
/etc/init.d/$WEB_SYSTEM status >/dev/null 2>&1
|
|
if [ $? -eq 0 ]; then
|
|
/etc/init.d/$WEB_SYSTEM reload >/dev/null 2>&1
|
|
if [ $? -ne 0 ]; then
|
|
exit $E_RESTART
|
|
fi
|
|
else
|
|
/etc/init.d/$WEB_SYSTEM start >/dev/null 2>&1
|
|
if [ $? -ne 0 ]; then
|
|
exit $E_RESTART
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
# Vesta #
|
|
#----------------------------------------------------------#
|
|
|
|
exit
|