Skip to content

Commit 4128e90

Browse files
committed
Added contact domain registrant module
1 parent 0b4d33c commit 4128e90

3 files changed

Lines changed: 134 additions & 4 deletions

File tree

INSTALL.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,21 +407,30 @@ mv fossbilling-whois/check.php /var/www/
407407

408408
- Edit the `/var/www/check.php` file and set your WHOIS and RDAP server URLs by replacing the placeholder values with your actual server addresses.
409409

410-
## 16. Installing FOSSBilling EPP-RFC Extensions:
410+
## 16. Domain Registrant Contact:
411+
412+
```bash
413+
git clone https://github.com/getnamingo/fossbilling-contact
414+
mv fossbilling-contact/Contact /var/www/modules/
415+
```
416+
417+
- Go to Extensions > Overview in the admin panel and activate "Domain Registrant Contact".
418+
419+
## 17. Installing FOSSBilling EPP-RFC Extensions:
411420

412421
For each registry you support, you will need to install a FOSSBilling EPP-RFC extension.
413422

414423
Navigate to https://github.com/getpinga/fossbilling-epp-rfc and follow the installation instructions specific to each registry.
415424

416425
To execute the required OT&E tests by various registries, you can use our Tembo client at https://github.com/getpinga/tembo
417426

418-
## 17. Installing FOSSBilling DNS Hosting Extensions:
427+
## 18. Installing FOSSBilling DNS Hosting Extensions:
419428

420429
To offer DNS hosting to your customers, you will need to install the FOSSBilling DNS Hosting extension.
421430

422431
Navigate to https://github.com/getnamingo/fossbilling-dns and follow the installation instructions.
423432

424-
## 18. Further Settings:
433+
## 19. Further Settings:
425434

426435
1. You will need to link to various ICANN documents in your footer, and also provide your terms and conditions and privacy policy.
427436

install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,12 @@ if [[ "$install_rdap_whois" == "Y" || "$install_rdap_whois" == "y" ]]; then
436436
git clone https://github.com/getnamingo/fossbilling-whois
437437
mv fossbilling-whois/Whois /var/www/modules/
438438
mv fossbilling-whois/check.php /var/www/
439-
439+
440440
sed -i "s|\$whoisServer = 'whois.example.com';|\$whoisServer = 'whois.$domain_name';|g" /var/www/check.php
441441
sed -i "s|\$rdap_url = 'rdap.example.com';|\$rdap_url = 'rdap.$domain_name';|g" /var/www/check.php
442+
443+
git clone https://github.com/getnamingo/fossbilling-contact
444+
mv fossbilling-contact/Contact /var/www/modules/
442445

443446
git clone https://github.com/getnamingo/fossbilling-registrar
444447
mv fossbilling-registrar/Registrar /var/www/modules/
@@ -471,6 +474,7 @@ echo "7. In the FOSSBilling admin panel, go to Extensions > Overview and activat
471474
echo " - Domain Contact Verification"
472475
echo " - TMCH Claims Notice Support"
473476
echo " - WHOIS & RDAP Client"
477+
echo " - Domain Registrant Contact"
474478
echo " - ICANN Registrar Accreditation"
475479
echo
476480
echo "8. Install FOSSBilling extensions for EPP and DNS as outlined in steps 16 and 17 of install.md."

