| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #!/bin/bash
- # info: delete system firewall
- # options: NONE
- # labels: panel
- #
- # example: v-delete-sys-firewall
- #
- # The script disables firewall support
- #----------------------------------------------------------#
- # Variable&Function #
- #----------------------------------------------------------#
- # Includes
- # shellcheck source=/usr/local/hestia/func/main.sh
- source $HESTIA/func/main.sh
- # shellcheck source=/usr/local/hestia/conf/hestia.conf
- source $HESTIA/conf/hestia.conf
- #----------------------------------------------------------#
- # Verifications #
- #----------------------------------------------------------#
- if [ -z "$FIREWALL_SYSTEM" ]; then
- exit
- fi
- # Perform verification if read-only mode is enabled
- check_hestia_demo_mode
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- # Stopping firewall
- $BIN/v-stop-firewall
- # Updating FIREWALL_SYSTEM value
- if [ -z "$(grep FIREWALL_SYSTEM $HESTIA/conf/hestia.conf)" ]; then
- echo "FIREWALL_SYSTEM=''" >> $HESTIA/conf/hestia.conf
- else
- sed -i "s/FIREWALL_SYSTEM=.*/FIREWALL_SYSTEM=''/g" $HESTIA/conf/hestia.conf
- fi
- #----------------------------------------------------------#
- # Hestia #
- #----------------------------------------------------------#
- # Logging
- log_event "$OK" "$ARGUMENTS"
- exit
|