This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a HTTPTrigger function in Powershell that updates a firewall rule on Azure MySQL Database. | |
# NOTE: A Managed Service Identity (MSI) must be assigned to the Azure Function and | |
# it must have the access permission (IAM) role „Contributor“ one the target resource group that contains the database and | |
# also permissions to get information from the VM that should be authorized to access the database. | |
# POST method: $req | |
$requestBody = Get-Content $req -Raw | ConvertFrom-Json | |
$sqlServer = $requestBody.sqlserver | |
$sqlRg = $requestBody.sqlrg | |
$vmName = $requestBody.vmname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a HTTPTrigger function in Powershell that deletes all Blobs which match a pattern and are older than X days. | |
# NOTE: A Managed Service Identity (MSI) must be assigned to the Azure Function and | |
# it must have the access permission (IAM) role „STORAGE ACCOUNT KEY OPERATOR SERVICE ROLE“ on the target Storage Account | |
# Predifined | |
$subId = '<EnterSubscriptionID>' | |
$isOldDate = [DateTime]::UtcNow.AddDays(-7) | |
$pattern = '.*.(log|txt)' | |
# POST method: $req |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# OTRS Patch Level Update Script for OTRS 6.0 | |
# | |
# Author: https://github.com/meisterheister | |
# Last Update: 2020-03-30 | |
# | |
# NOTE: This script was tested on Ubuntu 16.04 LTS. It can be run with 'sudo bash otrs-update-patchlevel.sh' | |
# Check if root |