Skip to content

Commit 0970485

Browse files
authored
Merge pull request hestiacp#7 from serghey-rodin/master
update from master
2 parents 63e7e60 + 55f7598 commit 0970485

File tree

440 files changed

+25172
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

440 files changed

+25172
-116
lines changed

bin/v-add-dns-on-web-alias

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ domain_lvl=$(echo "$alias" |grep -o "\." |wc -l)
5050
# Adding second level domain
5151
if [ "$domain_lvl" -eq 1 ] || [ "${#top_domain}" -le '6' ]; then
5252
$BIN/v-add-dns-domain \
53-
$user $alias $ip '' '' '' '' '' $restart >> /dev/null
53+
$user $alias $ip '' '' '' '' '' '' '' '' $restart >> /dev/null
5454
exit
5555
fi
5656

5757
# Adding top-level domain and then its sub
58-
$BIN/v-add-dns-domain $user $top_domain $ip '' '' '' '' $restart >> /dev/null
58+
$BIN/v-add-dns-domain $user $top_domain $ip '' '' '' '' '' $restart >> /dev/null
5959

6060
# Checking top-level domain
6161
if [ ! -e "$USER_DATA/dns/$top_domain.conf" ]; then

bin/v-backup-user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do
6969
done
7070

7171
# Creating temporary directory
72-
tmpdir=$(mktemp -p /tmp -d)
72+
tmpdir=$(mktemp -p $BACKUP -d)
7373

7474
if [ "$?" -ne 0 ]; then
7575
echo "Can't create tmp dir $tmpdir" |$SENDMAIL -s "$subj" $email $notify

bin/v-restore-user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do
230230
done
231231

232232
# Creating temporary directory
233-
tmpdir=$(mktemp -p /tmp -d)
233+
tmpdir=$(mktemp -p $BACKUP -d)
234234
if [ "$?" -ne 0 ]; then
235235
echo "Can't create tmp dir $tmpdir" |$SENDMAIL -s "$subj" $email $notify
236236
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe

bin/v-suspend-dns-domain

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ is_object_unsuspended 'dns' 'DOMAIN' "$domain"
4141
# Action #
4242
#----------------------------------------------------------#
4343

44+
# Deleting system configs
45+
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
46+
if [ -e '/etc/named.conf' ]; then
47+
dns_conf='/etc/named.conf'
48+
else
49+
dns_conf='/etc/bind/named.conf'
50+
fi
51+
52+
sed -i "/\/$user\/conf\/dns\/$domain.db\"/d" $dns_conf
53+
fi
4454

4555
#----------------------------------------------------------#
4656
# Vesta #

bin/v-unsuspend-dns-domain

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,21 @@ is_object_suspended 'dns' 'DOMAIN' "$domain"
4040
# Action #
4141
#----------------------------------------------------------#
4242

43-
43+
# Creating system configs
44+
if [[ "$DNS_SYSTEM" =~ named|bind ]]; then
45+
if [ -e '/etc/named.conf' ]; then
46+
dns_conf='/etc/named.conf'
47+
dns_group='named'
48+
else
49+
dns_conf='/etc/bind/named.conf'
50+
dns_group='bind'
51+
fi
52+
53+
# Adding zone in named.conf
54+
named="zone \"$domain_idn\" {type master; file"
55+
named="$named \"$HOMEDIR/$user/conf/dns/$domain.db\";};"
56+
echo "$named" >> $dns_conf
57+
fi
4458

4559
#----------------------------------------------------------#
4660
# Vesta #

bin/v-update-user-quota

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ is_object_valid 'user' 'USER' "$user"
3333
# Updating disk quota
3434
# Had quota equals package value. Soft quota equals 90% of package value for warnings.
3535
quota=$(get_user_value '$DISK_QUOTA')
36-
soft=$(echo "$quota * 1024 * 0.90"|bc |cut -f 1 -d .)
36+
soft=$(echo "$quota * 1024"|bc |cut -f 1 -d .)
3737
hard=$(echo "$quota * 1024"|bc |cut -f 1 -d .)
3838

3939
# Searching home mount point

