modules/supervisord: init

This commit is contained in:
Zhaofeng Li 2022-09-21 03:20:38 -06:00
parent e6c9902ddc
commit dc61ae10fb
3 changed files with 189 additions and 0 deletions

View file

@ -16,6 +16,17 @@ writeText "login-inner" ''
echo "If nothing works, open an issue at https://github.com/t184256/nix-on-droid/issues or try the rescue shell."
fi
${lib.optionalString config.supervisord.enable ''
set +e
if [ ! -e "${config.supervisord.socketPath}" ]; then
${config.supervisord.package}/bin/supervisord -c /etc/supervisord.conf
if [ $? != 0 ]; then
echo "Warning: supervisord failed to start"
fi
fi
set -e
''}
${lib.optionalString config.build.initialBuild ''
if [ -e /etc/UNINTIALISED ]; then
export HOME="${config.user.home}"