Skip to content

Instantly share code, notes, and snippets.

# 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 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
@meisterheister
meisterheister / otrs-update-patchlevel.sh
Last active October 3, 2021 11:54
OTRS Patch Level Update Script for OTRS 6.0
#!/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