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