#!/bin/bash export LANG=en_US.UTF-8 PANDORA=${PANDORA-pandora} echo Installing pandora with user: $PANDORA getent passwd $PANDORA > /dev/null 2>&1 || adduser --disabled-password --gecos "" $PANDORA HOST=$(hostname -s) HOST_CONFIG="/srv/pandora/pandora/config.$HOST.jsonc" SITE_CONFIG="/srv/pandora/pandora/config.jsonc" test -e $HOST_CONFIG && cp $HOST_CONFIG $SITE_CONFIG test -e $SITE_CONFIG || cp /srv/pandora/pandora/config.pandora.jsonc $SITE_CONFIG cat > /srv/pandora/pandora/local_settings.py < /usr/local/bin/pandoractl << EOF #!/bin/sh exec /srv/pandora/ctl \$@ EOF chmod +x /usr/local/bin/pandoractl