0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2024-12-22 13:14:42 -05:00

Added env variable to entrypoint

This commit is contained in:
Moritz 2022-01-10 23:29:07 +01:00
parent 3ad35571d5
commit e74f1befb4

View file

@ -53,6 +53,12 @@ if [ ! -f "$userConfFinalPath" ]; then
done done
fi fi
if [ -n "$READONLY" ]; then
if [ "$READONLY" = "true" ]; then
sed 's/Subsystem sftp internal-sftp/Subsystem sftp internal-sftp -R/' "/etc/ssh/sshd_config" | tee "/etc/ssh/sshd_config"
fi
fi
# Check that we have users in config # Check that we have users in config
if [ -f "$userConfFinalPath" ] && [ "$(wc -l < "$userConfFinalPath")" -gt 0 ]; then if [ -f "$userConfFinalPath" ] && [ "$(wc -l < "$userConfFinalPath")" -gt 0 ]; then
# Import users from final conf file # Import users from final conf file