Skip to content

Instantly share code, notes, and snippets.

@bmatthewshea
bmatthewshea / certbot_pip_install-debian_ubuntu.md
Last active May 2, 2024 13:43
Debian/Ubuntu - CERTBOT without SNAP/SNAPD

CERTBOT - Install using Python PIP

Install Certbot using Python PIP (Package Installer for Python) - without using SNAP, APT or SYSTEMD. (Debian/Ubuntu)


This guide will help you install LetsEncrypt / Certbot using venv PIP under Debian/Ubuntu.

  • This guide has been tested up to Debian 12 / Bookworm.
@tavinus
tavinus / nextcloud_cron_tweaks.md
Last active December 24, 2022 12:29
Nextcloud Cron Tweaks

Making Nextcloud's Cron Behave

Nextcloud needs frequent background jobs to keep running properly.

Depending on the situation this "cron job" may take a very long time, overlapping with the default 5 minute delay between jobs. Which may end up running several instances of the job.

To mitigate this we have 2 options:

  • Use a systemd service+timer
  • Encapsulate the cronjob into a bash script that checks if it is already running

The systemd approach has official support and will (by default) not run on top of a previous run (if still running).

@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active May 4, 2024 00:19
Ubuntu and Debian Cloud images in Proxmox
@mowings
mowings / cron_docker.md
Last active May 8, 2024 11:54
Run cron on docker with job output directed to stdout

You'd like a docker container that runs cron jobs, with the output of those cron jobs going to stdout so they are accessible as docker logs. How do you do that?

Install cron, and set it up to run in the foreground

In your Dockerfile, apt-get -y install cron Use apk or whatever if you are running on alpine or another distribution Set the command or entrypoint in your Dockerfile to run cron 9n the foreground

ENTRYPOINT ["/usr/sbin/cron", "-f"]
@greenhat
greenhat / postgresql.yml
Created February 7, 2016 16:58
Ansible playbook for PostgreSQL setup
---
- name: install PostgreSQL
apt: pkg={{ item }} update_cache=yes state=present
sudo: yes
tags: postgres
with_items:
- postgresql-{{ postgresql_version }}
- postgresql-client-{{ postgresql_version }}
- postgresql-contrib-{{ postgresql_version }}
- libpq-dev
@stefanprodan
stefanprodan / Backup-Postgres.ps1
Last active March 22, 2023 04:28
PostgreSQL cluster base backup automation made easy with PowerShell and Windows Task Scheduler or PgAgent. This script does the following: checks if there is enough free space to make a new backup (based on the last backup size), purges expired backups, creates a new folder for each backup, calls pb_basebackup to begin a tar gzip backup of every…
#############################################
##
## PostgreSQL base backup automation
## Author: Stefan Prodan
## Date : 20 Oct 2014
## Company: VeriTech.io
#############################################
# path settings
$BackupRoot = 'C:\Database\Backup';