mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-03 00:01:50 +02:00
Various housekeeping changes
This commit is contained in:
parent
ad9b38acf1
commit
3171adc1b2
10 changed files with 230 additions and 30 deletions
|
@ -156,6 +156,19 @@ else
|
|||
echo "New error_log table created successfully."
|
||||
fi
|
||||
|
||||
CONFIG_FILE="/opt/registry/automation/config.php"
|
||||
|
||||
# Define the content to insert
|
||||
INSERT_CONTENT="\n // Registry Admin Email\n 'admin_email' => 'admin@example.com', // Receives system notifications\n\n // Exchange Rate Configuration\n 'exchange_rate_api_key' => "", // Your exchangerate.host API key\n 'exchange_rate_base_currency' => "USD",\n 'exchange_rate_currencies' => [\"EUR\", \"GBP\", \"JPY\", \"CAD\", \"AUD\"], // Configurable list\n"
|
||||
|
||||
# Check if 'admin_email' exists and insert only if it does not exist
|
||||
if ! grep -q "'admin_email' => 'admin@example.com'" "$CONFIG_FILE"; then
|
||||
sed -i "/'iana_email' =>.*,/a\\$INSERT_CONTENT" "$CONFIG_FILE"
|
||||
echo "Configuration updated successfully."
|
||||
else
|
||||
echo "'admin_email' already exists. No changes made."
|
||||
fi
|
||||
|
||||
# Start services
|
||||
echo "Starting services..."
|
||||
systemctl start epp
|
||||
|
@ -174,4 +187,5 @@ else
|
|||
echo "There was an issue starting the services. /opt/registry1016 will not be deleted."
|
||||
fi
|
||||
|
||||
echo "Upgrade to v1.0.16 completed successfully."
|
||||
echo "Upgrade to v1.0.16 completed successfully."
|
||||
echo "Make sure you review and edit /opt/registry/automation/config.php"
|
Loading…
Add table
Add a link
Reference in a new issue