Skip to content

Instantly share code, notes, and snippets.

View bogdanrotariu's full-sized avatar

Bogdan-Stefan Rotariu bogdanrotariu

View GitHub Profile
@bogdanrotariu
bogdanrotariu / replace_synology_ssl_certs.sh
Last active October 29, 2022 21:28 — forked from catchdave/replace_synology_ssl_certs.sh
CLI script to programmatically replace SSL certs on Synology NAS
#!/bin/sh
#
# *** For DSM v6.x ***
#
# How to use this script:
# 1. Get your 3 PEM files ready to copy over from your local machine/update server (privkey.pem, fullchain.pem, cert.pem)
# and put into a directory (this will be $CERT_DIRECTORY).
# 2. Ensure you have a user setup on synology that has ssh access (and ssh access is setup).
# This user will need to be able to sudo as root (i.e. add this line to sudoers, <USER> is the user you create):
# <USER> ALL=(ALL) NOPASSWD: /var/services/homes/<USER>/replace_certs.sh
@bogdanrotariu
bogdanrotariu / proc_cpu_pid
Last active May 24, 2023 22:00 — forked from acrookston/proc_cpu_pid
Munin plugin to track CPU usage from specific processes based on process id's
#!/bin/sh
#
# Extended 2015 by Andrew Crookston <[email protected]> to use pidfiles instead of process names
# Original (c) 2010, Andrew Johnstone andrew @ajohnstone.com
# Based on the 'proc_mem' plugin, written by Rodrigo Sieiro rsieiro @gmail.com
#
# Configure it by using the pidfiles env. Format: name:pidfile name:pidfile. e.g.:
#
# [proc_cpu_pid]
# env.pidfiles munin-node:/var/run/munin/munin-node.pid