-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.sh
40 lines (33 loc) · 1001 Bytes
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
#------------------------------------------------------------------------------
# File: $HOME/init.sh
# Author: Ryan Smith <[email protected]>
#------------------------------------------------------------------------------
# init needs root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
init() {
wget -qO /etc/apt/sources.list https://raw.githubusercontent.com/RPSeq/dot/master/apt/sources.list
apt-get -y update
apt-get -y install \
apt-transport-https \
git \
sudo \
lsb-release
}
sudoers() {
echo "ryan ALL=(ALL:ALL) ALL" > /etc/sudoers.d/ryan
}
sshconf() {
sudo -u ryan -i mkdir /home/ryan/.ssh && ssh-keyscan -H github.com >> /home/ryan/.ssh/known_hosts
sudo -u ryan -i ssh-keygen -t rsa -b 4096 -C "[email protected]" -f /home/ryan/.ssh/key_name.pem
}
loader() {
sudo -u ryan -i git clone https://github.com/RPSeq/dot.git /home/ryan/dot
}
init
sudoers
sshconf
loader