update104.sh

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
#!/bin/bash
2+
3+
# Prompt the user for confirmation
4+
echo "This will update Namingo Registrar from v1.0.3 to v1.0.4."
5+
echo "Make sure you have a backup of the database, /var/www, and /opt/registrar."
6+
read -p "Are you sure you want to proceed? (y/n): " confirm
7+
8+
# Check user input
9+
if [[ "$confirm" != "y" ]]; then
10+
echo "Upgrade aborted."
11+
exit 0
12+
fi
13+
14+
# Create backup directory
15+
backup_dir="/opt/backup"
16+
mkdir -p "$backup_dir"
17+
18+
# Backup directories
19+
echo "Creating backups..."
20+
tar -czf "$backup_dir/panel_backup_$(date +%F).tar.gz" -C / var/www
21+
tar -czf "$backup_dir/registrar_backup_$(date +%F).tar.gz" -C / opt/registrar
22+
23+
# Database credentials
24+
config_file="/opt/registrar/whois/config.php"
25+
db_user=$(grep "'db_username'" "$config_file" | awk -F "=> '" '{print $2}' | sed "s/',//")
26+
db_pass=$(grep "'db_password'" "$config_file" | awk -F "=> '" '{print $2}' | sed "s/',//")
27+
db_host=$(grep "'db_host'" "$config_file" | awk -F "=> '" '{print $2}' | sed "s/',//")
28+
29+
# List of databases to back up
30+
databases=("registrar")
31+
32+
# Backup specific databases
33+
for db_name in "${databases[@]}"; do
34+
echo "Backing up database $db_name..."
35+
sql_backup_file="$backup_dir/db_${db_name}_backup_$(date +%F).sql"
36+
mysqldump -u"$db_user" -p"$db_pass" -h"$db_host" "$db_name" > "$sql_backup_file"
37+
38+
# Compress the SQL backup file
39+
echo "Compressing database backup $db_name..."
40+
tar -czf "${sql_backup_file}.tar.gz" -C "$backup_dir" "$(basename "$sql_backup_file")"
41+
42+
# Remove the uncompressed SQL file
43+
rm "$sql_backup_file"
44+
done
45+
46+
# Stop services
47+
echo "Stopping services..."
48+
systemctl stop nginx
49+
systemctl stop whois
50+
systemctl stop rdap
51+
52+
# Clone the new version of the repository
53+
echo "Cloning v1.0.4 from the repository..."
54+
git clone https://github.com/getnamingo/registrar /opt/registrar104
55+
56+
# Copy files from the new version to the appropriate directories
57+
echo "Copying files..."
58+
59+
# Function to copy files and maintain directory structure
60+
copy_files() {
61+
src_dir=$1
62+
dest_dir=$2
63+
64+
if [[ -d "$src_dir" ]]; then
65+
echo "Copying from $src_dir to $dest_dir..."
66+
cp -R "$src_dir/." "$dest_dir/"
67+
else
68+
echo "Source directory $src_dir does not exist. Skipping..."
69+
fi
70+
}
71+
72+
# Copy specific directories
73+
copy_files "/opt/registrar104/automation" "/opt/registrar/automation"
74+
copy_files "/opt/registrar104/whois" "/opt/registrar/whois"
75+
copy_files "/opt/registrar104/rdap" "/opt/registrar/rdap"
76+
77+
# Run composer update in copied directories (excluding docs)
78+
echo "Running composer update..."
79+
80+
composer_update() {
81+
dir=$1
82+
if [[ -d "$dir" ]]; then
83+
echo "Updating composer in $dir..."
84+
cd "$dir" && composer update
85+
else
86+
echo "Directory $dir does not exist. Skipping composer update..."
87+
fi
88+
}
89+
90+
# Update composer in relevant directories
91+
composer_update "/opt/registrar/automation"
92+
composer_update "/opt/registrar/whois"
93+
composer_update "/opt/registrar/rdap"
94+
95+
git clone https://github.com/getnamingo/fossbilling-contact
96+
mv fossbilling-contact/Contact /var/www/modules/
97+
98+
# Start services
99+
echo "Starting services..."
100+
systemctl start nginx
101+
systemctl start whois
102+
systemctl start rdap
103+
104+
# Check if services started successfully
105+
if [[ $? -eq 0 ]]; then
106+
echo "Services started successfully. Deleting /opt/registrar104..."
107+
rm -rf /opt/registrar104
108+
else
109+
echo "There was an issue starting the services. /opt/registrar104 will not be deleted."
110+
fi
111+
112+
# Final instructions to the user
113+
echo "Upgrade to v1.0.4 is almost complete. Please follow the final step below to finish the process:"
114+
echo
115+
echo "1. Open your browser and log in to the admin panel."
116+
echo "2. Navigate to System -> Update to apply the changes."
117+
echo

0 commit comments

Comments
 (0)