Skip to content

Commit 130825a

Browse files
Merge pull request #41 from A1EF/master
Little improvement of `install.sh`
2 parents dcd9d8d + cae5850 commit 130825a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

install.sh

100644100755
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
set -euo pipefail
44

5-
UBUNTU_VERSION=$(fgrep VERSION_ID /etc/os-release | cut -d\" -f2)
6-
UBUNTU_CODENAME=$(fgrep VERSION_CODENAME /etc/os-release | cut -d= -f2)
5+
UBUNTU_VERSION=$(grep -F VERSION_ID /etc/os-release | cut -d\" -f2)
6+
UBUNTU_CODENAME=$(grep -F VERSION_CODENAME /etc/os-release | cut -d= -f2)
77

8-
apt-get update -y
8+
apt-get update
99
apt-get dist-upgrade -y
1010
apt-get install wget gnupg add-apt-key -y
1111

@@ -74,7 +74,6 @@ gitfs_saltenv_whitelist:
7474
base
7575
gitfs_update_interval:
7676
80
77-
7877
EOF
7978

8079
systemctl restart salt-master
@@ -83,9 +82,9 @@ cat <<EOF > /etc/salt/minion_id
8382
opensourcewebsite.org
8483
EOF
8584

86-
cat <<EOF >> /etc/salt/minion
87-
master: 127.0.0.1
88-
EOF
85+
if ! grep -Fq 'master: 127.0.0.1' /etc/salt/minion; then
86+
echo 'master: 127.0.0.1' >> /etc/salt/minion
87+
fi
8988

9089
systemctl restart salt-minion
9190

0 commit comments

Comments
 (0)