File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ if [[ -d /root/.ssh ]]
11
11
then
12
12
echo -n " > Copying SSH keys to new user account..."
13
13
14
- cp -r .ssh /home/$TERRA_USER
14
+ cp -r /root/ .ssh /home/$TERRA_USER
15
15
chown -R $TERRA_USER :$TERRA_USER /home/$TERRA_USER /.ssh
16
16
chmod 644 /home/$TERRA_USER /.ssh/authorized_keys
17
17
@@ -33,6 +33,8 @@ echo " done."
33
33
34
34
echo -n " > Changing default SSH port, password login, and root configurations..."
35
35
36
+ sed -i' .bak1' -e ' s/^PasswordAuthentication /#PasswordAuthentication /' /etc/ssh/sshd_config
37
+ sed -i' .bak2' -e ' s/^PermitRootLogin /#PermitRootLogin /' /etc/ssh/sshd_config
36
38
echo " Port 9560" >> /etc/ssh/sshd_config
37
39
echo " PasswordAuthentication no" >> /etc/ssh/sshd_config
38
40
echo " PermitRootLogin no" >> /etc/ssh/sshd_config
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ exec 3>&1 4>&2 > user1.sh.log 2>&1
4
+
3
5
# # Update the repos.
4
6
echo " Updating the system"
5
7
echo " ==================="
@@ -19,9 +21,7 @@ echo "============="
19
21
echo -n " Updating bash profile..."
20
22
echo " export GOROOT=$GOROOT " >> ~ /.profile
21
23
echo " export GOPATH=$GOPATH " >> ~ /.profile
22
- source ~ /.profile
23
24
echo " export PATH=$GOPATH /bin:$GOROOT /bin:$PATH " >> ~ /.profile
24
- source ~ /.profile
25
25
echo " done."
26
26
27
27
echo " Software installation"
@@ -34,8 +34,9 @@ echo "-------------"
34
34
cd /home/$USER /downloads
35
35
curl -o go1.16.3.linux-amd64.tar.gz https://dl.google.com/go/go1.16.3.linux-amd64.tar.gz
36
36
sudo tar -C /usr/local -zxvf go1.16.3.linux-amd64.tar.gz
37
+ source ~ /.profile
37
38
echo -n " Installed "
38
- /usr/local/go/bin/ go version
39
+ go version
39
40
40
41
# Installation of terrad
41
42
echo " Installing terrad"
@@ -100,3 +101,4 @@ cd /home/$USER/oracle-feeder/price-server
100
101
echo " Making a default configuration file. REMEMBER TO CHANGE config/default.js"
101
102
cp config/default-sample.js config/default.js
102
103
104
+ exec 1>&3 2>&4
You can’t perform that action at this time.
0 commit comments