File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed
Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,13 @@ check_hestia_demo_mode
3333
3434# Checking sshd directives
3535config=' /etc/ssh/sshd_config'
36- sftp_n=$( grep -n " Subsystem.*sftp" $config | grep -v internal | grep -v " :#" )
36+ sftp_n=$( grep -n " Subsystem.*sftp" $config | grep -v internal | grep -v /usr/lib/sftp-server | grep -v " :#" )
3737sftp_i=$( grep -n " ^# Hestia SFTP Chroot" $config )
3838
3939# Disabling normal sftp
4040if [ -n " $sftp_n " ]; then
4141 fline=$( echo $sftp_n | cut -f 1 -d :)
42- sed -i " ${fline} s/Subsystem.*sftp/Subsystem sftp internal-sftp/" $config
42+ sed -i " ${fline} s/Subsystem.*sftp.* /Subsystem sftp internal-sftp/" $config
4343 restart=' yes'
4444fi
4545
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Hestia Control Panel upgrade script for target version 1.9.3
4+
5+ # ######################################################################################
6+ # ###### Place additional commands below. #######
7+ # ######################################################################################
8+ # ###### upgrade_config_set_value only accepts true or false. #######
9+ # ###### #######
10+ # ###### Pass through information to the end user in case of a issue or problem #######
11+ # ###### #######
12+ # ###### Use add_upgrade_message "My message here" to include a message #######
13+ # ###### in the upgrade notification email. Example: #######
14+ # ###### #######
15+ # ###### add_upgrade_message "My message here" #######
16+ # ###### #######
17+ # ###### You can use \n within the string to create new lines. #######
18+ # ######################################################################################
19+
20+ upgrade_config_set_value ' UPGRADE_UPDATE_WEB_TEMPLATES' ' false'
21+ upgrade_config_set_value ' UPGRADE_UPDATE_DNS_TEMPLATES' ' false'
22+ upgrade_config_set_value ' UPGRADE_UPDATE_MAIL_TEMPLATES' ' false'
23+ upgrade_config_set_value ' UPGRADE_REBUILD_USERS' ' no'
24+ upgrade_config_set_value ' UPGRADE_UPDATE_FILEMANAGER_CONFIG' ' true'
25+
26+ if grep -q " internal-sftp-server" /etc/ssh/sshd_config; then
27+ sed -i ' s/Subsystem sftp internal-sftp-.*/Subsystem sftp internal-sftp/' /etc/ssh/sshd_config
28+ fi
29+
30+ if grep -q " Subsystem sftp /usr/lib/sftp-server-" /etc/ssh/sshd_config; then
31+ sed -i ' s/Subsystem sftp \/usr\/lib\/sftp-server-.*/Subsystem sftp \/usr\/lib\/sftp-server/' /etc/ssh/sshd_config
32+ fi
You can’t perform that action at this time.
0 commit comments