Skip to content

Commit 40d8f2c

Browse files
Merge branch 'master' of https://github.com/serghey-rodin/vesta
2 parents 250b18a + 6c7e0b7 commit 40d8f2c

File tree

13 files changed

+213
-105
lines changed

13 files changed

+213
-105
lines changed

bin/v-add-user

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,13 @@ echo "$user:$password" | /usr/sbin/chpasswd
6565
mkdir $HOMEDIR/$user/conf
6666

6767
if [ ! -z "$WEB_SYSTEM" ]; then
68+
nginxuser=$(ps -eo user,comm|grep nginx|uniq|grep -v "root"|awk '{ print $1}')
6869
mkdir $HOMEDIR/$user/conf/web $HOMEDIR/$user/web $HOMEDIR/$user/tmp
69-
chmod 751 $HOMEDIR/$user/conf/web $HOMEDIR/$user/web
70-
chmod 771 $HOMEDIR/$user/tmp
71-
chown $user:$user $HOMEDIR/$user/web $HOMEDIR/$user/tmp
70+
chmod 751 $HOMEDIR/$user/conf/web
71+
chmod 710 $HOMEDIR/$user/web
72+
chmod 700 $HOMEDIR/$user/tmp
73+
chown $user:$nginxuser $HOMEDIR/$user/web
74+
chown $user:$user $HOMEDIR/$user/tmp
7275
fi
7376

7477
if [ ! -z "$MAIL_SYSTEM" ]; then

bin/v-list-user-log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ json_list() {
2727
echo -n ' "'$ID'": {
2828
"CMD": "'$CMD'",
2929
"UNDO": "'$UNDO'",
30-
"DATE": "'$DATE'",
30+
"TIME": "'$TIME'",
3131
"DATE": "'$DATE'"
3232
}'
3333
if [ "$i" -lt "$objects" ]; then

