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",
|
"java": "1.17.1",
|
||||||
"bedrock": "1.17.31.01",
|
"bedrock": "1.17.31.01",
|
||||||
"pocketmine": "4.0.0-BETA3",
|
"pocketmine": "4.0.0-BETA3",
|
||||||
"spigot": "1.17.1"
|
"spigot": "1.17.1",
|
||||||
|
"dragonfly": "1.17.30"
|
||||||
},
|
},
|
||||||
"java": {
|
"java": {
|
||||||
"1.17.1": {
|
"1.17.1": {
|
||||||
@@ -926,5 +927,6 @@
|
|||||||
"version": "1.4.6",
|
"version": "1.4.6",
|
||||||
"url": "https://getbukkit.org/get/29mixbrJ32rlDGLn8L3dIe4jvkLPdgom"
|
"url": "https://getbukkit.org/get/29mixbrJ32rlDGLn8L3dIe4jvkLPdgom"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"dragonfly": {}
|
||||||
}
|
}
|
@@ -71,12 +71,14 @@ async function CreateLibZIP(url = "") {
|
|||||||
java: null,
|
java: null,
|
||||||
bedrock: null,
|
bedrock: null,
|
||||||
pocketmine: null,
|
pocketmine: null,
|
||||||
spigot: null
|
spigot: null,
|
||||||
|
dragonfly: null
|
||||||
},
|
},
|
||||||
java: {},
|
java: {},
|
||||||
bedrock: {},
|
bedrock: {},
|
||||||
pocketmine: {},
|
pocketmine: {},
|
||||||
spigot: {}
|
spigot: {},
|
||||||
|
dragonfly: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Pre URLs
|
// Get Pre URLs
|
||||||
@@ -161,6 +163,45 @@ async function CreateLibZIP(url = "") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
// Spigot
|
||||||
new_Server.spigot = await Spigot_Lint();
|
new_Server.spigot = await Spigot_Lint();
|
||||||
new_Server.latest.spigot = new_Server.spigot[0].version
|
new_Server.latest.spigot = new_Server.spigot[0].version
|
||||||
|
Reference in New Issue
Block a user