- Replace hardcoded values with environment variables in odoo and nextcloud sections - Update NEXTCLOUD_PASSWORD to use placeholder syntax for security - Maintain consistent formatting and structure with existing code - No functional changes, improves configurability and security
49 lines
1.9 KiB
Bash
Executable File
49 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
create-env() {
|
|
if [[ -z "$1" ]]; then echo "\$1 is empty."; exit; fi
|
|
if [[ -z "$2" ]]; then echo "\$1 is empty."; exit; fi
|
|
TASK_DOTENV_DIR=${TASK_DOTENV_DIR:="$HOME/.config/taskfile.build"}
|
|
|
|
init-dotenv-dir
|
|
local env_filepath="$TASK_DOTENV_DIR/.env.$1"
|
|
if [[ -f "$env_filepath" ]]; then
|
|
echo "Env file already exists: $env_filepath"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Init env file: $env_filepath"
|
|
|
|