Fix 'if' syntax and escaping in Bookwyrm package
This commit is contained in:
parent
e38a4f7bf0
commit
59f4d7fc76
1 changed files with 3 additions and 3 deletions
|
@ -144,10 +144,10 @@ mkDerivation {
|
||||||
cat <<- EOF > $out/bin/bookwyrm-env
|
cat <<- EOF > $out/bin/bookwyrm-env
|
||||||
#!${bash}/bin/sh
|
#!${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"
|
echo "You are not running as the 'bookwyrm' user and group, quitting"
|
||||||
exit 1
|
exit 1
|
||||||
done
|
fi
|
||||||
|
|
||||||
export PYTHONPATH="$out/lib/python3.11/site-packages"
|
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
|
# 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 )"
|
export SECRET_KEY="\$( ${coreutils-full}/bin/cat /etc/nixos/assets/bookwyrm-secret-key )"
|
||||||
|
|
||||||
exec $@
|
exec \$@
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chmod +x $out/bin/*
|
chmod +x $out/bin/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue