Initial commit
This commit is contained in:
30
docker-entrypoint.sh
Normal file
30
docker-entrypoint.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xeo pipefail
|
||||
|
||||
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
|
||||
echo "Generating SSH key..."
|
||||
sed -i "s/^#HostKey.*$/HostKey \/etc\/ssh\/ssh_host_rsa_key/" /etc/ssh/sshd_config
|
||||
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
|
||||
fi
|
||||
|
||||
mkdir -p /root/.ssh
|
||||
echo "${SSH_RSA_PUBLIC_KEY}" > /root/.ssh/authorized_keys
|
||||
|
||||
if [ ! -f /fdroid/keystore/keystore.jks ]; then
|
||||
keytool -genkey -noprompt \
|
||||
-keyalg RSA \
|
||||
-alias "${FDROID_KEYSTORE_KEY_ALIAS}" \
|
||||
-dname "${FDROID_KEYSTORE_DNAME}" \
|
||||
-keystore /fdroid/keystore/keystore.jks \
|
||||
-storepass "${FDROID_KEYSTORE_PASS}" \
|
||||
-keypass "${FDROID_KEYSTORE_KEYPASS}"
|
||||
fi
|
||||
|
||||
echo "Updating configuration from environment..."
|
||||
envsubst < config.py.tmpl > config.py
|
||||
chmod 0600 config.py
|
||||
|
||||
/fdroid-update.sh
|
||||
|
||||
/usr/bin/supervisord
|
Reference in New Issue
Block a user