Skip to content

Commit 368c8d5

Browse files
authored
Add RESOURCES_LIMIT to debian script
1 parent 26cca87 commit 368c8d5

File tree

1 file changed

+42
-44
lines changed

1 file changed

+42
-44
lines changed

install/hst-install-debian.sh

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ help() {
7474
-i, --iptables Install iptables [yes|no] default: yes
7575
-b, --fail2ban Install Fail2Ban [yes|no] default: yes
7676
-q, --quota Filesystem Quota [yes|no] default: no
77+
-L, --resourcelimit Resource limitation [yes|no] default: no
7778
-W, --webterminal Web Terminal [yes|no] default: no
7879
-d, --api Activate API [yes|no] default: yes
7980
-r, --port Change Backend Port default: 8083
@@ -258,6 +259,7 @@ for arg; do
258259
--fail2ban) args="${args}-b " ;;
259260
--multiphp) args="${args}-o " ;;
260261
--quota) args="${args}-q " ;;
262+
--resourcelimit) args="${args}-L " ;;
261263
--webterminal) args="${args}-W " ;;
262264
--port) args="${args}-r " ;;
263265
--lang) args="${args}-l " ;;
@@ -281,36 +283,37 @@ eval set -- "$args"
281283
# Parsing arguments
282284
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; do
283285
case $Option in
284-
a) apache=$OPTARG ;; # Apache
285-
w) phpfpm=$OPTARG ;; # PHP-FPM
286-
o) multiphp=$OPTARG ;; # Multi-PHP
287-
v) vsftpd=$OPTARG ;; # Vsftpd
288-
j) proftpd=$OPTARG ;; # Proftpd
289-
k) named=$OPTARG ;; # Named
290-
m) mysql=$OPTARG ;; # MariaDB
291-
M) mysql8=$OPTARG ;; # MySQL
292-
g) postgresql=$OPTARG ;; # PostgreSQL
293-
x) exim=$OPTARG ;; # Exim
294-
z) dovecot=$OPTARG ;; # Dovecot
295-
Z) sieve=$OPTARG ;; # Sieve
296-
c) clamd=$OPTARG ;; # ClamAV
297-
t) spamd=$OPTARG ;; # SpamAssassin
298-
i) iptables=$OPTARG ;; # Iptables
299-
b) fail2ban=$OPTARG ;; # Fail2ban
300-
q) quota=$OPTARG ;; # FS Quota
301-
W) webterminal=$OPTARG ;; # Web Terminal
302-
r) port=$OPTARG ;; # Backend Port
303-
l) lang=$OPTARG ;; # Language
304-
d) api=$OPTARG ;; # Activate API
305-
y) interactive=$OPTARG ;; # Interactive install
306-
s) servername=$OPTARG ;; # Hostname
307-
e) email=$OPTARG ;; # Admin email
308-
u) username=$OPTARG ;; # Admin username
309-
p) vpass=$OPTARG ;; # Admin password
310-
D) withdebs=$OPTARG ;; # Hestia debs path
311-
f) force='yes' ;; # Force install
312-
h) help ;; # Help
313-
*) help ;; # Print help (default)
286+
a) apache=$OPTARG ;; # Apache
287+
w) phpfpm=$OPTARG ;; # PHP-FPM
288+
o) multiphp=$OPTARG ;; # Multi-PHP
289+
v) vsftpd=$OPTARG ;; # Vsftpd
290+
j) proftpd=$OPTARG ;; # Proftpd
291+
k) named=$OPTARG ;; # Named
292+
m) mysql=$OPTARG ;; # MariaDB
293+
M) mysql8=$OPTARG ;; # MySQL
294+
g) postgresql=$OPTARG ;; # PostgreSQL
295+
x) exim=$OPTARG ;; # Exim
296+
z) dovecot=$OPTARG ;; # Dovecot
297+
Z) sieve=$OPTARG ;; # Sieve
298+
c) clamd=$OPTARG ;; # ClamAV
299+
t) spamd=$OPTARG ;; # SpamAssassin
300+
i) iptables=$OPTARG ;; # Iptables
301+
b) fail2ban=$OPTARG ;; # Fail2ban
302+
q) quota=$OPTARG ;; # FS Quota
303+
L) resourcelimit=$OPTARG ;; # Resource Limitation
304+
W) webterminal=$OPTARG ;; # Web Terminal
305+
r) port=$OPTARG ;; # Backend Port
306+
l) lang=$OPTARG ;; # Language
307+
d) api=$OPTARG ;; # Activate API
308+
y) interactive=$OPTARG ;; # Interactive install
309+
s) servername=$OPTARG ;; # Hostname
310+
e) email=$OPTARG ;; # Admin email
311+
u) username=$OPTARG ;; # Admin username
312+
p) vpass=$OPTARG ;; # Admin password
313+
D) withdebs=$OPTARG ;; # Hestia debs path
314+
f) force='yes' ;; # Force install
315+
h) help ;; # Help
316+
*) help ;; # Print help (default)
314317
esac
315318
done
316319

