Push #23
@ -1,53 +0,0 @@
|
||||
#!/bin/bash
|
||||
# bash /tmp/add-azure-smb30.sh "ResouceGroup" "StorageAccount" "fileshare"
|
||||
if ! command -v az &> /dev/null;then
|
||||
echo "Install azure az"
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v mount.cifs &> /dev/null;then
|
||||
echo "Install cifs-utils"
|
||||
echo "Debian/Ubuntu: # apt install cifs-utils"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${1}" ];then echo "Set Resouce Group"; read 1;fi
|
||||
if [ -z "${2}" ];then echo "Storage Account"; read 2;fi
|
||||
if [ -z "${3}" ];then echo "File Share Name"; read 3;fi
|
||||
|
||||
resourceGroupName="${1}"
|
||||
storageAccountName="${2}"
|
||||
fileShareName="${3}"
|
||||
more_option="gid=$EUID,uid=$EUID,file_mode=0775,dir_mode=0775"
|
||||
|
||||
httpEndpoint=$(az storage account show --resource-group $resourceGroupName --name $storageAccountName --query "primaryEndpoints.file" | tr -d '"')
|
||||
smbPath=$(echo $httpEndpoint | cut -c7-$(expr length $httpEndpoint))$fileShareName
|
||||
storageAccountKey=$(az storage account keys list --resource-group $resourceGroupName --account-name $storageAccountName --query "[0].value" | tr -d '"')
|
||||
mntPath="/mnt/$storageAccountName/$fileShareName"
|
||||
fileHost=$(echo $smbPath | tr -d "/")
|
||||
echo "$httpEndpoint,
|
||||
$mntPath,
|
||||
$mntPath,
|
||||
$storageAccountKey"
|
||||
|
||||
sudo umount $mntPath
|
||||
|
||||
sudo mkdir -p $mntPath
|
||||
sudo mount.cifs $smbPath $mntPath -o vers=3.0,username=$storageAccountName,password=$storageAccountKey,serverino,$more_option
|
||||
if [ ! -d "/etc/smbcredentials" ]; then
|
||||
sudo mkdir "/etc/smbcredentials"
|
||||
fi
|
||||
smbCredentialFile="/etc/smbcredentials/$storageAccountName.cred"
|
||||
if [ ! -f $smbCredentialFile ]; then
|
||||
echo "username=$storageAccountName" | sudo tee $smbCredentialFile > /dev/null
|
||||
echo "password=$storageAccountKey" | sudo tee -a $smbCredentialFile > /dev/null
|
||||
else
|
||||
echo "The credential file $smbCredentialFile already exists, and was not modified."
|
||||
fi
|
||||
sudo chmod 600 $smbCredentialFile
|
||||
if [ -z "$(grep $smbPath\ $mntPath /etc/fstab)" ]; then
|
||||
echo "$smbPath $mntPath cifs nofail,vers=3.0,credentials=$smbCredentialFile,serverino,$more_option 0 $((1 + $(cat /etc/fstab|awk '{print $6}'|tail -1)))" | sudo tee -a /etc/fstab > /dev/null
|
||||
else
|
||||
echo "/etc/fstab was not modified to avoid conflicting entries as this Azure file share was already present. You may want to double check /etc/fstab to ensure the configuration is as desired."
|
||||
fi
|
||||
|
||||
sudo mount -a
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,7 +3,8 @@
|
||||
"java": "1.17.1",
|
||||
"bedrock": "1.17.31.01",
|
||||
"pocketmine": "4.0.0-BETA3",
|
||||
"spigot": "1.17.1"
|
||||
"spigot": "1.17.1",
|
||||
"dragonfly": "1.17.30"
|
||||
},
|
||||
"java": {
|
||||
"1.17.1": {
|
||||
@ -926,5 +927,6 @@
|
||||
"version": "1.4.6",
|
||||
"url": "https://getbukkit.org/get/29mixbrJ32rlDGLn8L3dIe4jvkLPdgom"
|
||||
}
|
||||
]
|
||||
],
|
||||
"dragonfly": {}
|
||||
}
|
@ -71,12 +71,14 @@ async function CreateLibZIP(url = "") {
|
||||
java: null,
|
||||
bedrock: null,
|
||||
pocketmine: null,
|
||||
spigot: null
|
||||
spigot: null,
|
||||
dragonfly: null
|
||||
},
|
||||
java: {},
|
||||
bedrock: {},
|
||||
pocketmine: {},
|
||||
spigot: {}
|
||||
spigot: {},
|
||||
dragonfly: {}
|
||||
}
|
||||
|
||||
// Get Pre URLs
|
||||
@ -148,7 +150,7 @@ async function CreateLibZIP(url = "") {
|
||||
console.log("Fetching latest versions to PocketMine-MP...");
|
||||
const pocketmine_json = [...await GetJson("https://api.github.com/repos/pmmp/PocketMine-MP/releases")];
|
||||
console.log(`Feched latest versions to PocketMine-MP! (${pocketmine_json[0].tag_name})\n`);
|
||||
|
||||
|
||||
new_Server.latest.pocketmine = pocketmine_json[0].tag_name
|
||||
for (let index of pocketmine_json){
|
||||
if (!(old_Server_file.includes(index.tag_name))) {
|
||||
@ -160,7 +162,46 @@ async function CreateLibZIP(url = "") {
|
||||
console.log(new_Server.pocketmine[index.tag_name]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Dragonfly
|
||||
console.log("Dragonfly Builds");
|
||||
const dragonfly_releases = [...(await GetJson("https://api.github.com/repos/The-Bds-Maneger/Dragonfly_Build/releases"))];
|
||||
new_Server.latest.dragonfly = dragonfly_releases[0].tag_name;
|
||||
const mapped_dragonfly = {}
|
||||
for (let Version of dragonfly_releases) {
|
||||
mapped_dragonfly[Version.tag_name] = {
|
||||
linux: {aarch64: null, armv7: null, amd64: null, i386: null},
|
||||
win32: {aarch64: null, amd64: null, i386: null},
|
||||
darwin: {aarch64: null, amd64: null},
|
||||
android: {aarch64: null, amd64: null}
|
||||
}
|
||||
for (let assents of Version.assets) {
|
||||
if (/linux/.test(assents.name)) {
|
||||
if (/arm64/.test(assents.name)) mapped_dragonfly[Version.tag_name].linux.aarch64 = assents.browser_download_url;
|
||||
else if (/arm/.test(assents.name)) mapped_dragonfly[Version.tag_name].linux.armv7 = assents.browser_download_url;
|
||||
else if (/amd64/.test(assents.name)) mapped_dragonfly[Version.tag_name].linux.amd64 = assents.browser_download_url;
|
||||
else if (/386/.test(assents.name)) mapped_dragonfly[Version.tag_name].linux.i386 = assents.browser_download_url;
|
||||
else console.log("Skip:", assents.name);
|
||||
} else if (/win32/.test(assents.name)) {
|
||||
if (/arm64/.test(assents.name)) mapped_dragonfly[Version.tag_name].win32.aarch64 = assents.browser_download_url;
|
||||
else if (/amd64/.test(assents.name)) mapped_dragonfly[Version.tag_name].win32.amd64 = assents.browser_download_url;
|
||||
else if (/386/.test(assents.name)) mapped_dragonfly[Version.tag_name].win32.i386 = assents.browser_download_url;
|
||||
else console.log("Skip:", assents.name);
|
||||
} else if (/darwin/.test(assents.name)) {
|
||||
if (/arm64/.test(assents.name)) mapped_dragonfly[Version.tag_name].darwin.aarch64 = assents.browser_download_url;
|
||||
else if (/amd64/.test(assents.name)) mapped_dragonfly[Version.tag_name].darwin.amd64 = assents.browser_download_url;
|
||||
else console.log("Skip:", assents.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(mapped_dragonfly);
|
||||
for (let DragonflyVersion2 of Object.getOwnPropertyNames(mapped_dragonfly)) {
|
||||
if (!(oldServer.dragonfly)) new_Server.dragonfly = mapped_dragonfly;
|
||||
else {
|
||||
if (!(oldServer.dragonfly[DragonflyVersion2])) new_Server.dragonfly[DragonflyVersion2] = mapped_dragonfly[DragonflyVersion2];
|
||||
}
|
||||
}
|
||||
|
||||
// Spigot
|
||||
new_Server.spigot = await Spigot_Lint();
|
||||
new_Server.latest.spigot = new_Server.spigot[0].version
|
||||
|
Reference in New Issue
Block a user