func/ip.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ get_ip_iface() {
2626
}
2727

2828

29-
# Check ip address speciefic value
29+
# Check ip address specific value
3030
is_ip_key_empty() {
3131
key="$1"
3232
string=$(cat $VESTA/data/ips/$ip)
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# It is split into several files forming the configuration hierarchy outlined
2+
# below, all located in the /etc/apache2/ directory:
3+
#
4+
# /etc/apache2/
5+
# |-- apache2.conf
6+
# | `-- ports.conf
7+
# |-- mods-enabled
8+
# | |-- *.load
9+
# | `-- *.conf
10+
# |-- conf.d
11+
# | `-- *
12+
13+
# Global configuration
14+
PidFile ${APACHE_PID_FILE}
15+
Timeout 30
16+
KeepAlive Off
17+
MaxKeepAliveRequests 100
18+
KeepAliveTimeout 10
19+
20+
<IfModule mpm_prefork_module>
21+
StartServers 8
22+
MinSpareServers 5
23+
MaxSpareServers 20
24+
ServerLimit 256
25+
MaxClients 200
26+
MaxRequestsPerChild 4000
27+
</IfModule>
28+
29+
<IfModule mpm_worker_module>
30+
StartServers 2
31+
MinSpareThreads 25
32+
MaxSpareThreads 75
33+
ThreadLimit 64
34+
ThreadsPerChild 25
35+
MaxClients 200
36+
MaxRequestsPerChild 4000
37+
</IfModule>
38+
39+
<IfModule mpm_event_module>
40+
StartServers 2
41+
MinSpareThreads 25
42+
MaxSpareThreads 75
43+
ThreadLimit 64
44+
ThreadsPerChild 25
45+
MaxClients 200
46+
MaxRequestsPerChild 4000
47+
</IfModule>
48+
49+
# These need to be set in /etc/apache2/envvars
50+
User ${APACHE_RUN_USER}
51+
Group ${APACHE_RUN_GROUP}
52+
#User www-data
53+
#Group www-data
54+
55+
AccessFileName .htaccess
56+
57+
<Files ~ "^\.ht">
58+
Order allow,deny
59+
Deny from all
60+
Satisfy all
61+
</Files>
62+
63+
DefaultType None
64+
HostnameLookups Off
65+
66+
ErrorLog ${APACHE_LOG_DIR}/error.log
67+
LogLevel warn
68+
69+
# Include module configuration:
70+
Include mods-enabled/*.load
71+
Include mods-enabled/*.conf
72+
73+
# Include list of ports to listen on and which to use for name based vhosts
74+
Include ports.conf
75+
76+
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
77+
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
78+
LogFormat "%h %l %u %t \"%r\" %>s %O" common
79+
LogFormat "%{Referer}i -> %U" referer
80+
LogFormat "%{User-agent}i" agent
81+
LogFormat "%b" bytes
82+
83+
Include conf.d/
84+
85+
# Include the virtual host configurations:
86+
#Include sites-enabled/
87+
88+
ErrorDocument 403 /error/403.html
89+
ErrorDocument 404 /error/404.html
90+
ErrorDocument 500 /error/50x.html
91+
ErrorDocument 501 /error/50x.html
92+
ErrorDocument 502 /error/50x.html
93+
ErrorDocument 503 /error/50x.html
94+
ErrorDocument 506 /error/50x.html
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Listen 127.0.0.1:8081
2+
<Location /server-status>
3+
SetHandler server-status
4+
Order deny,allow
5+
Deny from all
6+
Allow from 127.0.0.1
7+
Allow from all
8+
</Location>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// This is the primary configuration file for the BIND DNS server named.
2+
//
3+
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
4+
// structure of BIND configuration files in Debian, *BEFORE* you customize
5+
// this configuration file.
6+
//
7+
// If you are just adding zones, please do that in /etc/bind/named.conf.local
8+
9+
include "/etc/bind/named.conf.options";
10+
include "/etc/bind/named.conf.local";
11+
include "/etc/bind/named.conf.default-zones";
12+

0 commit comments

Comments
 (0)