@@ -378,6 +381,7 @@ fi
378381
set_default_value 'iptables' 'yes'
379382
set_default_value 'fail2ban' 'yes'
380383
set_default_value 'quota' 'no'
384+
set_default_value 'resourcelimit' 'no'
381385
set_default_value 'webterminal' 'no'
382386
set_default_value 'interactive' 'yes'
383387
set_default_value 'api' 'yes'
@@ -1366,6 +1370,13 @@ else
13661370
write_config_value "DISK_QUOTA" "no"
13671371
fi
13681372

1373+
# Resource limitation
1374+
if [ "$resourcelimit" = 'yes' ]; then
1375+
write_config_value "RESOURCES_LIMIT" "yes"
1376+
else
1377+
write_config_value "RESOURCES_LIMIT" "no"
1378+
fi
1379+
13691380
write_config_value "WEB_TERMINAL_PORT" "8085"
13701381

13711382
# Backups
@@ -2442,17 +2453,4 @@ cat $tmpfile
24422453
rm -f $tmpfile
24432454

24442455
# Add welcome message to notification panel
2445-
$HESTIA/bin/v-add-user-notification "$username" 'Welcome to Hestia Control Panel!' '<p>You are now ready to begin adding <a href="/add/user/">user accounts</a> and <a href="/add/web/">domains</a>. For help and assistance, <a href="https://hestiacp.com/docs/" target="_blank">view the documentation</a> or <a href="https://forum.hestiacp.com/" target="_blank">visit our forum</a>.</p><p>Please <a href="https://github.com/hestiacp/hestiacp/issues" target="_blank">report any issues via GitHub</a>.</p><p class="u-text-bold">Have a wonderful day!</p><p><i class="fas fa-heart icon-red"></i> The Hestia Control Panel development team</p>'
2446-
2447-
# Clean-up
2448-
# Sort final configuration file
2449-
sort_config_file
2450-
2451-
if [ "$interactive" = 'yes' ]; then
2452-
echo "[ ! ] IMPORTANT: The system will now reboot to complete the installation process."
2453-
read -n 1 -s -r -p "Press any key to continue"
2454-
reboot
2455-
else
2456-
echo "[ ! ] IMPORTANT: You must restart the system before continuing!"
2457-
fi
2458-
# EOF
2456+
$HESTIA/bin/v-add-user-notification "$username" 'Welcome to Hestia Control Panel!' '<p>You are now ready to begin adding <a href="/add/user/">user accounts</a> and <a href="/add/web/">domains</a>. For help and assistance, <a href="https://hestiacp.com/docs/" target="_blank">view the documentation</a> or <a href="https://forum.hestiacp.com/" target="_blank">visit our forum</a>.</p><p>Please <a href="https://github.com/hestiacp/hestiacp/issues" target="_blank">report any issues via GitHub</a>.</p><p class="u-text-bold">Have a wonderful day!</p><p><i class="fas fa-heart icon-

0 commit comments

Comments
 (0)