|
17 | 17 | ####### You can use \n within the string to create new lines. ####### |
18 | 18 | ####################################################################################### |
19 | 19 |
|
| 20 | +# load config because we need to know if proftpd is installed |
| 21 | + |
| 22 | +# Includes |
| 23 | +# shellcheck source=/etc/hestiacp/hestia.conf |
| 24 | +source /etc/hestiacp/hestia.conf |
| 25 | +# shellcheck source=/usr/local/hestia/func/main.sh |
| 26 | +source $HESTIA/func/main.sh |
| 27 | +# shellcheck source=/usr/local/hestia/func/ip.sh |
| 28 | +source $HESTIA/func/ip.sh |
| 29 | +# load config file |
| 30 | +source_conf "$HESTIA/conf/hestia.conf" |
| 31 | + |
20 | 32 | upgrade_config_set_value 'UPGRADE_UPDATE_WEB_TEMPLATES' 'true' |
21 | 33 | upgrade_config_set_value 'UPGRADE_UPDATE_DNS_TEMPLATES' 'true' |
22 | 34 | upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'true' |
@@ -72,6 +84,17 @@ for file in /etc/php/*/fpm/pool.d/www.conf; do |
72 | 84 | sed -i 's|/var/run/|/run/|g' $file |
73 | 85 | done |
74 | 86 |
|
| 87 | +#update proftpd |
| 88 | +if [ "$FTP_SYSTEM" = 'proftpd' ]; then |
| 89 | + contains_conf_d=$(grep -c "Include /etc/proftpd/conf.d/\*.conf" "/etc/proftpd/proftpd.conf") |
| 90 | + # the line below is for testing only: |
| 91 | + # echo "contains proftpd? $contains_conf_d" |
| 92 | + if [ $contains_conf_d = 0 ]; then |
| 93 | + sed -i 's/Include \/etc\/proftpd\/tls.conf/&\nInclude \/etc\/proftpd\/conf.d\/*.conf/' /etc/proftpd/proftpd.conf |
| 94 | + fi |
| 95 | + $BIN/v-restart-ftp |
| 96 | +fi |
| 97 | + |
75 | 98 | if echo "$BACKUP_SYSTEM" | grep "google" > /dev/null; then |
76 | 99 | echo "[ ! ] Deprecation notice: Backup via Google Cloud has been removed setup backup again via Rclone to reinstate the backup and restore capebilities!" |
77 | 100 | add_upgrade_message "Deprecation notice: Backup via Google Cloud has been removed setup backup again via Rclone to reinstate the backup and restore capebilities!" |
|
0 commit comments