bin/v-update-web-domain-ssl

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#!/bin/bash
2+
# info: updating ssl certificate for domain
3+
# options: USER DOMAIN SSL_DIR [RESTART]
4+
#
5+
# The function updates the SSL certificate for a domain. Parameter ssl_dir is a path
6+
# to directory where 2 or 3 ssl files can be found. Certificate file
7+
# domain.tld.crt and its key domain.tld.key are mandatory. Certificate
8+
# authority domain.tld.ca file is optional.
9+
10+
11+
#----------------------------------------------------------#
12+
# Variable&Function #
13+
#----------------------------------------------------------#
14+
15+
# Argument definition
16+
user=$1
17+
domain=$(idn -t --quiet -u "$2" )
18+
domain_idn=$(idn -t --quiet -a "$domain")
19+
ssl_dir=$3
20+
restart="$4"
21+
22+
# Includes
23+
source $VESTA/func/main.sh
24+
source $VESTA/func/domain.sh
25+
source $VESTA/func/ip.sh
26+
source $VESTA/conf/vesta.conf
27+
28+
29+
#----------------------------------------------------------#
30+
# Verifications #
31+
#----------------------------------------------------------#
32+
33+
check_args '3' "$#" 'USER DOMAIN SSL_DIR [RESTART]'
34+
validate_format 'user' 'domain' 'ssl_dir'
35+
is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
36+
is_system_enabled "$WEB_SSL" 'SSL_SUPPORT'
37+
is_object_valid 'user' 'USER' "$user"
38+
is_object_unsuspended 'user' 'USER' "$user"
39+
is_object_valid 'web' 'DOMAIN' "$domain"
40+
is_object_unsuspended 'web' 'DOMAIN' "$domain"
41+
is_object_value_exist 'web' 'DOMAIN' "$domain" '$SSL'
42+
is_web_domain_cert_valid
43+
44+
45+
#----------------------------------------------------------#
46+
# Action #
47+
#----------------------------------------------------------#
48+
49+
# Adding certificate to user data directory
50+
cp -f $ssl_dir/$domain.crt $USER_DATA/ssl/$domain.crt
51+
cp -f $ssl_dir/$domain.key $USER_DATA/ssl/$domain.key
52+
cp -f $ssl_dir/$domain.crt $USER_DATA/ssl/$domain.pem
53+
if [ -e "$ssl_dir/$domain.ca" ]; then
54+
cp -f $ssl_dir/$domain.ca $USER_DATA/ssl/$domain.ca
55+
echo >> $USER_DATA/ssl/$domain.pem
56+
cat $USER_DATA/ssl/$domain.ca >> $USER_DATA/ssl/$domain.pem
57+
fi
58+
chmod 660 $USER_DATA/ssl/$domain.*
59+
60+
61+
62+
# Adding certificate to user dir
63+
cp -f $USER_DATA/ssl/$domain.crt $HOMEDIR/$user/conf/web/ssl.$domain.crt
64+
cp -f $USER_DATA/ssl/$domain.key $HOMEDIR/$user/conf/web/ssl.$domain.key
65+
cp -f $USER_DATA/ssl/$domain.pem $HOMEDIR/$user/conf/web/ssl.$domain.pem
66+
if [ -e "$USER_DATA/ssl/$domain.ca" ]; then
67+
cp -f $USER_DATA/ssl/$domain.ca $HOMEDIR/$user/conf/web/ssl.$domain.ca
68+
fi
69+
70+
71+
72+
#----------------------------------------------------------#
73+
# Vesta #
74+
#----------------------------------------------------------#
75+
76+
# Restarting web server
77+
if [ "$restart" != 'no' ]; then
78+
$BIN/v-restart-web
79+
check_result $? "Web restart failed" >/dev/null
80+
81+
if [ ! -z "$PROXY_SYSTEM" ]; then
82+
$BIN/v-restart-proxy
83+
check_result $? "Proxy restart failed" >/dev/null
84+
fi
85+
fi
86+
87+
# Logging
88+
log_history "update ssl certificate for $domain"
89+
log_event "$OK" "$EVENT"
90+
91+
exit

func/domain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ add_web_config() {
223223
trigger="${2/.*pl/.sh}"
224224
if [ -x "$WEBTPL/$1/$WEB_BACKEND/$trigger" ]; then
225225
$WEBTPL/$1/$WEB_BACKEND/$trigger \
226-
$user $domain $ip $HOMEDIR $HOMEDIR/$user/web/$domain/public_html
226+
$user $domain $local_ip $HOMEDIR $HOMEDIR/$user/web/$domain/public_html
227227
fi
228228
}
229229

