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
|
@ -52,6 +52,12 @@ if [ ! -f "$userConfFinalPath" ]; then
|
||||||
echo "$user" >> "$userConfFinalPath"
|
echo "$user" >> "$userConfFinalPath"
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue