Fix 'if' syntax and escaping in Bookwyrm package

This commit is contained in:
Reinout Meliesie 2025-03-09 13:02:07 +01:00
parent e38a4f7bf0
commit 59f4d7fc76
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6

View file

@ -144,10 +144,10 @@ mkDerivation {
cat <<- EOF > $out/bin/bookwyrm-env
#!${bash}/bin/sh
if [ $( id -un ) != "bookwyrm" || $( id -gn ) != "bookwyrm" ] ; do
if [ $( id -un ) != "bookwyrm" || $( id -gn ) != "bookwyrm" ] ; then
echo "You are not running as the 'bookwyrm' user and group, quitting"
exit 1
done
fi
export PYTHONPATH="$out/lib/python3.11/site-packages"
@ -162,7 +162,7 @@ mkDerivation {
# The escape here is required in order to retrieve the key file contents at runtime
export SECRET_KEY="\$( ${coreutils-full}/bin/cat /etc/nixos/assets/bookwyrm-secret-key )"
exec $@
exec \$@
EOF
chmod +x $out/bin/*