func/main.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,10 +602,10 @@ is_dns_record_format_valid() {
602602
is_ip_format_valid "$1"
603603
fi
604604
if [ "$rtype" = 'NS' ]; then
605-
is_domain_format_valid "$1" 'ns_record'
605+
is_domain_format_valid "${1::-1}" 'ns_record'
606606
fi
607607
if [ "$rtype" = 'MX' ]; then
608-
is_domain_format_valid "$1" 'mx_record'
608+
is_domain_format_valid "${1::-1}" 'mx_record'
609609
is_int_format_valid "$priority" 'priority_record'
610610
fi
611611

install/debian/7/php5-fpm/www.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[www]
2+
listen = 127.0.0.1:9000
3+
listen.allowed_clients = 127.0.0.1
4+
user = www-data
5+
group = www-data
6+
pm = dynamic
7+
pm.max_children = 50
8+
pm.start_servers = 5
9+
pm.min_spare_servers = 3
10+
pm.max_spare_servers = 35

install/vst-install-debian.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,10 @@ if [ "$clamd" = 'yes' ]; then
10371037
wget $vestacp/clamav/clamd.conf -O /etc/clamav/clamd.conf
10381038
/usr/bin/freshclam
10391039
update-rc.d clamav-daemon defaults
1040+
if [ ! -d "/var/run/clamav" ]; then
1041+
mkdir /var/run/clamav
1042+
fi
1043+
chown -R clamav:clamav /var/run/clamav
10401044
service clamav-daemon start
10411045
check_result $? "clamav-daeom start failed"
10421046
fi

web/inc/i18n/nl.php

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@
241241
'Users' => 'Gebruikers',
242242
'Load Average' => 'Gemiddelde Belasting',
243243
'Memory Usage' => 'Geheugengebruik',
244-
'APACHE2 Usage' => 'APACHE2 Usage',
244+
'APACHE2 Usage' => 'APACHE2 Gebruik',
245245
'HTTPD Usage' => 'HTTPD Gebruik',
246246
'NGINX Usage' => 'NGINX Gebruik',
247247
'MySQL Usage on localhost' => 'MySQL Gebruik op localhost',
248248
'PostgreSQL Usage on localhost' => 'PostgreSQL Gebruik op localhost',
249249
'Bandwidth Usage eth0' => 'Bandbreedtegebruik eth0',
250-
'Exim Usage' => 'Exim Usage',
250+
'Exim Usage' => 'Exim Gebruik',
251251
'FTP Usage' => 'FTP Gebruik',
252252
'SSH Usage' => 'SSH Gebruik',
253253
'reverse proxy' => 'reverse proxy',
@@ -366,10 +366,10 @@
366366
'ftp user password' => 'FTP gebruikerswachtwoord',
367367
'ftp user' => 'FTP gebruiker',
368368
'Last 70 lines of %s.%s.log' => 'Laatste 70 lijnen van %s.%s.log',
369-
'AccessLog' => 'AccessLog',
370-
'ErrorLog' => 'ErrorLog',
371-
'Download AccessLog' => 'Download Access Log',
372-
'Download ErrorLog' => 'Download Error Log',
369+
'AccessLog' => 'ToegangLog',
370+
'ErrorLog' => 'FoutenLog',
371+
'Download AccessLog' => 'Download Toegang Log',
372+
'Download ErrorLog' => 'Download Fout Log',
373373
'Country' => 'Land',
374374
'2 letter code' => '2 letterige landcode',
375375
'State / Province' => 'Staat / Provincie',
@@ -390,19 +390,19 @@
390390
'SSH' => 'SSH',
391391
'FTP' => 'FTP',
392392
'VESTA' => 'VESTA',
393-
'Add one more Name Server' => 'Add one more Name Server',
393+
'Add one more Name Server' => 'Voeg nog een Name Server toe',
394394

395-
'web domain' => 'web domain',
396-
'dns domain' => 'dns domain',
395+
'web domain' => 'web domein',
396+
'dns domain' => 'dns domein',
397397
'dns record' => 'dns record',
398-
'mail domain' => 'mail domain',
398+
'mail domain' => 'mail domein',
399399
'mail account' => 'mail account',
400400
'cron job' => 'cron job',
401401

402402
'cron' => 'cron',
403403
'user dir' => 'user dir',
404404

405-
'unlimited' => 'unlimited',
405+
'unlimited' => 'oneindig',
406406
'1 account' => '1 account',
407407
'%s accounts' => '%s accounts',
408408
'1 domain' => '1 domein',
@@ -540,14 +540,14 @@
540540
'Nov' => 'Nov',
541541
'Dec' => 'Dec',
542542

543-
'Configuring Server' => 'Configuring Server',
543+
'Configuring Server' => 'Server Instellen',
544544
'Hostname' => 'Hostname',
545-
'Time Zone' => 'Time Zone',
546-
'Default Language' => 'Default Language',
545+
'Time Zone' => 'Tijdzone',
546+
'Default Language' => 'Standaard Taal',
547547
'Proxy Server' => 'Proxy Server',
548548
'Web Server' => 'Web Server',
549549
'Backend Server' => 'Backend Server',
550-
'Backend Pool Mode' => 'Backend Pool Mode',
550+
'Backend Pool Mode' => 'Backend Pool Stand',
551551
'DNS Server' => 'DNS Server',
552552
'DNS Cluster' => 'DNS Cluster',
553553
'MAIL Server' => 'MAIL Server',
@@ -560,19 +560,19 @@
560560
'phpPgAdmin URL' => 'phpPgAdmin URL',
561561
'Maximum Number Of Databases' => 'Maximum Number Of Databases',
562562
'Current Number Of Databases' => 'Current Number Of Databases',
563-
'Local backup' => 'Local backup',
563+
'Local backup' => 'Lokale backup',
564564
'Compression level' => 'Compression level',
565565
'Directory' => 'Directory',
566-
'Remote backup' => 'Remote backup',
566+
'Remote backup' => 'Afstand backup',
567567
'ftp' => 'FTP',
568568
'sftp' => 'SFTP',
569569
'SFTP Chroot' => 'SFTP Chroot',
570-
'FileSystem Disk Quota' => 'FileSystem Disk Quota',
570+
'FileSystem Disk Quota' => 'BestandenSystem Schijf Quotum',
571571
'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins',
572-
'preview' => 'preview',
572+
'preview' => 'Voorbeeld',
573573
'Reseller Role' => 'Reseller Role',
574-
'Web Config Editor' => 'Web Config Editor',
575-
'Template Manager' => 'Template Manager',
574+
'Web Config Editor' => 'Web Configuratie Bewerker',
575+
'Template Manager' => 'Voorbeeld Manager',
576576
'Backup Migration Manager' => 'Backup Migration Manager',
577577
'FileManager' => 'FileManager',
578578
'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK',
@@ -700,30 +700,30 @@
700700
'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.',
701701
'This is a commercial module, you would need to purchace license key to enable it.' => 'This is a commercial module, you would need to purchace license key to enable it.',
702702

703-
'Minutes' => 'Minutes',
704-
'Hourly' => 'Hourly',
705-
'Run Command' => 'Run Command',
706-
'every month' => 'every month',
703+
'Minutes' => 'Minuten',
704+
'Hourly' => 'Ieder Uur',
705+
'Run Command' => 'Voer commando uit',
706+
'every month' => 'elke maand',
707707
'every odd month' => 'every odd month',
708708
'every even month' => 'every even month',
709709
'every day' => 'every day',
710710
'every odd day' => 'every odd day',
711711
'every even day' => 'every even day',
712712
'weekdays (5 days)' => 'weekdays (5 days)',
713713
'weekend (2 days)' => 'weekend (2 days)',
714-
'Monday' => 'Monday',
715-
'Tuesday' => 'Tuesday',
716-
'Wednesday' => 'Wednesday',
717-
'Thursday' => 'Thursday',
718-
'Friday' => 'Friday',
719-
'Saturday' => 'Saturday',
720-
'Sunday' => 'Sunday',
721-
'every hour' => 'every hour',
722-
'every two hours' => 'every two hours',
723-
'every minute' => 'every minute',
724-
'every two minutes' => 'every two minutes',
725-
'every' => 'every',
726-
'Generate' => 'Generate',
714+
'Monday' => 'Maandag',
715+
'Tuesday' => 'Dinsdag',
716+
'Wednesday' => 'Woensdag',
717+
'Thursday' => 'Donderdag',
718+
'Friday' => 'Vrijdag',
719+
'Saturday' => 'Zaterdag',
720+
'Sunday' => 'Zondag',
721+
'every hour' => 'elk uur',
722+
'every two hours' => 'elke twee uur',
723+
'every minute' => 'elke minuut',
724+
'every two minutes' => 'elke twee minuten',
725+
'every' => 'alle',
726+
'Generate' => 'Genereer',
727727

728728
'webalizer' => 'webalizer',
729729
'awstats' => 'awstats',

0 commit comments

Comments
 (0)