Use coreutils-full/bin as PATH in Bookwyrm install script
This commit is contained in:
parent
67ff6fc2c1
commit
7ea3ea8364
1 changed files with 4 additions and 2 deletions
|
@ -144,7 +144,9 @@ mkDerivation {
|
||||||
cat <<- EOF > $out/bin/bookwyrm-env
|
cat <<- EOF > $out/bin/bookwyrm-env
|
||||||
#!${bash}/bin/sh
|
#!${bash}/bin/sh
|
||||||
|
|
||||||
if [ \$( ${coreutils-full}/bin/id -un ) != "bookwyrm" -o \$( ${coreutils-full}/bin/id -gn ) != "bookwyrm" ] ; then
|
PATH=${coreutils-full}/bin
|
||||||
|
|
||||||
|
if [ \$( id -un ) != "bookwyrm" -o \$( 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
|
||||||
fi
|
fi
|
||||||
|
@ -160,7 +162,7 @@ mkDerivation {
|
||||||
export EMAIL_HOST_PASSWORD=""
|
export EMAIL_HOST_PASSWORD=""
|
||||||
|
|
||||||
# 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="\$( cat /etc/nixos/assets/bookwyrm-secret-key )"
|
||||||
|
|
||||||
exec \$@
|
exec \$@
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue