mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
07ea6e8c69
The previous was too much subject to confusions
27 lines
577 B
Bash
27 lines
577 B
Bash
#!/usr/bin/env bash
|
|
|
|
config()
|
|
{
|
|
echo -ne "Checking env file... "
|
|
FABMANAGER_PATH=$(pwd)
|
|
if [ ! -w "$FABMANAGER_PATH/config/env" ]; then
|
|
echo "Fab-manager's environment file not found or not writable."
|
|
echo "Please run this script from the installation folder, and as a user having write access on config/env"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
rename_var()
|
|
{
|
|
current=$(grep "SUPERADMIN_EMAIL=" "$FABMANAGER_PATH/config/env")
|
|
sed -i.bak "s/SUPERADMIN_EMAIL=$current/ADMINSYS_EMAIL=$current/g" "$FABMANAGER_PATH/config/env"
|
|
}
|
|
|
|
proceed()
|
|
{
|
|
config
|
|
rename_var
|
|
}
|
|
|
|
proceed "$@"
|