This script was made for personal purposes, but it can still be useful to many. You NEED to change variables inside the script, like the SSH public key.
On a new Ubuntu server, run the following command:
| #!/bin/bash | |
| # | |
| # Lee Robert's Base Ubuntu Installation script for use on Digital Ocean (Or any other ubuntu install really.) | |
| # Made and tested with Ubuntu 13.04 64bit | |
| # | |
| # Steps: | |
| # 01. Secure Root User | |
| # 02. Make .bashrc print out pretty colors (and root's prompt will be red) | |
| # 03. Create a local user | |
| # 04. Update sudoers file so only root + local user can use sudo |
| #!/bin/bash | |
| if [ "$(id -u)" != "0" ]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi | |
| CURRENT_USER=$(id -u -n) | |
| CURRENT_GROUP=$(id -g -n) | |
| CURRENT_USER_HOME=$(eval echo ~${SUDO_USER}) |
Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.
| #!/bin/sh | |
| # Copyright 2012 The Android Open Source Project | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
| #!/bin/sh | |
| # Copyright 2012 The Android Open Source Project | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
| tyler:blankflash/ $ sudo ./qboot blank-flash $* [3:09:51] | |
| Motorola qboot utility version 3.86 | |
| [ 0.000] Opening device: /dev/ttyUSB0 | |
| [ 0.000] Detecting device | |
| [ 0.003] ...cpu.id = 172 (0xac) | |
| [ 0.003] ...cpu.sn = 1271461894 (0x4bc8f806) | |
| [ 0.003] Opening singleimage | |
| [ 0.199] Loading package | |
| [ 0.210] ...filename = pkg.xml | |
| [ 0.216] Loading programmer |
| dashboard "Food": | |
| - h1 text: Food | |
| - h2 text: By caloric content | |
| - 3 columns: | |
| - rows: | |
| - h3 text: Bananas | |
| - pie chart: { | |
| "columns": [ | |
| ["Protein", 5], ["Sugar", 10], ["Other carbs", 40], ["Fat", 1] | |
| ] |
| #!/bin/bash | |
| TINYAPIKEY="YOUR_API_KEY" | |
| # Make sure source dir is supplied | |
| if [ -z "$1" ] | |
| then | |
| echo "Missing argument. Supply the source directory containing the images to be optimized. Usage: ./tiny.sh <source_dir>" | |
| exit 1 | |
| fi | |