Skip to content

Instantly share code, notes, and snippets.

@sumonchai
sumonchai / move_syno_pkgs.sh
Created May 17, 2019 15:22 — forked from nobodypb/move_syno_pkgs.sh
Script for moving packages on a synology disk station from one volume to another - EXPERIMENTAL!
#!/bin/bash
SOURCE=/volume1
DEST=/volume2
APPDIR=\@appstore
ASK=true
while getopts ":y" opt; do
case $opt in
@sumonchai
sumonchai / letsencrypt-auto-renew
Created September 24, 2016 16:12 — forked from neutronth/letsencrypt-auto-renew
Let's Encrypt auto renew script
#/bin/sh
OPTS=$(getopt -o cehw: --long config:,expire-limit:,help,webservice: -n "$0" -- "$@")
if [ $? != 0 ]; then
echo "Terminating ..." >&2
exit 1
fi
CONFIG=/etc/letsencrypt/cli.ini
WEBSERVICE=nginx
@sumonchai
sumonchai / Fill_mikrotik_config.bash
Created June 24, 2016 16:06 — forked from elmariofredo/Fill_mikrotik_config.bash
L2TP IPSEC VPN Auto config for mikrotik based on following tutorial http://www.nasa-security.net/mikrotik/mikrotik-l2tp-with-ipsec/ !!! Edit user name/user pass and ipsec secret
# Fetch and fill config
mikrotik_vpn_config=$(curl https://gist.github.com/elmariofredo/7232556/raw/VPN-L2TP-IPSEC.mikrotik \
| sed -e '
s/IPSEC_PEER_SECRET/somesecret/g;
s/USER1_NAME/mario/g;
s/USER1_PASS/somepass/g;
s/IP_RANGE/172.16.24.100-172.16.24.200/g;
s/DNS_SERVER/172.16.22.1/g;
s/LOCAL_ADDRESS/172.16.22.1/g;
s/WINS_SERVER/172.16.22.1/g')