We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2c68ebc + 5c4696e commit cef84eeCopy full SHA for cef84ee
bin/v-add-sys-sftp-jail
@@ -75,9 +75,19 @@ fi
75
# Checking users
76
shells="rssh|nologin"
77
for user in $(grep "$HOMEDIR" /etc/passwd |egrep "$shells" |cut -f 1 -d:); do
78
- $BIN/v-add-user-sftp-jail "$user" "$restart"
+ if [ -d "$HESTIA/data/users/$user" ]; then
79
+ $BIN/v-add-user-sftp-jail "$user" "no"
80
+ fi
81
done
82
83
+# Restart ssh service
84
+if [ "$restart" = 'no' ]; then
85
+ # Skip restart of SSH daemon
86
+ echo "" > /dev/null 2>&1
87
+else
88
+ service ssh restart > /dev/null 2>&1
89
+fi
90
+
91
# Add v-add-sys-sftp-jail to startup
92
if [ ! -e "/etc/cron.d/hestia-sftp" ]; then
93
echo "@reboot root sleep 60 && /usr/local/hestia/bin/v-add-sys-sftp-jail" > /etc/cron.d/hestia-sftp
0 commit comments