Skip to content

Instantly share code, notes, and snippets.

View WaaromZoMoeilijk's full-sized avatar

Aziz WaaromZoMoeilijk

View GitHub Profile
#!/bin/bash
#
## Tech and Me ## - ©2016, https://www.techandme.se/
#
# Tested on Ubuntu Server 14.04.
#
SCRIPTS=/var/scripts
HTML=/var/www
OCPATH=$HTML/owncloud
DATA=$OCPATH/data
function ask_yes_or_no() {
read -p "$1 ([y]es or [N]o): "
case $(echo $REPLY | tr '[A-Z]' '[a-z]') in
y|yes) echo "yes" ;;
*) echo "no" ;;
esac
}
if [[ "yes" == $(ask_yes_or_no "Do you have an external Harddisk plugged in? (Recommended, SSD, powered external drive) ALL DATA WILL BE LOST AFTER THE FORMAT") ]]
then
echo
@WaaromZoMoeilijk
WaaromZoMoeilijk / lussh
Last active April 6, 2016 07:40 — 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
<VirtualHost *:80>
#header add Strict-Transport-Security: "max-age=15768000;includeSubdomains"
# SSLEngine on
### YOUR SERVER ADDRESS ###
ServerAdmin ich@dwgadf.de
ServerName example.com
ServerAlias www.example.com
### SETTINGS ###