mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update INSTALL.sh
This commit is contained in:
parent
c85727879a
commit
d720828ff8
16
INSTALL.sh
16
INSTALL.sh
@ -1258,6 +1258,20 @@ rm_helpers(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setup_swap(){
|
||||||
|
# if ram less than 8GB, create swap
|
||||||
|
memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
|
||||||
|
if [ -z "$(swapon -s)" ] && [ $memory -lt 8140752 ]; then
|
||||||
|
fallocate -l 1G /swapfile
|
||||||
|
chmod 600 /swapfile
|
||||||
|
mkswap /swapfile
|
||||||
|
swapon /swapfile
|
||||||
|
echo "/swapfile none swap sw 0 0" >> /etc/fstab
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
support_message() {
|
support_message() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "🎉 Welcome aboard and thank you for choosing OpenPanel! 🎉"
|
echo "🎉 Welcome aboard and thank you for choosing OpenPanel! 🎉"
|
||||||
@ -1347,6 +1361,8 @@ main
|
|||||||
|
|
||||||
send_install_log
|
send_install_log
|
||||||
|
|
||||||
|
setup_swap
|
||||||
|
|
||||||
rm_helpers
|
rm_helpers
|
||||||
|
|
||||||
print_space_and_line
|
print_space_and_line
|
||||||
|
Loading…
Reference in New Issue
Block a user