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 : data_disk.js
/* * Copyright VMware, Inc. * SPDX-License-Identifier: GPL-2.0-only */ /// <reference path="../../typings-recipe.d.ts" /> /* * Use data disk for /bitnami volume, if disk is specified * * This script detects whether an additional disk or partition was provided * for storing the application data in /bitnami folder ; if it is, it will * create partition, create filesystem and then mount it, copying existing * data to new disk. */ "use strict"; recipes.register({ id: "data-disk", on: { beforeInitialize: {}, beforeStart: {} }, conditions: { ifChanged: (input) => { return platform.getUniqueBootId(); } }, recipeHandler: async function (input) { let dataDiskDetails = await provisioner.cloud.getDataDiskDetails(); // set xfs for mongodb let fileSystemType = (provisioner.stackDefinition.details.key === "mongodb") ? "xfs" : "ext4"; if (dataDiskDetails) { // initialize disk partition if disk was specified if (dataDiskDetails.dataDiskName) { if (!fs.existsSync(dataDiskDetails.dataDiskPartition)) { let dataDiskDevice = platform.getDiskDevice(dataDiskDetails.dataDiskName); logger.info(`Creating data disk partition using filesystem type ${fileSystemType}`); await dataDiskDevice.setPartitions([ { // ran into issues with GPT partition tables not supporting creation // of partitions until very end, leave 1MB unused start: 2048, end: (dataDiskDevice.diskSize - 1024), number: 1, type: fileSystemType, } ]); logger.info("Creating data disk partition filesystem"); } else { logger.info("Found data disk partition"); } } logger.info("Mounting data disk filesystem"); let dataRestored = false; try { platform.mount({ device: dataDiskDetails.dataDiskPartition, mountPoint: platform.pathInfo.namiDataPath, type: fileSystemType }); dataRestored = true; } catch (e) { const temporaryMountPoint = `${platform.pathInfo.namiDataPath}.tmp`; logger.info(`Unable to mount data disk - creating ${fileSystemType} filesystem`); await utils.retry(() => { runProgram(`mkfs.${fileSystemType}`, [dataDiskDetails.dataDiskPartition]); }); logger.info("Copying existing data to volume"); platform.mount({ device: dataDiskDetails.dataDiskPartition, mountPoint: temporaryMountPoint, type: fileSystemType }); runProgram("cp", [ "-pfR", `${platform.pathInfo.namiDataPath}/.`, temporaryMountPoint ]); logger.info("Re-mounting data"); runProgram("umount", [temporaryMountPoint]); fs.rmSync(temporaryMountPoint, { recursive: true }); platform.mount({ device: dataDiskDetails.dataDiskPartition, mountPoint: platform.pathInfo.namiDataPath, type: fileSystemType }); } // Create .restored file if the volume contains any persisted data // Keep out of the try/catch block to avoid formatting in the scenario where touching the file fails // Used in recipes to allow detecting if the solution has already been initialized in a previous deployment if (dataRestored) fs.writeFileSync(path.join(platform.pathInfo.namiDataPath, ".restored"), ""); } else { logger.info("Data disk not present"); } } });
Close