Skip to content

Instantly share code, notes, and snippets.

View robertoschwald's full-sized avatar

Robert Oschwald robertoschwald

View GitHub Profile
@robertoschwald
robertoschwald / ConfigHowdyBeta.sh
Last active May 2, 2024 18:09 — forked from m1nicrusher/ConfigHowdy.sh
Config Howdy-Beta for Fedora 39 using GNOME
#!/usr/bin/env bash
set -e
# Configure Fedora PAM to use Howdy for facial recognition
# Configured sudo and GDM login.
# SELinux is also configured to allow Howdy to access necessary resources.
# Notes:
# - This script is tested on Fedora 39.
# - This script is for howdy-beta version, which provides pam_howdy.so
# Reference: https://copr.fedorainfracloud.org/coprs/principis/howdy-beta/
@robertoschwald
robertoschwald / build_bareos_packages.sh
Last active November 30, 2023 17:05
Build Bareos deb packages
# Build Bareos Debian Packages, e.g. for Raspberry PI OS / arm64
BAREOS_BUILD_VERSION=23.0.0-pre
BAREOS_BUILD_DATE=`date --rfc-email`
git clone https://github.com/bareos/bareos.git
git checkout tags/WIP/${BAREOS_BUILD_VERSION}
sudo apt install dpkg-dev fakeroot dch
sudo apt build-dep ./bareos
@robertoschwald
robertoschwald / prepare_nextcloud_docker.sh
Last active October 13, 2023 04:55
Configure NextCloud Docker with nginx-proxy, MariaDB, Redis, LetsEncrypt and Cron Support
#!/usr/bin/env bash
# Create Nextcloud host directory structure, .env and docker-compose.yml files
# 2020 robertoschwald
# Consists of the following containers:
# nginx-proxy (frontend proxy)
# nginx-proxy-letsencrypt (LetsEncrypt issuing)
# nextcloud-app (Nextcloud application server)
# nextcloud-cron (Nextcloud cron server. Executes cron.php every few minutes)
@robertoschwald
robertoschwald / upgrade_to_bullseye.sh
Last active August 30, 2022 15:24
Upgrade Raspberry from Buster to Bullseye in-place
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as root"
exit
fi
# Change Buster release-info to oldstable
apt update --allow-releaseinfo-change
@robertoschwald
robertoschwald / borgmatic.spec
Last active July 3, 2022 11:33
Borgmatic rpm .spec for Rocky8 (RHEL8, CentOS8, Alma8)
Name: borgmatic
Version: 1.6.5
Release: 1%{?dist}
Summary: Simple Python wrapper script for borgbackup
License: GPLv3
URL: https://torsion.org/borgmatic
Source0: https://projects.torsion.org/borgmatic-collective/borgmatic/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: borgmatic.service.patch
@robertoschwald
robertoschwald / macports_build_bacula_dmg_private.sh
Last active April 16, 2022 17:35
Script to build a standalone Bacula Client MDMG Package on OSX using MacPorts. Tested on OSX 10.11 using XCode 7.1.1 and Bacula 7.0.4
#!/bin/sh
# Script to build MacPorts based OSX Bacula FD Client (7.0.4) in private dir as MDMG installer
# containing all dependencies.
# (c) 2015 Robert Oschwald
# Prerequisites:
# - OSX (10.11 tested)
# - XCODE (7.1.1 and 7.2.0 tested)
# - PackageMaker.app (http://adcdownload.apple.com/Developer_Tools/auxiliary_tools_for_xcode__late_july_2012/xcode44auxtools6938114a.dmg)
@robertoschwald
robertoschwald / install_clamav.sh
Last active July 9, 2021 07:16
Install and configure ClamAV on CentOS7
#!/usr/bin/env bash
# install and configure clamav/freshclam on CentOS7.
# See https://gist.github.com/robertoschwald/b01a2001bb5bb15348a9bfe7ef543027
if ! [ $(id -u) = 0 ]; then
echo "Must run as root."
exit 1
fi
@robertoschwald
robertoschwald / grails4_hazelcast_springSession_config_hints.md
Last active May 25, 2021 22:56
Using Grails 4 with Spring-Session, and single-instance Hazelcast for Session-Replication and Hibernate 2nd Level cache

Goals

  • Use Spring-Session-Hazelcast to replicate Http Session between Application Nodes
  • Use Hazelcast Hibernate as Hibernate 2nd Level cache
  • Use only one single Hazelcast instance auto-generated by Spring Boot
  • Support Grails mutable Session objects (Flash messages, etc.)

The problem

  • Spring-Boot automatically configures a 'hazelcastInstance' bean if Hazelcast dependency is found.
  • We can configure hazelcast-hibernate to use an existing HazelcastInstance with hibernate.cache.hazelcast.instance_name config key.
  • Unfortunately, Grails instantiates the hibernateDatastore bean before Spring-Boot generates the hazelcastInstance bean.
@robertoschwald
robertoschwald / mod_jk.spec
Created August 19, 2020 10:43
mod_jk RPM Spec file for CentOS8
%{!?apxs: %{expand: %%define apxs %{_bindir}/apxs}}
%define httpd httpd
Name: mod_jk
Version: 1.2.48
Release: 1%{?org_tag}%{?dist}
Epoch: 0
Summary: Tomcat mod_jk connector for Apache
License: Apache License
@robertoschwald
robertoschwald / GitHubEnterprise.ovf
Last active September 13, 2020 07:08
GitHub Enterprise 2.8.7 fixed OVF file for vCenter 6.5
<?xml version="1.0" encoding="UTF-8"?>
<!-- Manually converted to vCenter 6.5 format by roos
Note: You must update the GitHubEnterprise.mf sha1 fingerprint of this file.
This version fixes the OVF import error in vCenter 6.5 ("..ProductInfo not allowed in Envelope..")
-->
<!--Generated by VMware ovftool 3.5.0 (build-1274719), UTC time: 2017-01-26T19:38:58.786729Z-->
<Envelope vmw:buildId="build-1274719" xmlns="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"