| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #!/bin/bash
- # info: restart dns service
- # options: none
- #
- # The function tells BIND service to reload dns zone files.
- #----------------------------------------------------------#
- # Variable&Function #
- #----------------------------------------------------------#
- # Importing variables
- source $VESTA/conf/vars.conf
- source $V_CONF/vesta.conf
- # Restart functions
- apache() {
- /etc/init.d/httpd 'graceful' >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- #$V_FUNC/report_issue 'web' 'apache'
- echo "$E_RESTART_FAILED $V_EVENT"
- fi
- }
- nginx() {
- /etc/init.d/nginx 'reload' >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- #$V_FUNC/report_issue 'web' 'nginx'
- echo "$E_RESTART_FAILED $V_EVENT"
- fi
- }
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- # Checking system
- if [ "$WEB_SYSTEM" = 'apache' ]; then
- apache
- fi
- if [ "$PROXY_SYSTEM" = 'nginx' ]; then
- nginx
- fi
- #----------------------------------------------------------#
- # Vesta #
- #----------------------------------------------------------#
- # Logging
- exit
|