We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0674300 + 2eccb72 commit 87c8ab0Copy full SHA for 87c8ab0
install.sh
@@ -92,12 +92,15 @@ sleep 60
92
salt-key -a opensourcewebsite.org -y
93
94
# Swap
95
-fallocate -l 4G /swapfile
96
-chmod 600 /swapfile
97
-mkswap /swapfile
98
-swapon /swapfile
99
-echo '/swapfile none swap sw 0 0' >> /etc/fstab
100
-sysctl vm.swappiness=0
+if ! [[ -f /swapfile ]]; then
+ fallocate -l 4G /swapfile
+ chmod 600 /swapfile
+ mkswap /swapfile
+ swapon /swapfile
+ echo '/swapfile none swap sw 0 0' >> /etc/fstab
101
+ echo 'vm.swappiness=0' > /etc/sysctl.d/10-swappiness.conf
102
+ sysctl --system
103
+fi
104
105
# Certifications for nginx
106
mkdir -p /etc/letsencrypt/live/opensourcewebsite.org
0 commit comments