# -*- mode: shell-script -*- PDS_LOCAL_DATADIR=/var/lib/bluesky PDS_DATADIR="$SERVICE_DATASTORE$PDS_LOCAL_DATADIR" PDS_ENV_FILE="$PDS_DATADIR/.env" bluesky:init() { init-config-add " $SERVICE_NAME: env_file: - \"$PDS_ENV_FILE\" " [ -e "$PDS_ENV_FILE" ] && return local admin_password=$(password:get admin internal) || { echo "Failed to get admin password" >&2 return 1 } mkdir -p "${PDS_ENV_FILE%/*}" cat > "$PDS_ENV_FILE" <