34 lines
743 B
Bash
Executable File
34 lines
743 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]}")"
|
|
env="$DIR"/.env
|
|
if [[ ! -f "$env" ]]; then
|
|
cp -v "$DIR"/example.env "$env"
|
|
fi
|
|
source "$env"
|
|
|
|
## Main ##
|
|
|
|
# Create folders.
|
|
mkdir -pv $FDROID_DATA
|
|
|
|
keystore="$DIR"/files/keystore.p12
|
|
if [[ ! -f "$keystore" ]]; then
|
|
echo "ERROR: $keystore not detected. Please create it and config.yml using 'fdroid init'."
|
|
exit 1
|
|
fi
|
|
|
|
config="$DIR"/files/config.yml
|
|
if [[ ! -f "$config" ]]; then
|
|
echo "ERROR: $config not detected. Please copy the file that came with your keystore.p12 from 'fdroid init'."
|
|
exit 1
|
|
fi
|
|
|
|
# Finish successfully.
|
|
exit 0
|