34 lines
639 B
Bash
Executable File
34 lines
639 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 2026-07-04 Hyperling
|
|
# Create the necessary folders for volumes to work.
|
|
# This must be run before the container will start properly.
|
|
|
|
## Setup ##
|
|
|
|
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
|
source $DIR/.env
|
|
|
|
## Main ##
|
|
|
|
# Create folders.
|
|
mkdir -pv $FDROID_DATA
|
|
|
|
if [[ ! -f files/leystore.p12 ]]; then
|
|
echo "ERROR: Keystore not detected. Please create it using 'keytool', like this:"
|
|
cat <<- EOF
|
|
|
|
keytool -genkeypair -v \
|
|
-storetype PKCS12 \
|
|
-keystore keystore.p12 \
|
|
-alias fdroid \
|
|
-keyalg RSA -keysize 4096 \
|
|
-validity 10000 \
|
|
-dname "CN=TEST, OU=F-Droid"
|
|
|
|
EOF
|
|
exit 1
|
|
fi
|
|
|
|
# Finish successfully.
|
|
exit 0
|