Skip to content

Commit 26cca87

Browse files
authored
Update hst-install-ubuntu.sh
Add RESOURCES_LIMIT to ubuntu script
1 parent c607a26 commit 26cca87

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

install/hst-install-ubuntu.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ help() {
7575
-i, --iptables Install iptables [yes|no] default: yes
7676
-b, --fail2ban Install Fail2Ban [yes|no] default: yes
7777
-q, --quota Filesystem Quota [yes|no] default: no
78+
-L, --resourcelimit Resource limitation [yes|no] default: no
7879
-W, --webterminal Web Terminal [yes|no] default: no
7980
-d, --api Activate API [yes|no] default: yes
8081
-r, --port Change Backend Port default: 8083
@@ -259,6 +260,7 @@ for arg; do
259260
--fail2ban) args="${args}-b " ;;
260261
--multiphp) args="${args}-o " ;;
261262
--quota) args="${args}-q " ;;
263+
--resourcelimit) args="${args}-L " ;;
262264
--webterminal) args="${args}-W " ;;
263265
--port) args="${args}-r " ;;
264266
--lang) args="${args}-l " ;;
@@ -299,6 +301,7 @@ while getopts "a:w:v:j:k:m:M:g:d:x:z:Z:c:t:i:b:r:o:q:l:y:s:u:e:p:W:D:fh" Option;
299301
i) iptables=$OPTARG ;; # Iptables
300302
b) fail2ban=$OPTARG ;; # Fail2ban
301303
q) quota=$OPTARG ;; # FS Quota
304+
L) resourcelimit=$OPTARG ;; # Resource Limitation
302305
W) webterminal=$OPTARG ;; # Web Terminal
303306
r) port=$OPTARG ;; # Backend Port
304307
l) lang=$OPTARG ;; # Language
@@ -379,6 +382,7 @@ fi
379382
set_default_value 'iptables' 'yes'
380383
set_default_value 'fail2ban' 'yes'
381384
set_default_value 'quota' 'no'
385+
set_default_value 'resourcelimit' 'no'
382386
set_default_value 'webterminal' 'no'
383387
set_default_value 'interactive' 'yes'
384388
set_default_value 'api' 'yes'
@@ -1380,6 +1384,13 @@ else
13801384
write_config_value "DISK_QUOTA" "no"
13811385
fi
13821386

1387+
# Resource limitation
1388+
if [ "$resourcelimit" = 'yes' ]; then
1389+
write_config_value "RESOURCES_LIMIT" "yes"
1390+
else
1391+
write_config_value "RESOURCES_LIMIT" "no"
1392+
fi
1393+
13831394
write_config_value "WEB_TERMINAL_PORT" "8085"
13841395

13851396
# Backups
@@ -2422,10 +2433,4 @@ $HESTIA/bin/v-add-user-notification "$username" 'Welcome to Hestia Control Panel
24222433
sort_config_file
24232434

24242435
if [ "$interactive" = 'yes' ]; then
2425-
echo "[ ! ] IMPORTANT: The system will now reboot to complete the installation process."
2426-
read -n 1 -s -r -p "Press any key to continue"
2427-
reboot
2428-
else
2429-
echo "[ ! ] IMPORTANT: You must restart the system before continuing!"
2430-
fi
2431-
# EOF
2436+
echo "[ ! ] IMPORTANT: The sys

0 commit comments

Comments
 (0)