Merge pull request #325291 from Stunkymonkey/bee-umask-chmod

nixos/bee: prefer 'install' over 'chmod'
This commit is contained in:
Jörg Thalheim 2024-07-07 21:49:17 +02:00 committed by GitHub
commit ef1670eee9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -101,8 +101,7 @@ in {
preStart = with cfg.settings; ''
if ! test -f ${password-file}; then
< /dev/urandom tr -dc _A-Z-a-z-0-9 2> /dev/null | head -c32 > ${password-file}
chmod 0600 ${password-file}
< /dev/urandom tr -dc _A-Z-a-z-0-9 2> /dev/null | head -c32 | install -m 600 /dev/stdin ${password-file}
echo "Initialized ${password-file} from /dev/urandom"
fi
if [ ! -f ${data-dir}/keys/libp2p.key ]; then