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:
parent
3ad35571d5
commit
e74f1befb4
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue