File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,11 @@ if [ -z "$sftp_i" ]; then
4646 echo " X11Forwarding no" >> $config
4747 echo " AllowTCPForwarding no" >> $config
4848 echo " ForceCommand internal-sftp" >> $config
49+ restart=' yes'
4950fi
5051
5152# Validating opensshd config
52- if [ " $restart " = ' no' ]; then
53- # Skipping SSH Restart
54- echo " " > /dev/null 2>&1
55- else
53+ if [ " $restart " = ' yes' ]; then
5654 subj=" OpenSSH restart failed"
5755 email=$( grep CONTACT $HESTIA /data/users/admin/user.conf | cut -f 2 -d \' )
5856 /usr/sbin/sshd -t > /dev/null 2>&1
6866# Checking users
6967shells=" rssh|nologin"
7068for user in $( grep " $HOMEDIR " /etc/passwd | egrep " $shells " | cut -f 1 -d:) ; do
71- $BIN /v-add-user-sftp-jail $user
69+ $BIN /v-add-user-sftp-jail $user $restart
7270done
7371
7472# Add v-add-sys-sftp-jail to startup
7573if [ ! -e " /etc/cron.d/hestia-sftp" ]; then
76- echo " @reboot root /usr/local/hestia/bin/v-add-sys-sftp-jail" > /etc/cron.d/hestia-sftp
74+ echo " @reboot root sleep 60 && /usr/local/hestia/bin/v-add-sys-sftp-jail" > /etc/cron.d/hestia-sftp
7775fi
7876
7977# ----------------------------------------------------------#
You can’t perform that action at this time.
0 commit comments