This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
#header add Strict-Transport-Security: "max-age=15768000;includeSubdomains" | |
# SSLEngine on | |
### YOUR SERVER ADDRESS ### | |
ServerAdmin [email protected] | |
ServerName example.com | |
ServerAlias www.example.com | |
### SETTINGS ### |
NewerOlder