Skip to content

Instantly share code, notes, and snippets.

View enoch85's full-sized avatar

Daniel Hansson enoch85

View GitHub Profile
#!/bin/bash
# Root is needed
if [ "$EUID" -ne 0 ]
then
echo "This script must be run with root or sudo privileges! Please try again. :)"
exit
fi
# Check if Ubuntu
#!/bin/sh
#
# This script is used on a QNAP TS-269 PRO. https://www.en0ch.se/qnap-and-rsync/
#
# You have to change:
# 1. $SHAREUSR
# 2. $EXCLUDES (if you want o change the name of the file servername.excludes)
# 3. $SOURCE & $DESTINATION
# 4. user@yourserver.se for the mysqldump
# 5. --password=SUPERSECRET
@enoch85
enoch85 / lussh
Last active May 27, 2023 18:09 — forked from sbleon/lussh
lussh - script to authorize your SSH key on a server
#!/bin/bash
# make sure to run this with /bin/bash, NOT /bin/sh
echo
echo This script will help you setup ssh public key authentication.
host=dummy
@enoch85
enoch85 / Protonmail.md
Last active August 1, 2023 18:09 — forked from ibaiul/Protonmail.md
Configure the protonmail bridge linux client on Ubuntu 20.04 with Nextcloud

Protonmail on Ubuntu 20.04 server

#protonmail #ubuntu #linux

Before you start

Currently protonmail bridge for linux is distributed as part of an open beta program, but soon it will be made public (https://protonmail.com/bridge/install).

Consider that the bridge linux client requires a paid protonmail account to work.

Get the protonmail bridge linux installer

# nginx@nginx:~$ cat /etc/nginx/sites-available/outlook.conf
server {
listen 192.168.128.2:80;
server_name yourdomain.com;
return 301 https://yourdomain.com$request_uri;
}
server {
listen 192.168.128.2:443;
# USER: ubuntu
# PASS: Elefant09
# People should live in Sweden
d-i debian-installer/country string SE
# Computers should speak English
d-i debian-installer/language string en
d-i debian-installer/locale string en_US.UTF-8
d-i localechooser/preferred-locale string en_US.UTF-8