Bundle Ente CLI for Cloudron console
This commit is contained in:
18
start.sh
18
start.sh
@@ -22,6 +22,11 @@ log() {
|
||||
log "INFO" "Starting Ente Cloudron app"
|
||||
log "INFO" "Running in Cloudron environment with domain: ${CLOUDRON_APP_DOMAIN}"
|
||||
|
||||
# Ensure HOME is writable (needed for CLI usage)
|
||||
HOME_DIR="/app/data/home"
|
||||
export HOME="$HOME_DIR"
|
||||
mkdir -p "$HOME"
|
||||
|
||||
# Prevent infinite loops through startup flag
|
||||
if [ -f "/app/data/startup_in_progress" ]; then
|
||||
if [ "$(find /app/data/startup_in_progress -mmin +2)" ]; then
|
||||
@@ -140,6 +145,19 @@ else
|
||||
write_default_s3_template
|
||||
fi
|
||||
|
||||
# Seed Ente CLI configuration directory
|
||||
ENTE_CLI_CONFIG_DIR="$HOME/.ente"
|
||||
ENTE_CLI_CONFIG_FILE="$ENTE_CLI_CONFIG_DIR/config.yaml"
|
||||
if [ ! -f "$ENTE_CLI_CONFIG_FILE" ]; then
|
||||
mkdir -p "$ENTE_CLI_CONFIG_DIR"
|
||||
cat > "$ENTE_CLI_CONFIG_FILE" << EOF
|
||||
# Ente CLI configuration
|
||||
# Uncomment and set the host to point the CLI to this Cloudron deployment.
|
||||
#host: https://${CLOUDRON_APP_DOMAIN:-localhost}
|
||||
EOF
|
||||
chown -R cloudron:cloudron "$HOME_DIR" || true
|
||||
fi
|
||||
|
||||
S3_ACCESS_KEY="${S3_ACCESS_KEY:-$DEFAULT_S3_ACCESS_KEY}"
|
||||
S3_SECRET_KEY="${S3_SECRET_KEY:-$DEFAULT_S3_SECRET_KEY}"
|
||||
S3_ENDPOINT="${S3_ENDPOINT:-$DEFAULT_S3_ENDPOINT}"
|
||||
|
Reference in New Issue
Block a user