Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change message for nginx index #1256

Merged
merged 2 commits into from
Nov 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions scripts/setweb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ nginx -v

sudo service nginx start

sudo sed -i "s/Welcome to nginx/Welcome, my IP is `curl https://api.ipify.org`/g" /var/www/html/index.nginx-debian.html
sudo sed -i "s/<h1>Welcome to nginx!/<h1><br><br>Welcome to Cloud-Barista<br><br><br>My IP is `curl https://api.ipify.org`<br><br>/g" /var/www/html/index.nginx-debian.html

sudo sed -i "s/Commercial support is available at/<h2>Check CB-Tumblebug MCIS VM Location<\/h2>/g" /var/www/html/index.nginx-debian.html

sudo sed -i "s/Thank you for using nginx/Thank you for using Cloud-Barista and CB-Tumblebug/g" /var/www/html/index.nginx-debian.html

sudo sed -i "s/<a href=\"http:\/\/nginx.com\/\">nginx.com<\/a>.<\/p>/<a href=\"https:\/\/tools.keycdn.com\/geo?host=`curl https://api.ipify.org`\">Check the Location of NGINX HOST<\/a>.<\/p>/g" /var/www/html/index.nginx-debian.html

sudo sed -i "s/:\/\/nginx.org\/\">nginx.org/:\/\/`curl https://api.ipify.org`:8888\/\">. Call to generate CPU load/g" /var/www/html/index.nginx-debian.html
sudo sed -i "s/<a href=\"http:\/\/nginx.com\/\">nginx.com<\/a>.<\/p>/<a href=\"https:\/\/www.geolocation.com\/?ip=`curl https://api.ipify.org`#ipresult\">Check the Location of NGINX HOST<\/a>.<\/p>/g" /var/www/html/index.nginx-debian.html

str=$(curl https://api.ipify.org)

Expand Down
12 changes: 12 additions & 0 deletions src/core/mcis/manageInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -1931,6 +1931,18 @@ func DelMcis(nsId string, mcisId string, option string) (common.IdList, error) {
}
deletedResources.IdList = append(deletedResources.IdList, output.IdList...)

// delete associated MCIS NLBs
mcisNlbId := mcisId + "-nlb"
check, _ = CheckMcis(nsId, mcisNlbId)
if check {
mcisNlbDeleteResult, err := DelMcis(nsId, mcisNlbId, option)
if err != nil {
common.CBLog.Error(err)
return deletedResources, err
}
deletedResources.IdList = append(deletedResources.IdList, mcisNlbDeleteResult.IdList...)
}

// delete mcis info
err = common.CBStore.Delete(key)
if err != nil {
Expand Down