diff --git a/bin/v-acknowledge-user-notification b/bin/v-acknowledge-user-notification index 84823d27..19ea65f8 100755 --- a/bin/v-acknowledge-user-notification +++ b/bin/v-acknowledge-user-notification @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER NOTIFICATION' -validate_format 'user' 'nid' +is_format_valid 'user' 'nid' is_object_valid 'user' 'USER' "$user" @@ -61,6 +61,6 @@ if [ "$notice" = 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-activate-vesta-license b/bin/v-activate-vesta-license index f6cc05e0..6d5c875e 100755 --- a/bin/v-activate-vesta-license +++ b/bin/v-activate-vesta-license @@ -62,6 +62,6 @@ if [ "$module" = 'SFTPJAIL' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-backup-host b/bin/v-add-backup-host index 5595c043..5dc489ea 100755 --- a/bin/v-add-backup-host +++ b/bin/v-add-backup-host @@ -94,7 +94,7 @@ EOF if [ "$type" != 'local' ];then check_args '4' "$#" "TYPE HOST USERNAME PASSWORD [PATH] [PORT]" - validate_format 'host' + is_format_valid 'host' is_password_valid if [ "$type" = 'sftp' ]; then which expect >/dev/null 2>&1 @@ -117,7 +117,7 @@ if [ "$type" = 'ftp' ]; then grep -i -e failed -e error -e "can't" -e "not conn" -e "incorrect") if [ ! -z "$ferror" ]; then echo "Error: can't login to ftp $user@$host" - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi @@ -129,7 +129,7 @@ if [ "$type" = 'ftp' ]; then echo "$ftp_result" rm -rf $tmpdir echo "Error: can't create $ftmpdir folder on the ftp" - log_event "$E_FTP" "$EVENT" + log_event "$E_FTP" "$ARGUMENTS" exit $E_FTP fi fi @@ -137,15 +137,17 @@ if [ "$type" = 'sftp' ]; then if [ -z $port ]; then port=22 fi - sftmpdir="$path/vst.bK76A9SUkt" - sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1 + if sftpc "mkdir $path" > /dev/null 2>&1 ; then + sftmpdir="$path/vst.bK76A9SUkt" + sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1 + fi rc=$? if [[ "$rc" != 0 ]]; then case $rc in $E_CONNECT) echo "Error: can't login to sftp $user@$host";; $E_FTP) echo "Error: can't create temp folder on the sftp host";; esac - log_event "$rc" "$EVENT" + log_event "$rc" "$ARGUMENTS" exit "$rc" fi fi @@ -153,13 +155,12 @@ fi # Adding backup host if [ $type != 'local' ]; then - echo "HOST='$host' - USERNAME='$user' - PASSWORD='$password' - BPATH='$path' - PORT='$port' - TIME='$TIME' - DATE='$DATE'" > $VESTA/conf/$type.backup.conf + time_n_date=$(date +'%T %F') + time=$(echo "$time_n_date" |cut -f 1 -d \ ) + date=$(echo "$time_n_date" |cut -f 2 -d \ ) + str="HOST='$host'\nUSERNAME='$user'\nPASSWORD='$password'" + str="$str\nBPATH='$path'\nPORT='$port'\nTIME='$time'\nDATE='$date'" + echo -e "$str" > $VESTA/conf/$type.backup.conf chmod 660 $VESTA/conf/$type.backup.conf fi @@ -181,6 +182,6 @@ else fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-cron-job b/bin/v-add-cron-job index b6c41480..6b67eab4 100755 --- a/bin/v-add-cron-job +++ b/bin/v-add-cron-job @@ -17,7 +17,7 @@ hour=$3 day=$4 month=$5 wday=$6 -command=$(echo $7 | sed "s/'/%quote%/g") +command=$(echo $7 |sed "s/'/%quote%/g") job=$8 restart=$9 @@ -25,8 +25,7 @@ restart=$9 source $VESTA/func/main.sh source $VESTA/conf/vesta.conf -# Assigning new value -A7="$command" +HIDE=7 #----------------------------------------------------------# @@ -34,13 +33,13 @@ A7="$command" #----------------------------------------------------------# check_args '7' "$#" 'USER MIN HOUR DAY MONTH WDAY COMMAND [JOB] [RESTART]' -validate_format 'user' 'min' 'hour' 'day' 'month' 'wday' 'command' +is_format_valid 'user' 'min' 'hour' 'day' 'month' 'wday' 'command' is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_package_full 'CRON_JOBS' get_next_cronjob -validate_format 'job' +is_format_valid 'job' is_object_new 'cron' 'JOB' "$job" @@ -48,9 +47,14 @@ is_object_new 'cron' 'JOB' "$job" # Action # #----------------------------------------------------------# +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Concatenating cron string str="JOB='$job' MIN='$min' HOUR='$hour' DAY='$day' MONTH='$month' WDAY='$wday'" -str="$str CMD='$command' SUSPENDED='no' TIME='$TIME' DATE='$DATE'" +str="$str CMD='$command' SUSPENDED='no' TIME='$time' DATE='$date'" # Adding to crontab echo "$str" >> $VESTA/data/users/$user/cron.conf @@ -78,6 +82,6 @@ check_result $? "Cron restart failed" >/dev/null # Logging log_history "added cron job $job" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-cron-reports b/bin/v-add-cron-reports index e0d6b21a..df785905 100755 --- a/bin/v-add-cron-reports +++ b/bin/v-add-cron-reports @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -50,6 +50,6 @@ check_result $? "Cron restart failed" >/dev/null # Logging log_history "enabled cron reporting" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-cron-restart-job b/bin/v-add-cron-restart-job index 474ef119..9b061265 100755 --- a/bin/v-add-cron-restart-job +++ b/bin/v-add-cron-restart-job @@ -38,6 +38,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-cron-vesta-autoupdate b/bin/v-add-cron-vesta-autoupdate index 2d026837..8b8d1367 100755 --- a/bin/v-add-cron-vesta-autoupdate +++ b/bin/v-add-cron-vesta-autoupdate @@ -34,9 +34,14 @@ fi # Action # #----------------------------------------------------------# +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Define time somewhere at night -min=$(gen_password '012345' '2') -hour=$(gen_password '1234567' '1') +min=$(generate_password '012345' '2') +hour=$(generate_password '1234567' '1') day='*' month='*' wday='*' @@ -44,7 +49,7 @@ command='sudo /usr/local/vesta/bin/v-update-sys-vesta-all' # Concatenating cron string str="JOB='$job' MIN='$min' HOUR='$hour' DAY='$day' MONTH='$month' WDAY='$wday'" -str="$str CMD='$command' SUSPENDED='no' TIME='$TIME' DATE='$DATE'" +str="$str CMD='$command' SUSPENDED='no' TIME='$time' DATE='$date'" # Adding to crontab echo "$str" >> $VESTA/data/users/$user/cron.conf @@ -72,6 +77,6 @@ check_result $? "Cron restart failed" >/dev/null # Logging log_history "added cron job $job" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-database b/bin/v-add-database index 68e67647..438b473e 100755 --- a/bin/v-add-database +++ b/bin/v-add-database @@ -36,14 +36,14 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DATABASE DBUSER DBPASS [TYPE] [HOST] [CHARSET]' -validate_format 'user' 'database' 'dbuser' 'charset' +is_format_valid 'user' 'database' 'dbuser' 'charset' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_type_valid "$DB_SYSTEM" "$type" is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_new 'db' 'DB' "$database" get_next_dbhost -is_object_valid "../../../conf/$type" 'DBHOST' "$host" +is_object_valid "../../../conf/$type" 'HOST' "$host" is_object_unsuspended "../../../conf/$type" 'DBHOST' "$host" #is_charset_valid is_package_full 'DATABASES' @@ -66,14 +66,15 @@ esac # Vesta # #----------------------------------------------------------# -# Update time and date -DATE=$(date +%F) -TIME=$(date +%T) +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) # Adding db to db conf str="DB='$database' DBUSER='$dbuser' MD5='$md5' HOST='$host' TYPE='$type'" -str="$str CHARSET='$charset' U_DISK='0' SUSPENDED='no' TIME='$TIME'" -str="$str DATE='$DATE'" +str="$str CHARSET='$charset' U_DISK='0' SUSPENDED='no' TIME='$time'" +str="$str DATE='$date'" echo "$str" >> $USER_DATA/db.conf chmod 660 $USER_DATA/db.conf @@ -83,6 +84,6 @@ increase_user_value "$user" '$U_DATABASES' # Logging log_history "added $type database $database" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-database-host b/bin/v-add-database-host index 550d0a70..c7b23ddf 100755 --- a/bin/v-add-database-host +++ b/bin/v-add-database-host @@ -38,7 +38,7 @@ is_mysql_host_alive() { rm $mycnf if [ '0' -ne "$?" ]; then echo "Error: MySQL connection to $host failed" - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi } @@ -48,7 +48,7 @@ is_pgsql_host_alive() { psql -h $host -U $dbuser -c "SELECT VERSION()" > /dev/null 2>&1 if [ '0' -ne "$?" ]; then echo "Error: PostgreSQL connection to $host failed" - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi } @@ -60,7 +60,7 @@ is_pgsql_host_alive() { args_usage='TYPE HOST DBUSER DBPASS [MAX_DB] [CHARSETS] [TPL]' check_args '4' "$#" "$args_usage" -validate_format 'host' 'dbuser' 'max_db' 'charsets' 'template' +is_format_valid 'host' 'dbuser' 'max_db' 'charsets' 'template' #is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' #is_type_valid "$DB_SYSTEM" "$type" is_dbhost_new @@ -76,19 +76,23 @@ esac # Action # #----------------------------------------------------------# +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Concatenating db host string case $type in mysql) str="HOST='$host' USER='$dbuser' PASSWORD='$dbpass'"; str="$str CHARSETS='$charsets' MAX_DB='$max_db' U_SYS_USERS=''"; - str="$str U_DB_BASES='0' SUSPENDED='no' TIME='$TIME' DATE='$DATE'";; + str="$str U_DB_BASES='0' SUSPENDED='no' TIME='$time' DATE='$date'";; pgsql) str="HOST='$host' USER='$dbuser' PASSWORD='$dbpass'"; str="$str CHARSETS='$charsets' TPL='$template' MAX_DB='$max_db'"; str="$str U_SYS_USERS='' U_DB_BASES='0' SUSPENDED='no'"; - str="$str TIME='$TIME' DATE='$DATE'";; + str="$str TIME='$time' DATE='$date'";; esac - #----------------------------------------------------------# # Vesta # #----------------------------------------------------------# @@ -110,6 +114,6 @@ else fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-dns-domain b/bin/v-add-dns-domain index 852050ce..09d5b571 100755 --- a/bin/v-add-dns-domain +++ b/bin/v-add-dns-domain @@ -17,8 +17,13 @@ user=$1 domain=$(idn -t --quiet -u "$2" ) domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g') -domain=$(echo $domain | tr '[:upper:]' '[:lower:]') -domain_idn=$(idn -t --quiet -a "$domain") +if [[ "$domain" =~ [[:upper:]] ]]; then + domain=$(echo "$domain" |tr '[:upper:]' '[:lower:]') +fi +domain_idn="$domain" +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +fi ip=$3 ns1=$4 ns2=$5 @@ -41,48 +46,48 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN IP [NS1] [NS2] [NS3] [..] [NS8] [RESTART]' -validate_format 'user' 'domain' 'ip' +is_format_valid 'user' 'domain' 'ip' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" -is_domain_new 'dns' +is_domain_new 'dns' "$domain" is_package_full 'DNS_DOMAINS' template=$(get_user_value '$DNS_TEMPLATE') -is_dns_template_valid +is_dns_template_valid $template if [ ! -z "$ns1" ]; then ns1=$(echo $4 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns1' + is_format_valid 'ns1' fi if [ ! -z "$ns2" ]; then ns2=$(echo $5 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns2' + is_format_valid 'ns2' fi if [ ! -z "$ns3" ]; then ns3=$(echo $6 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns3' + is_format_valid 'ns3' fi if [ ! -z "$ns4" ]; then ns4=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns4' + is_format_valid 'ns4' fi if [ ! -z "$ns5" ]; then ns5=$(echo $8 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns5' + is_format_valid 'ns5' fi if [ ! -z "$ns6" ]; then ns6=$(echo $9 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns6' + is_format_valid 'ns6' fi if [ ! -z "$ns7" ]; then ns7=$(echo ${10} | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns7' + is_format_valid 'ns7' fi if [ ! -z "$ns8" ]; then ns8=$(echo ${11} | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns8' + is_format_valid 'ns8' fi @@ -127,6 +132,11 @@ if [ -z "$ns8" ]; then template_data=$(echo "$template_data" |grep -v %ns8%) fi +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Adding dns zone to the user config echo "$template_data" |\ sed -e "s/%ip%/$ip/g" \ @@ -140,8 +150,8 @@ echo "$template_data" |\ -e "s/%ns6%/$ns6/g" \ -e "s/%ns7%/$ns7/g" \ -e "s/%ns8%/$ns8/g" \ - -e "s/%time%/$TIME/g" \ - -e "s/%date%/$DATE/g" > $USER_DATA/dns/$domain.conf + -e "s/%time%/$time/g" \ + -e "s/%date%/$date/g" > $USER_DATA/dns/$domain.conf chmod 660 $USER_DATA/dns/$domain.conf records="$(wc -l $USER_DATA/dns/$domain.conf |cut -f 1 -d ' ')" @@ -149,7 +159,7 @@ records="$(wc -l $USER_DATA/dns/$domain.conf |cut -f 1 -d ' ')" # Adding dns.conf record dns_rec="DOMAIN='$domain' IP='$ip' TPL='$template' TTL='$ttl' EXP='$exp'" dns_rec="$dns_rec SOA='$soa' SERIAL='$serial' SRC='' RECORDS='$records'" -dns_rec="$dns_rec SUSPENDED='no' TIME='$TIME' DATE='$DATE'" +dns_rec="$dns_rec SUSPENDED='no' TIME='$time' DATE='$date'" echo "$dns_rec" >> $USER_DATA/dns.conf chmod 660 $USER_DATA/dns.conf @@ -200,6 +210,6 @@ fi # Logging log_history "added dns domain $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-dns-on-web-alias b/bin/v-add-dns-on-web-alias index e0eded79..cc587483 100755 --- a/bin/v-add-dns-on-web-alias +++ b/bin/v-add-dns-on-web-alias @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER ALIAS IP [RESTART]' -validate_format 'user' 'alias' 'ip' +is_format_valid 'user' 'alias' 'ip' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -40,7 +40,7 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" # Define additional vars sub_domain=$(echo "$alias" |awk -F '.' '{print $1}') diff --git a/bin/v-add-dns-record b/bin/v-add-dns-record index 988c0fbe..113874d3 100755 --- a/bin/v-add-dns-record +++ b/bin/v-add-dns-record @@ -14,9 +14,7 @@ # Argument definition user=$1 -domain=$(idn -t --quiet -u "$2" ) -domain=$(echo $domain | tr '[:upper:]' '[:lower:]') -domain_idn=$(idn -t --quiet -a "$domain") +domain=$2 record=$(idn -t --quiet -u "$3" ) record=$(echo "$record" | tr '[:upper:]' '[:lower:]') rtype=$(echo "$4"| tr '[:lower:]' '[:upper:]') @@ -28,6 +26,11 @@ if [ -z "$priority" ]; then priority=10 fi +domain_idn="$domain" +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +fi + # Includes source $VESTA/func/main.sh source $VESTA/func/domain.sh @@ -52,7 +55,7 @@ fi #----------------------------------------------------------# check_args '5' "$#" 'USER DOMAIN RECORD TYPE VALUE [PRIORITY] [ID] [RESTART]' -validate_format 'user' 'domain' 'record' 'rtype' 'dvalue' +is_format_valid 'user' 'domain' 'record' 'rtype' 'dvalue' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -60,7 +63,7 @@ is_object_valid 'dns' 'DOMAIN' "$domain" is_object_unsuspended 'dns' 'DOMAIN' "$domain" is_package_full 'DNS_RECORDS' get_next_dnsrecord -validate_format 'id' +is_format_valid 'id' is_object_new "dns/$domain" 'ID' "$id" is_dns_fqnd "$rtype" "$dvalue" is_dns_nameserver_valid "$domain" "$rtype" "$dvalue" @@ -70,10 +73,15 @@ is_dns_nameserver_valid "$domain" "$rtype" "$dvalue" # Action # #----------------------------------------------------------# +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Adding record zone="$USER_DATA/dns/$domain.conf" dns_rec="ID='$id' RECORD='$record' TYPE='$rtype' PRIORITY='$priority'" -dns_rec="$dns_rec VALUE='$dvalue' SUSPENDED='no' TIME='$TIME' DATE='$DATE'" +dns_rec="$dns_rec VALUE='$dvalue' SUSPENDED='no' TIME='$time' DATE='$date'" echo "$dns_rec" >> $zone chmod 660 $zone @@ -114,6 +122,6 @@ fi # Logging log_history "added $rtype dns record $record for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-domain b/bin/v-add-domain index 0af33c0d..49b105be 100755 --- a/bin/v-add-domain +++ b/bin/v-add-domain @@ -25,9 +25,9 @@ source $VESTA/conf/vesta.conf # Verifications # #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [IP] [RESTART]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' if [ ! -z "$ip" ] ; then - validate_format 'ip' + is_format_valid 'ip' fi is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -39,11 +39,9 @@ is_object_unsuspended 'user' 'USER' "$user" # Get ip if it wasn't defined if [ -z "$ip" ]; then - ip=$(get_user_ip $user) + get_user_ip if [ -z "$ip" ]; then - echo "Error: no avaiable IP address" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + check_result $E_NOTEXIST "no avaiable IP address" fi fi @@ -55,7 +53,7 @@ fi # Working on DNS domain if [ ! -z "$DNS_SYSTEM" ]; then - $BIN/v-add-dns-domain $user $domain $ip "" "" "" "" "" 'no' + $BIN/v-add-dns-domain $user $domain $ip "" "" "" "" "" '' '' '' 'no' check_result $? "can't add dns domain" >/dev/null fi diff --git a/bin/v-add-firewall-ban b/bin/v-add-firewall-ban index 6fb61c8d..a1eed13e 100755 --- a/bin/v-add-firewall-ban +++ b/bin/v-add-firewall-ban @@ -29,7 +29,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'IP CHAIN' -validate_format 'ip' 'chain' +is_format_valid 'ip' 'chain' is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' @@ -59,8 +59,13 @@ fi # Adding chain $BIN/v-add-firewall-chain $chain +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Adding ip to banlist -echo "IP='$ip' CHAIN='$chain' TIME='$TIME' DATE='$DATE'" >> $conf +echo "IP='$ip' CHAIN='$chain' TIME='$time' DATE='$date'" >> $conf $iptables -I fail2ban-$chain 1 -s $ip \ -j REJECT --reject-with icmp-port-unreachable 2>/dev/null @@ -73,6 +78,6 @@ chmod 660 $conf #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-firewall-chain b/bin/v-add-firewall-chain index 735cd11d..f963dade 100755 --- a/bin/v-add-firewall-chain +++ b/bin/v-add-firewall-chain @@ -31,7 +31,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'CHAIN [PORT] [PROTOCOL]' -validate_format 'chain' +is_format_valid 'chain' is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' @@ -81,6 +81,6 @@ chmod 660 $chains #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-firewall-rule b/bin/v-add-firewall-rule index 37abe98b..6fb867d3 100755 --- a/bin/v-add-firewall-rule +++ b/bin/v-add-firewall-rule @@ -47,13 +47,13 @@ sort_fw_rules() { #----------------------------------------------------------# check_args '3' "$#" 'ACTION IP PORT [PROTOCOL] [COMMENT] [RULE]' -validate_format 'action' 'protocol' 'port_ext' 'ip' +is_format_valid 'action' 'protocol' 'port_ext' 'ip' is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' get_next_fw_rule -validate_format 'rule' +is_format_valid 'rule' is_object_new '../../data/firewall/rules' 'RULE' "$rule" if [ ! -z "$comment" ]; then - validate_format 'comment' + is_format_valid 'comment' fi @@ -61,10 +61,15 @@ fi # Action # #----------------------------------------------------------# +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Concatenating rule str="RULE='$rule' ACTION='$action' PROTOCOL='$protocol' PORT='$port_ext'" str="$str IP='$ip' COMMENT='$comment' SUSPENDED='no'" -str="$str TIME='$TIME' DATE='$DATE'" +str="$str TIME='$time' DATE='$date'" # Adding to config echo "$str" >> $VESTA/data/firewall/rules.conf @@ -84,6 +89,6 @@ $BIN/v-update-firewall #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-letsencrypt-domain b/bin/v-add-letsencrypt-domain new file mode 100755 index 00000000..f1186f46 --- /dev/null +++ b/bin/v-add-letsencrypt-domain @@ -0,0 +1,97 @@ +#!/bin/bash +# info: adding letsencrypt ssl cetificate for domain +# options: USER DOMAIN [ALIASES] [RESTART] +# +# The function turns on SSL support for a domain. Parameter ssl_dir is a path +# to directory where 2 or 3 ssl files can be found. Certificate file +# domain.tld.crt and its key domain.tld.key are mandatory. Certificate +# authority domain.tld.ca file is optional. If home directory parameter +# (ssl_home) is not set, https domain uses public_shtml as separate +# documentroot directory. + + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + +# Argument definition +user=$1 +domain=$2 +aliases=$3 +restart=$4 + +# Includes +source $VESTA/func/main.sh +source $VESTA/func/domain.sh +source $VESTA/conf/vesta.conf + + +#----------------------------------------------------------# +# Verifications # +#----------------------------------------------------------# + +check_args '2' "$#" 'USER DOMAIN [ALIASES] [RESTART]' +is_format_valid 'user' 'domain' +is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' +is_system_enabled "$WEB_SSL" 'SSL_SUPPORT' +is_object_valid 'user' 'USER' "$user" +is_object_unsuspended 'user' 'USER' "$user" +is_object_valid 'web' 'DOMAIN' "$domain" +is_object_unsuspended 'web' 'DOMAIN' "$domain" + + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +# Registering LetsEncrypt user account +$BIN/v-add-letsencrypt-user $user +check_result $? "LE account registration" >/dev/null +source $USER_DATA/ssl/le.conf +email=$EMAIL + +# Validating domain and aliases +i=1 +for alias in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do + $BIN/v-check-letsencrypt-domain $user $alias + check_result $? "LE domain validation" >/dev/null + if [ "$i" -gt 6 ]; then + check_result $E_LIMIT "LE can't sign more than 6 domains" + fi + i=$((i++)) +done + +# Generating CSR +ssl_dir=$($BIN/v-generate-ssl-cert "$domain" "$email" "US" "California" \ + "San Francisco" "Vesta" "IT" "$aliases" |tail -n1 |awk '{print $2}') + +# Signing CSR +crt=$($BIN/v-sign-letsencrypt-csr $user $domain $ssl_dir) +check_result $? "$crt" +echo "$crt" > $ssl_dir/$domain.crt + +# Dowloading CA certificate +le_certs='https://letsencrypt.org/certs' +x1='lets-encrypt-x1-cross-signed.pem.txt' +x3='lets-encrypt-x3-cross-signed.pem.txt' +issuer=$(openssl x509 -text -in $ssl_dir/$domain.crt |grep "Issuer:") +if [ -z "$(echo $issuer|grep X3)" ]; then + curl -s $le_certs/$x1 > $ssl_dir/$domain.ca +else + curl -s $le_certs/$x3 > $ssl_dir/$domain.ca +fi + +# Adding SSL +$BIN/v-delete-web-domain-ssl $user $domain >/dev/null 2>&1 +$BIN/v-add-web-domain-ssl $user $domain $ssl_dir +check_result $? "SSL install" >/dev/null + + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +# Logging +log_event "$OK" "$ARGUMENTS" + +exit diff --git a/bin/v-add-letsencrypt-user b/bin/v-add-letsencrypt-user new file mode 100755 index 00000000..431c2543 --- /dev/null +++ b/bin/v-add-letsencrypt-user @@ -0,0 +1,111 @@ +#!/bin/bash +# info: register letsencrypt user account +# options: USER [EMAIL] +# +# The function creates and register LetsEncript account key + + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + +# Argument definition +user=$1 +email=$2 +key_size=2048 + +# Includes +source $VESTA/func/main.sh +source $VESTA/conf/vesta.conf + +# encode base64 +encode_base64() { + cat |base64 |tr '+/' '-_' |tr -d '\r\n=' +} + + +#----------------------------------------------------------# +# Verifications # +#----------------------------------------------------------# + +check_args '1' "$#" 'USER [EMAIL]' +is_format_valid 'user' +is_object_valid 'user' 'USER' "$user" +if [ -e "$USER_DATA/ssl/le.conf" ]; then + exit +fi + + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +api='https://acme-v01.api.letsencrypt.org' +agreement='https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf' +if [ -z "$email" ]; then + email=$(get_user_value '$CONTACT') +fi + +# Generating key +key="$USER_DATA/ssl/user.key" +if [ ! -e "$key" ]; then + openssl genrsa -out $key $key_size >/dev/null 2>&1 + chmod 600 $key +fi + +# Defining key exponent +exponent=$(openssl pkey -inform perm -in "$key" -noout -text_pub |\ + grep Exponent: |cut -f 2 -d '(' |cut -f 1 -d ')' |sed -e 's/x//' |\ + xxd -r -p |encode_base64) + +# Defining key modulus +modulus=$(openssl rsa -in "$key" -modulus -noout |\ + sed -e 's/^Modulus=//' |xxd -r -p |encode_base64) + +# Defining key thumb +thumb='{"e":"'$exponent'","kty":"RSA","n":"'"$modulus"'"}' +thumb="$(echo -n "$thumb" |openssl dgst -sha256 -binary |encode_base64)" + +# Defining JWK header +header='{"e":"'$exponent'","kty":"RSA","n":"'"$modulus"'"}' +header='{"alg":"RS256","jwk":'"$header"'}' + +# Requesting nonce +nonce=$(curl -s -I "$api/directory" |grep Nonce |cut -f 2 -d \ |tr -d '\r\n') +protected=$(echo -n '{"nonce":"'"$nonce"'"}' |encode_base64) + +# Defining registration query +query='{"resource":"new-reg","contact":["mailto:'"$email"'"],' +query=$query'"agreement":"'$agreement'"}' +payload=$(echo -n "$query" |encode_base64) +signature=$(printf "%s" "$protected.$payload" |\ + openssl dgst -sha256 -binary -sign "$key" |encode_base64) +data='{"header":'"$header"',"protected":"'"$protected"'",' +data=$data'"payload":"'"$payload"'","signature":"'"$signature"'"}' + +# Sending request to LetsEncrypt API +answer=$(curl -s -i -d "$data" "$api/acme/new-reg") +status=$(echo "$answer" |grep HTTP/1.1 |tail -n1 |cut -f2 -d ' ') + +# Checking http answer status +if [[ "$status" -ne "201" ]] && [[ "$status" -ne "409" ]]; then + check_result $E_CONNECT "LetsEncrypt account registration $status" +fi + + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +# Adding le.conf +echo "EMAIL='$email'" > $USER_DATA/ssl/le.conf +echo "EXPONENT='$exponent'" >> $USER_DATA/ssl/le.conf +echo "MODULUS='$modulus'" >> $USER_DATA/ssl/le.conf +echo "THUMB='$thumb'" >> $USER_DATA/ssl/le.conf +chmod 660 $USER_DATA/ssl/le.conf + + +# Logging +log_event "$OK" "$ARGUMENTS" + +exit diff --git a/bin/v-add-mail-account b/bin/v-add-mail-account index 5bc5cf02..586871a4 100755 --- a/bin/v-add-mail-account +++ b/bin/v-add-mail-account @@ -29,9 +29,9 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN ACCOUNT PASSWORD [QUOTA]' -validate_format 'user' 'domain' 'account' +is_format_valid 'user' 'domain' 'account' if [ "$quota" != 'unlimited' ]; then - validate_format 'quota' + is_format_valid 'quota' fi is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -48,7 +48,7 @@ is_password_valid #----------------------------------------------------------# # Generating hashed password -salt=$(gen_password "$PW_MATRIX" "8") +salt=$(generate_password "$PW_MATRIX" "8") md5="{MD5}$($BIN/v-generate-password-hash md5 $salt <<<$password)" # Adding account info into password file @@ -65,13 +65,18 @@ fi # Vesta # #----------------------------------------------------------# +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + if [[ "$quota" -eq '0' ]]; then quota='unlimited' fi -str="ACCOUNT='$account' ALIAS='' QUOTA='$quota' AUTOREPLY='no' FWD=''" -str="$str FWD_ONLY='' MD5='$md5' U_DISK='0' SUSPENDED='no' TIME='$TIME'" -str="$str DATE='$DATE'" +str="ACCOUNT='$account' ALIAS='' AUTOREPLY='no' FWD='' FWD_ONLY=''" +str="$str MD5='$md5' QUOTA='$quota' U_DISK='0' SUSPENDED='no'" +str="$str TIME='$time' DATE='$date'" echo "$str" >> $USER_DATA/mail/$domain.conf chmod 660 $USER_DATA/mail/$domain.conf @@ -82,6 +87,6 @@ update_object_value 'mail' 'DOMAIN' "$domain" '$ACCOUNTS' "$accounts" # Logging log_history "added mail account $account@$domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-mail-account-alias b/bin/v-add-mail-account-alias index 9cd2b06b..004e6e4d 100755 --- a/bin/v-add-mail-account-alias +++ b/bin/v-add-mail-account-alias @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN ACCOUNT ALIAS' -validate_format 'user' 'domain' 'account' 'malias' +is_format_valid 'user' 'domain' 'account' 'malias' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -65,6 +65,6 @@ update_object_value "mail/$domain" 'ACCOUNT' "$account" '$ALIAS' "$aliases" # Logging log_history "added alias $malias to $account@$domain " -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-mail-account-autoreply b/bin/v-add-mail-account-autoreply index a1cd09f9..88070f7c 100755 --- a/bin/v-add-mail-account-autoreply +++ b/bin/v-add-mail-account-autoreply @@ -35,7 +35,7 @@ fi #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN ACCOUNT MESSAGE' -validate_format 'user' 'domain' 'account' 'autoreply' +is_format_valid 'user' 'domain' 'account' 'autoreply' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -70,6 +70,6 @@ update_object_value "mail/$domain" 'ACCOUNT' "$account" '$AUTOREPLY' 'yes' # Logging log_history "added autoreply message on $account@$domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-mail-account-forward b/bin/v-add-mail-account-forward index 5f4eaeed..1a990a31 100755 --- a/bin/v-add-mail-account-forward +++ b/bin/v-add-mail-account-forward @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN ACCOUNT FORWARD' -validate_format 'user' 'domain' 'account' 'forward' +is_format_valid 'user' 'domain' 'account' 'forward' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -39,7 +39,7 @@ is_object_unsuspended "mail/$domain" 'ACCOUNT' "$account" fwd=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$FWD') if [ ! -z "$(echo $fwd | grep -w $forward)" ]; then echo "Error: forward $forward exists" - log_event "$E_EXISTS $EVENT" + log_event "$E_EXISTS $ARGUMENTS" exit $E_EXISTS fi @@ -71,6 +71,6 @@ update_object_value "mail/$domain" 'ACCOUNT' "$account" '$FWD' "$fwd" # Logging log_history "added forwarding from $account@$domain to $forward" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-mail-account-fwd-only b/bin/v-add-mail-account-fwd-only index 72e7c8ec..277776ba 100755 --- a/bin/v-add-mail-account-fwd-only +++ b/bin/v-add-mail-account-fwd-only @@ -34,7 +34,7 @@ fi #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ACCOUNT' -validate_format 'user' 'domain' 'account' +is_format_valid 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -45,7 +45,7 @@ is_object_unsuspended "mail/$domain" 'ACCOUNT' "$account" fwd=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$FWD') if [ -z "$fwd" ]; then echo "Error: forward doesn't exist" - log_event "$E_NOTEXIST $EVENT" + log_event "$E_NOTEXIST $ARGUMENTS" exit $E_NOTEXIST fi @@ -71,6 +71,6 @@ update_object_value "mail/$domain" 'ACCOUNT' "$account" '$FWD_ONLY' "yes" # Logging log_history "added fwd_only flag for $account@$domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-mail-domain b/bin/v-add-mail-domain index 9fbd1852..eedc02d9 100755 --- a/bin/v-add-mail-domain +++ b/bin/v-add-mail-domain @@ -13,8 +13,13 @@ user=$1 domain=$(idn -t --quiet -u "$2" ) domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g') -domain=$(echo $domain | tr '[:upper:]' '[:lower:]') -domain_idn=$(idn -t --quiet -a "$domain") +if [[ "$domain" =~ [[:upper:]] ]]; then + domain=$(echo "$domain" |tr '[:upper:]' '[:lower:]') +fi +domain_idn="$domain" +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +fi antispam=${3-yes} antivirus=${4-yes} dkim=${5-yes} @@ -38,11 +43,11 @@ fi #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [ANTISPAM] [ANTIVIRUS] [DKIM] [DKIM_SIZE]' -validate_format 'user' 'domain' 'antispam' 'antivirus' 'dkim' 'dkim_size' +is_format_valid 'user' 'domain' 'antispam' 'antivirus' 'dkim' 'dkim_size' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" -is_domain_new 'mail' +is_domain_new 'mail' "$domain" is_package_full 'MAIL_DOMAINS' @@ -50,10 +55,15 @@ is_package_full 'MAIL_DOMAINS' # Action # #----------------------------------------------------------# +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Adding domain to mail.conf s="DOMAIN='$domain' ANTIVIRUS='$antivirus' ANTISPAM='$antispam' DKIM='$dkim'" -s="$s ACCOUNTS='0' U_DISK='0' CATCHALL='' SUSPENDED='no' TIME='$TIME'" -s="$s DATE='$DATE'" +s="$s CATCHALL='' ACCOUNTS='0' U_DISK='0' SUSPENDED='no' TIME='$time'" +s="$s DATE='$date'" echo $s >> $USER_DATA/mail.conf touch $USER_DATA/mail/$domain.conf @@ -134,6 +144,6 @@ fi # Logging log_history "added mail domain $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-mail-domain-antispam b/bin/v-add-mail-domain-antispam index 20e0c201..916f1540 100755 --- a/bin/v-add-mail-domain-antispam +++ b/bin/v-add-mail-domain-antispam @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -54,6 +54,6 @@ update_object_value 'mail' 'DOMAIN' "$domain" '$ANTISPAM' 'yes' # Logging log_history "enabled antispam on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-mail-domain-antivirus b/bin/v-add-mail-domain-antivirus index fe7151d2..d18857cb 100755 --- a/bin/v-add-mail-domain-antivirus +++ b/bin/v-add-mail-domain-antivirus @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -54,6 +54,6 @@ update_object_value 'mail' 'DOMAIN' "$domain" '$ANTIVIRUS' 'yes' # Logging log_history "enabled antivirus on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-mail-domain-catchall b/bin/v-add-mail-domain-catchall index 8ce5eddf..91dc0354 100755 --- a/bin/v-add-mail-domain-catchall +++ b/bin/v-add-mail-domain-catchall @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN EMAIL' -validate_format 'user' 'domain' 'email' +is_format_valid 'user' 'domain' 'email' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -56,6 +56,6 @@ update_object_value 'mail' 'DOMAIN' "$domain" '$CATCHALL' "$email" # Logging log_history "added $email as catchall email for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-mail-domain-dkim b/bin/v-add-mail-domain-dkim index f2accc03..fe709a59 100755 --- a/bin/v-add-mail-domain-dkim +++ b/bin/v-add-mail-domain-dkim @@ -34,7 +34,7 @@ fi #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [DKIM_SIZE]' -validate_format 'user' 'domain' 'dkim_size' +is_format_valid 'user' 'domain' 'dkim_size' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -83,6 +83,6 @@ increase_user_value "$user" '$U_MAIL_DKMI' # Logging log_history "enabled DKIM support for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-remote-dns-domain b/bin/v-add-remote-dns-domain index a2f5b34a..b82ea4fd 100755 --- a/bin/v-add-remote-dns-domain +++ b/bin/v-add-remote-dns-domain @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [FLUSH]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER' if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then check_result $E_NOTEXIST "dns-cluster.conf doesn't exist" diff --git a/bin/v-add-remote-dns-host b/bin/v-add-remote-dns-host index 32614ce0..0c52f79b 100755 --- a/bin/v-add-remote-dns-host +++ b/bin/v-add-remote-dns-host @@ -35,7 +35,7 @@ source $VESTA/conf/vesta.conf args_usage='HOST PORT USER PASSWORD [TYPE] [DNS_USER]' check_args '4' "$#" "$args_usage" -validate_format 'host' 'port' 'user' 'type' 'dns_user' +is_format_valid 'host' 'port' 'user' 'type' 'dns_user' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_password_valid is_dnshost_new @@ -46,10 +46,15 @@ is_dnshost_alive # Action # #----------------------------------------------------------# +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Concatentating dns host string str="HOST='$host' PORT='$port' USER='$user' PASSWORD='$password'" str="$str DNS_USER='$dns_user' TYPE='$type' SUSPENDED='no'" -str="$str TIME='$TIME' DATE='$DATE'" +str="$str TIME='$time' DATE='$date'" # Adding host to dns-cluster.conf echo "$str" >> $VESTA/conf/dns-cluster.conf @@ -83,6 +88,6 @@ if [ -z "$check_cron" ] && [ ! -z "$CRON_SYSTEM" ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-remote-dns-record b/bin/v-add-remote-dns-record index 9848ef23..000f2948 100755 --- a/bin/v-add-remote-dns-record +++ b/bin/v-add-remote-dns-record @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ID' -validate_format 'user' 'domain' 'id' +is_format_valid 'user' 'domain' 'id' is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" diff --git a/bin/v-add-sys-firewall b/bin/v-add-sys-firewall index ab40345b..b154c7f0 100755 --- a/bin/v-add-sys-firewall +++ b/bin/v-add-sys-firewall @@ -52,6 +52,6 @@ $BIN/v-update-firewall #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-sys-ip b/bin/v-add-sys-ip index 3b1a835e..307d6805 100755 --- a/bin/v-add-sys-ip +++ b/bin/v-add-sys-ip @@ -35,15 +35,15 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'IP NETMASK [INTERFACE] [USER] [STATUS] [NAME] [NATED_IP]' -validate_format 'ip' 'netmask' 'interface' 'user' 'ip_status' +is_format_valid 'ip' 'netmask' 'interface' 'user' 'ip_status' is_ip_free is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" if [ ! -z "$ip_name" ] ; then - validate_format 'ip_name' + is_format_valid 'ip_name' fi if [ ! -z "$nat_ip" ] ; then - validate_format 'nat_ip' + is_format_valid 'nat_ip' fi @@ -82,6 +82,11 @@ if [ -z "$sys_ip_check" ]; then fi fi +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Adding vesta ip echo "OWNER='$user' STATUS='$ip_status' @@ -91,8 +96,8 @@ U_WEB_DOMAINS='0' INTERFACE='$interface' NETMASK='$netmask' NAT='$nat_ip' -TIME='$TIME' -DATE='$DATE'" > $VESTA/data/ips/$ip +TIME='$time' +DATE='$date'" > $VESTA/data/ips/$ip chmod 660 $VESTA/data/ips/$ip # WEB support @@ -176,6 +181,6 @@ fi # Logging log_history "added system ip address $ip" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-sys-quota b/bin/v-add-sys-quota index f0acde21..51074f02 100755 --- a/bin/v-add-sys-quota +++ b/bin/v-add-sys-quota @@ -87,6 +87,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-sys-sftp-jail b/bin/v-add-sys-sftp-jail index c31fb439..7953f151 100755 --- a/bin/v-add-sys-sftp-jail +++ b/bin/v-add-sys-sftp-jail @@ -58,12 +58,11 @@ fi if [ "$restart" = 'yes' ]; then subj="OpenSSH restart failed" email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f 2 -d \') - send_mail="$VESTA/web/inc/mail-wrapper.php" /usr/sbin/sshd -t >/dev/null 2>&1 if [ "$?" -ne 0 ]; then mail_text="OpenSSH can not be restarted. Please check config: \n\n$(/usr/sbin/sshd -t)" - echo -e "$mail_text" | $send_mail -s "$subj" $email + echo -e "$mail_text" |$SENDMAIL -s "$subj" $email else service ssh restart >/dev/null 2>&1 service sshd restart >/dev/null 2>&1 @@ -101,6 +100,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-user b/bin/v-add-user index 35424381..630ae472 100755 --- a/bin/v-add-user +++ b/bin/v-add-user @@ -22,11 +22,9 @@ source $VESTA/func/main.sh source $VESTA/conf/vesta.conf is_user_free() { - check_sysuser=$(cut -f 1 -d : /etc/passwd | grep -w "$user" ) + check_sysuser=$(cut -f 1 -d : /etc/passwd | grep "^$user$" ) if [ ! -z "$check_sysuser" ] || [ -e "$USER_DATA" ]; then - echo "Error: user $user exists" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + check_result $E_EXISTS "user $user exists" fi } @@ -36,9 +34,9 @@ is_user_free() { #----------------------------------------------------------# check_args '3' "$#" 'USER PASSWORD EMAIL [PACKAGE] [FNAME] [LNAME]' -validate_format 'user' 'email' 'package' +is_format_valid 'user' 'email' 'package' if [ ! -z "$fname" ]; then - validate_format 'fname' 'lname' + is_format_valid 'fname' 'lname' fi is_user_free "$user" is_password_valid @@ -50,7 +48,7 @@ is_package_valid #----------------------------------------------------------# # Parsing package data -pkg_data=$(cat $VESTA/data/packages/$package.pkg |grep -v TIME |grep -v DATE) +pkg_data=$(cat $VESTA/data/packages/$package.pkg |egrep -v "TIME|DATE") # Checking shell shell_conf=$(echo "$pkg_data" | grep 'SHELL' | cut -f 2 -d \') @@ -134,6 +132,10 @@ if [ ! -z "$DB_SYSTEM" ]; then echo "$BIN/v-update-databases-disk $user" >> $VESTA/data/queue/disk.pipe fi +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) # Filling user config if [ "$user" != 'admin' ]; then @@ -151,7 +153,7 @@ $pkg_data CONTACT='$email' CRON_REPORTS='yes' MD5='$(awk -v user=$user -F : 'user == $1 {print $2}' /etc/shadow)' -RKEY='$(gen_password)' +RKEY='$(generate_password)' SUSPENDED='no' SUSPENDED_USERS='0' SUSPENDED_WEB='0' @@ -181,8 +183,8 @@ U_CRON_JOBS='0' U_BACKUPS='0' LANGUAGE='' NOTIFICATIONS='no' -TIME='$TIME' -DATE='$DATE'" > $USER_DATA/user.conf +TIME='$time' +DATE='$date'" > $USER_DATA/user.conf chmod 660 $USER_DATA/user.conf # Updating quota @@ -207,6 +209,6 @@ fi # Logging log_history "added system user $user" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-user-favourites b/bin/v-add-user-favourites index 84764e4a..18863829 100755 --- a/bin/v-add-user-favourites +++ b/bin/v-add-user-favourites @@ -26,12 +26,12 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER SYSTEM OBJECT' -validate_format 'user' 'system' +is_format_valid 'user' 'system' case $system in - MAIL_ACC) validate_format 'email' ;; - CRON) validate_format 'id' ;; - DNS_REC) validate_format 'id' ;; - *) validate_format 'object' + MAIL_ACC) is_format_valid 'email' ;; + CRON) is_format_valid 'id' ;; + DNS_REC) is_format_valid 'id' ;; + *) is_format_valid 'object' esac is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -120,6 +120,6 @@ chmod 640 $USER_DATA/favourites.conf # Logging log_history "added starred $object in $system listing" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-user-notification b/bin/v-add-user-notification index dcc61f8a..5945b192 100755 --- a/bin/v-add-user-notification +++ b/bin/v-add-user-notification @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER TOPIC NOTICE [TYPE]' -validate_format 'user' 'topic' 'notice' +is_format_valid 'user' 'topic' 'notice' is_object_valid 'user' 'USER' "$user" @@ -46,9 +46,14 @@ else nid=1 fi +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Concatenating string str="NID='$nid' TOPIC='$topic' NOTICE='$notice' TYPE='$type'" -str="$str ACK='no' TIME='$TIME' DATE='$DATE'" +str="$str ACK='no' TIME='$time' DATE='$date'" # Adding to config echo "$str" >> $USER_DATA/notifications.conf diff --git a/bin/v-add-user-package b/bin/v-add-user-package index 49332154..23f42725 100755 --- a/bin/v-add-user-package +++ b/bin/v-add-user-package @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf is_package_new() { if [ -e "$VESTA/data/packages/$package.pkg" ]; then echo "Error: package $package already exists." - log_event "$E_EXISTS" "$EVENT" + log_event "$E_EXISTS" "$ARGUMENTS" exit $E_EXISTS fi } @@ -30,39 +30,39 @@ is_package_new() { is_package_consistent() { source $pkg_dir/$package.pkg if [ "$WEB_DOMAINS" != 'unlimited' ]; then - validate_format_int $WEB_DOMAINS 'WEB_DOMAINS' + is_format_valid_int $WEB_DOMAINS 'WEB_DOMAINS' fi if [ "$WEB_ALIASES" != 'unlimited' ]; then - validate_format_int $WEB_ALIASES 'WEB_ALIASES' + is_format_valid_int $WEB_ALIASES 'WEB_ALIASES' fi if [ "$DNS_DOMAINS" != 'unlimited' ]; then - validate_format_int $DNS_DOMAINS 'DNS_DOMAINS' + is_format_valid_int $DNS_DOMAINS 'DNS_DOMAINS' fi if [ "$DNS_RECORDS" != 'unlimited' ]; then - validate_format_int $DNS_RECORDS 'DNS_RECORDS' + is_format_valid_int $DNS_RECORDS 'DNS_RECORDS' fi if [ "$MAIL_DOMAINS" != 'unlimited' ]; then - validate_format_int $MAIL_DOMAINS 'MAIL_DOMAINS' + is_format_valid_int $MAIL_DOMAINS 'MAIL_DOMAINS' fi if [ "$MAIL_ACCOUNTS" != 'unlimited' ]; then - validate_format_int $MAIL_ACCOUNTS 'MAIL_ACCOUNTS' + is_format_valid_int $MAIL_ACCOUNTS 'MAIL_ACCOUNTS' fi if [ "$DATABASES" != 'unlimited' ]; then - validate_format_int $DATABASES 'DATABASES' + is_format_valid_int $DATABASES 'DATABASES' fi if [ "$CRON_JOBS" != 'unlimited' ]; then - validate_format_int $CRON_JOBS 'CRON_JOBS' + is_format_valid_int $CRON_JOBS 'CRON_JOBS' fi if [ "$DISK_QUOTA" != 'unlimited' ]; then - validate_format_int $DISK_QUOTA 'DISK_QUOTA' + is_format_valid_int $DISK_QUOTA 'DISK_QUOTA' fi if [ "$BANDWIDTH" != 'unlimited' ]; then - validate_format_int $BANDWIDTH 'BANDWIDTH' + is_format_valid_int $BANDWIDTH 'BANDWIDTH' fi if [ "$BACKUPS" != 'unlimited' ]; then - validate_format_int $BACKUPS 'BACKUPS' + is_format_valid_int $BACKUPS 'BACKUPS' fi - validate_format_shell $SHELL + is_format_valid_shell $SHELL } @@ -71,7 +71,7 @@ is_package_consistent() { #----------------------------------------------------------# check_args '2' "$#" 'PKG_DIR PACKAGE' 'rewrite' -validate_format 'pkg_dir' 'package' +is_format_valid 'pkg_dir' 'package' if [ "$rewrite" != 'yes' ]; then is_package_new fi @@ -97,6 +97,6 @@ if [ "$rewrite" != 'yes' ]; then else log_history "updated user package $package" '' 'admin' fi -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-user-sftp-jail b/bin/v-add-user-sftp-jail index de299038..ed96509d 100755 --- a/bin/v-add-user-sftp-jail +++ b/bin/v-add-user-sftp-jail @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' if [ -z "$SFTPJAIL_KEY" ]; then exit fi @@ -51,7 +51,7 @@ fi usermod -a -G sftp-only $user # Mouting home directory -if [ -z "$(mount |grep $home)" ]; then +if [ -z "$(mount |grep /chroot/$user/$home)" ]; then mount -o bind $home /chroot/$user/$home/ fi @@ -61,6 +61,6 @@ fi #----------------------------------------------------------# # Logging -#log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-web-domain b/bin/v-add-web-domain index ebe5f0b5..04fa9afc 100755 --- a/bin/v-add-web-domain +++ b/bin/v-add-web-domain @@ -1,31 +1,47 @@ #!/bin/bash # info: add web domain -# options: USER DOMAIN IP [RESTART] [ALIASES] [PROXY_EXTENTIONS] +# options: USER DOMAIN [IP] [ALIASES] [PROXY_EXTENTIONS] [RESTART] # -# The function adds virtual host to a server. In cases when a template is -# undefined in the script, the template "default" will be used. The alias of -# www.domain.tld type will be automatically assigned to the domain. If ip have -# associated dns name, this domain will also get the alias domain-tpl.$ipname. -# An alias with the ip name is useful during the site testing while dns isn't -# moved to a server yet. +# The function adds virtual host to a server. In cases when ip is +# undefined in the script, "default" template will be used. The alias of +# www.domain.tld type will be automatically assigned to the domain unless +# "none" is transmited as argument. If ip have associated dns name, this +# domain will also get the alias domain-tpl.$ipname. An alias with the ip +# name is useful during the site testing while dns isn't moved to server yet. #----------------------------------------------------------# # Variable&Function # #----------------------------------------------------------# + # Argument definition user=$1 -domain=$(idn -t --quiet -u "$2" ) -domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g') -domain=$(echo $domain | tr '[:upper:]' '[:lower:]') -domain_idn=$(idn -t --quiet -a "$domain") -ip=$3; IP=$3 -restart=$4 +domain=$2 +ip=$3 +restart=$4 # will be moved to the end soon aliases=$5 -default_extentions="jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,\ -exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,html,htm" -extentions=${6-$default_extentions} +proxy_ext=$6 + +# Additional argument formatting +if [[ "$domain" =~ [[:upper:]] ]]; then + domain=$(echo "$domain" |tr '[:upper:]' '[:lower:]') +fi +if [[ "$domain" =~ ^www\..* ]]; then + domain=$(echo "$domain" |sed -e "s/^www.//") +fi +if [[ "$domain" =~ .*\.$ ]]; then + domain=$(echo "$domain" |sed -e "s/\.$//") +fi +domain_idn="$domain" +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +fi +if [ ! -z "$aliases" ] && [ "$aliases" != 'none' ]; then + aliases=$(echo $aliases |tr '[:upper:]' '[:lower:]' |tr ',' '\n') + aliases=$(echo "$aliases" |sed -e "s/\.$//" |sort -u |grep -v www.$domain) + aliases=$(echo "$aliases" |sed -e "/^$/d" |tr '\n' ',' |sed -e "s/,$//") +fi # Includes source $VESTA/func/main.sh @@ -38,26 +54,17 @@ source $VESTA/conf/vesta.conf # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'USER DOMAIN IP [RESTART] [ALIASES] [PROXY_EXTENTIONS]' -validate_format 'user' 'domain' 'ip' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' +check_args '2' "$#" 'USER DOMAIN [IP] [RESTART] [ALIASES] [PROXY_EXTENTIONS]' +is_format_valid 'user' 'domain' 'aliases' 'ip' 'proxy_ext' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" -is_domain_new 'web' -is_ip_valid -is_ip_avalable -is_package_full 'WEB_DOMAINS' -template=$(get_user_value '$WEB_TEMPLATE') -is_web_template_valid -if [ ! -z "$aliases" ]; then - for domain_alias in $(echo "${aliases//,/ }"); do - is_domain_new 'web' "$domain_alias" 'alias' - done -fi -if [ ! -z "$PROXY_SYSTEM" ]; then - validate_format 'extentions' - proxy=$(get_user_value '$PROXY_TEMPLATE') - is_proxy_template_valid $proxy +is_package_full 'WEB_DOMAINS' 'WEB_ALIASES' +is_domain_new 'web' "$domain,$aliases" +if [ ! -z "$ip" ]; then + is_ip_valid "$ip" "$user" +else + get_user_ip fi @@ -65,49 +72,10 @@ fi # Action # #----------------------------------------------------------# -# Checking domain backend in case PHP-FPM is configured -if [ ! -z "$WEB_BACKEND" ]; then - is_web_backend_pool_valid - $BIN/v-add-web-domain-backend $user $domain - rc=$? - if [ $rc -ne 0 ]; then - exit $rc - fi - get_domain_backend_values - backend=$(get_user_value '$BACKEND_TEMPLATE') - if [ -z "$backend" ]; then - backend='default' - fi -fi +# Reading user values +source $USER_DATA/user.conf -# Defining variables for add_config function -ip=$(get_real_ip $ip) -group="$user" -email="info@$domain" -docroot="$HOMEDIR/$user/web/$domain/public_html" -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.tpl" -conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" - -# Defining domain aliases -ip_name=$(get_ip_name) -if [ -z "$aliases" ]; then - if [ -z "$ip_name" ]; then - aliases="www.$domain" - else - aliases="www.$domain,${domain//./-}.$ip_name" - fi -else - if [ ! -z "$ip_name" ]; then - aliases="$aliases,${domain//./-}.$ip_name" - fi -fi -aliases_idn=$(idn -t --quiet -a $aliases) -alias_string="ServerAlias ${aliases_idn//,/ }" - -# Adding web config -add_web_config - -# Building directory tree +# Creating domain directories mkdir -p $HOMEDIR/$user/web/$domain \ $HOMEDIR/$user/web/$domain/public_html \ $HOMEDIR/$user/web/$domain/public_shtml \ @@ -117,83 +85,61 @@ mkdir -p $HOMEDIR/$user/web/$domain \ $HOMEDIR/$user/web/$domain/stats \ $HOMEDIR/$user/web/$domain/logs -# Adding domain logs +# Creating domain logs touch /var/log/$WEB_SYSTEM/domains/$domain.bytes \ /var/log/$WEB_SYSTEM/domains/$domain.log \ /var/log/$WEB_SYSTEM/domains/$domain.error.log - -# Adding symlink for logs ln -f -s /var/log/$WEB_SYSTEM/domains/$domain.*log \ $HOMEDIR/$user/web/$domain/logs/ # Adding domain skeleton -if [ -e "$WEBTPL/skel/public_html/" ]; then - cp -r $WEBTPL/skel/public_html/ $HOMEDIR/$user/web/$domain/ -fi -if [ -e "$WEBTPL/skel/public_shtml/" ]; then - cp -r $WEBTPL/skel/public_shtml/ $HOMEDIR/$user/web/$domain/ -fi -if [ -e "$WEBTPL/skel/document_errors/" ]; then - cp -r $WEBTPL/skel/document_errors/ $HOMEDIR/$user/web/$domain/ -fi -if [ -e "$WEBTPL/skel/cgi-bin/" ]; then - cp -r $WEBTPL/skel/cgi-bin/ $HOMEDIR/$user/web/$domain/ -fi - -# Changing tpl values +cp -r $WEBTPL/skel/* $HOMEDIR/$user/web/$domain/ >/dev/null 2>&1 for file in $(find "$HOMEDIR/$user/web/$domain/" -type f); do sed -i "s/%domain%/$domain/g" $file done -# Changing file owner +# Changing file owner & permission chown -R $user:$user $HOMEDIR/$user/web/$domain chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.* $conf +chmod 640 /var/log/$WEB_SYSTEM/domains/$domain.* +chmod 751 $HOMEDIR/$user/web/$domain $HOMEDIR/$user/web/$domain/* +chmod 551 $HOMEDIR/$user/web/$domain/stats $HOMEDIR/$user/web/$domain/logs -# Changing file permissions -chmod 640 $conf /var/log/$WEB_SYSTEM/domains/$domain.* -chmod 551 $HOMEDIR/$user/web/$domain -chmod 751 $HOMEDIR/$user/web/$domain/private \ - $HOMEDIR/$user/web/$domain/cgi-bin \ - $HOMEDIR/$user/web/$domain/public_html \ - $HOMEDIR/$user/web/$domain/public_shtml \ - $HOMEDIR/$user/web/$domain/document_errors -chmod -f -R 665 $HOMEDIR/$user/web/$domain/cgi-bin/* \ - $HOMEDIR/$user/web/$domain/public_html/* \ - $HOMEDIR/$user/web/$domain/document_errors/* \ -chmod 551 $HOMEDIR/$user/web/$domain/stats \ - $HOMEDIR/$user/web/$domain/logs - -# Running template trigger -if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh ]; then - $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh \ - $user $domain $ip $HOMEDIR $docroot +# Addding PHP-FPM backend +if [ ! -z "$WEB_BACKEND" ]; then + if [ -z "$BACKEND_TEMPLATE" ]; then + BACKEND_TEMPLATE='default' + if [ -z "$(grep BACKEND_TEMPLATE $USER_DATA/user.conf)" ]; then + sed -i "s/^DNS_TEMPL/BACKEND_TEMPLATE='default'\nDNS_TEMPL/g" \ + $USER_DATA/user.conf + else + update_user_value "$user" '$BACKEND_TEMPLATE' "default" + fi + fi + $BIN/v-add-web-domain-backend "$user" "$domain" $BACKEND_TEMPLATE + check_result $? "Backend error" >/dev/null fi -# Checking web config include -web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf" -web_include=$(grep "$conf" $web_conf ) -if [ -z "$web_include" ] && [ "$WEB_SYSTEM" != 'nginx' ]; then - echo "Include $conf" >> $web_conf -fi -if [ -z "$web_include" ] && [ "$WEB_SYSTEM" = 'nginx' ]; then - echo "include $conf;" >> $web_conf +# Preparing domain variables +if [ "$aliases" != 'none' ]; then + ALIAS="www.$domain,$aliases,$(get_ip_alias $domain)" +else + ALIAS='' fi +prepare_web_domain_values -# Checking proxy system +# Adding web server config +add_web_config "$WEB_SYSTEM" "$WEB_TEMPLATE.tpl" + +# Adding proxy config if [ ! -z "$PROXY_SYSTEM" ]; then - PROXY_EXT="$extentions" - tpl_file="$WEBTPL/$PROXY_SYSTEM/$proxy.tpl" - conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - add_web_config - chown root:$user $conf - chmod 640 $conf - proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf" - if [ -z "$(grep "$conf" $proxy_conf)" ]; then - echo "include $conf;" >> $proxy_conf - fi - if [ -x $WEBTPL/$PROXY_SYSTEM/$proxy.sh ]; then - $WEBTPL/$PROXY_SYSTEM/$proxy.sh $user $domain $ip $HOMEDIR $docroot + PROXY_EXT="$proxy_ext" + if [ -z "$proxy_ext" ]; then + PROXY_EXT="jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls" + PROXY_EXT="$PROXY_EXT,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp" + PROXY_EXT="$PROXY_EXT,rtf,js,mp3,avi,mpeg,flv,html,htm" fi + add_web_config "$PROXY_SYSTEM" "$PROXY_TEMPLATE.tpl" fi @@ -202,25 +148,28 @@ fi #----------------------------------------------------------# # Increasing counters -increase_ip_value "$ip" +increase_ip_value "$local_ip" increase_user_value "$user" '$U_WEB_DOMAINS' -increase_user_value "$user" '$U_WEB_ALIASES' +increase_user_value "$user" '$U_WEB_ALIASES' "$alias_number" -# Defining domain variables -str="DOMAIN='$domain' IP='$IP' IP6='' ALIAS='$aliases' TPL='$template'" -str="$str SSL='no' SSL_HOME='same' FTP_USER='' FTP_MD5='' BACKEND='$backend'" -str="$str PROXY='$proxy' PROXY_EXT='$extentions' STATS='' STATS_USER=''" -str="$str STATS_CRYPT='' U_DISK='0' U_BANDWIDTH='0' SUSPENDED='no'" -str="$str TIME='$TIME' DATE='$DATE'" +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) -# Registering domain -echo "$str" >> $USER_DATA/web.conf +# Adding domain in web.conf +echo "DOMAIN='$domain' IP='$ip' IP6='' ALIAS='$ALIAS' TPL='$WEB_TEMPLATE' \ +SSL='no' SSL_HOME='same' FTP_USER='' FTP_MD5='' BACKEND='$BACKEND_TEMPLATE' \ +PROXY='$PROXY_TEMPLATE' PROXY_EXT='$PROXY_EXT' STATS='' STATS_USER='' \ +STATS_CRYPT='' U_DISK='0' U_BANDWIDTH='0' SUSPENDED='no' \ +TIME='$time' DATE='$date'" >> $USER_DATA/web.conf # Restarting web server if [ "$restart" != 'no' ]; then $BIN/v-restart-web check_result $? "Web restart failed" >/dev/null + # Restarting proxy server if [ ! -z "$PROXY_SYSTEM" ]; then $BIN/v-restart-proxy check_result $? "Proxy restart failed" >/dev/null @@ -229,6 +178,6 @@ fi # Logging log_history "added web domain $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-web-domain-alias b/bin/v-add-web-domain-alias index 5e1a5e78..59e077ca 100755 --- a/bin/v-add-web-domain-alias +++ b/bin/v-add-web-domain-alias @@ -1,6 +1,6 @@ #!/bin/bash # info: add web domain alias -# options: USER DOMAIN ALIAS [RESTART] +# options: USER DOMAIN ALIASES [RESTART] # # The call is intended for adding aliases to a domain (it is also called # "domain parking"). The function supports wildcards *.domain.tpl. @@ -32,14 +32,14 @@ source $VESTA/conf/vesta.conf # Verifications # #----------------------------------------------------------# -check_args '3' "$#" 'USER DOMAIN DOM_ALIAS [RESTART]' -validate_format 'user' 'domain' 'dom_alias' +check_args '3' "$#" 'USER DOMAIN ALIASES [RESTART]' +is_format_valid 'user' 'domain' 'dom_alias' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" is_object_unsuspended 'web' 'DOMAIN' "$domain" -is_domain_new 'web' "$dom_alias" 'alias' +is_domain_new 'web' "$dom_alias" is_package_full 'WEB_ALIASES' @@ -49,43 +49,31 @@ is_package_full 'WEB_ALIASES' # Parsing domain values get_domain_values 'web' -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" -conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" -ip=$(get_real_ip $IP) -# Parsing domain aliases +# Preparing domain values for the template substitution +local_ip=$(get_real_ip $IP) if [ -z "$ALIAS" ]; then ALIAS="$dom_alias" else ALIAS="$ALIAS,$dom_alias" fi +prepare_web_domain_values -# Preparing domain values for the template substitution -upd_web_domain_values - -# Recreating vhost -del_web_config -add_web_config - +# Rebuilding vhost +del_web_config "$WEB_SYSTEM" "$TPL.tpl" +add_web_config "$WEB_SYSTEM" "$TPL.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - del_web_config - add_web_config + del_web_config "$WEB_SYSTEM" "$TPL.stpl" + add_web_config "$WEB_SYSTEM" "$TPL.stpl" fi -# Checking proxy +# Rebuilding proxy configuration if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" - conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - del_web_config - add_web_config - + del_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - del_web_config - add_web_config + del_web_config "$PROXY_SYSTEM" "$PROXY.stpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi fi @@ -96,8 +84,6 @@ fi # Adding new alias update_object_value 'web' 'DOMAIN' "$domain" '$ALIAS' "$ALIAS" - -# Update counters increase_user_value "$user" '$U_WEB_ALIASES' # Restarting web server @@ -112,6 +98,6 @@ if [ "$restart" != 'no' ]; then fi log_history "added $dom_alias as alias for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-web-domain-backend b/bin/v-add-web-domain-backend index cc595ce5..301b10d6 100755 --- a/bin/v-add-web-domain-backend +++ b/bin/v-add-web-domain-backend @@ -2,7 +2,7 @@ # info: add web domain backend # options: USER DOMAIN [TEMPLATE] [RESTART] # -# The call is used for adding web backend configuration for user +# The call is used for adding web backend configuration. #----------------------------------------------------------# @@ -12,8 +12,8 @@ # Argument definition user=$1 domain=$2 -domain_idn=$(idn -t --quiet -a "$domain") template=${3-default} +restart=$4 # Includes source $VESTA/func/main.sh @@ -26,21 +26,24 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [TEMPLATE] [RESTART]' -validate_format 'user' 'domain' -is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_system_enabled "$WEB_BACKEND" 'WEB_BACKEND' +is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" -is_web_backend_template_valid $template -is_web_backend_pool_valid -if [ -e "$pool/$backend.conf" ]; then - exit -fi +is_backend_template_valid "$template" #----------------------------------------------------------# # Action # #----------------------------------------------------------# +# Defining pool directory +prepare_web_backend + +# Checking backend configuration +if [ -e "$pool/$backend_type.conf" ]; then + exit +fi + # Allocating backend port backend_port=9000 ports=$(grep -v '^;' $pool/* 2>/dev/null |grep listen |grep -o :[0-9].*) @@ -56,8 +59,7 @@ cat $WEBTPL/$WEB_BACKEND/$template.tpl |\ sed -e "s|%backend_port%|$backend_port|" \ -e "s|%user%|$user|"\ -e "s|%domain%|$domain|"\ - -e "s|%domain_idn%|$domain_idn|"\ - -e "s|%backend%|$backend|g" > $pool/$backend.conf + -e "s|%backend%|$backend_type|g" > $pool/$backend_type.conf #----------------------------------------------------------# @@ -72,6 +74,6 @@ fi # Logging log_history "added $WEB_BACKEND backend configuration for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-web-domain-ftp b/bin/v-add-web-domain-ftp index 6a55155c..8d888093 100755 --- a/bin/v-add-web-domain-ftp +++ b/bin/v-add-web-domain-ftp @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN FTP_USER FTP_PASSWORD [FTP_PATH]' -validate_format 'user' 'domain' 'ftp_user' +is_format_valid 'user' 'domain' 'ftp_user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -37,7 +37,7 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain" check_ftp_user=$(grep "^$ftp_user:" /etc/passwd) if [ ! -z "$check_ftp_user" ] && [ "$FTP_USER" != "$ftp_user" ]; then echo "Error: ftp user $ftp_user already exists" - log_event "$E_EXISTS" "$EVENT" + log_event "$E_EXISTS" "$ARGUMENTS" exit $E_EXISTS fi is_password_valid @@ -68,7 +68,7 @@ else ftp_path_a=$(readlink -f "$HOMEDIR/$user/web/$domain/$ftp_path") if [ -z "$(echo $ftp_path_a |grep $HOMEDIR/$user/web/$domain)" ]; then echo "Error: absolute path $ftp_path_a is invalid" - log_event "$E_INVALID" "$EVENT" + log_event "$E_INVALID" "$ARGUMENTS" exit $E_INVALID fi # Creating ftp user home directory @@ -120,6 +120,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$FTP_PATH' "$ftp_path" # Logging log_history "added ftp account ${1}_${3}@$domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-web-domain-httpauth b/bin/v-add-web-domain-httpauth index 5f27399a..42dd269e 100755 --- a/bin/v-add-web-domain-httpauth +++ b/bin/v-add-web-domain-httpauth @@ -32,7 +32,7 @@ docroot="$HOMEDIR/$user/web/$domain/public_html" #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN AUTH_USER AUTH_PASSWORD [RESTART]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -42,7 +42,7 @@ is_password_valid get_domain_values 'web' if [ ! -z "$(echo "$AUTH_USER" |tr : '\n' |grep ^$auth_user$)" ]; then echo "Error: auth user $auth_user already exists" - log_event "$E_EXISTS" "$EVENT" + log_event "$E_EXISTS" "$ARGUMENTS" exit $E_EXISTS fi @@ -100,6 +100,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$AUTH_HASH' "$auth_hash" # Logging log_history "added http auth user $httpauth_user on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-web-domain-proxy b/bin/v-add-web-domain-proxy index 476f0cd4..37326352 100755 --- a/bin/v-add-web-domain-proxy +++ b/bin/v-add-web-domain-proxy @@ -32,7 +32,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [TEMPLATE] [EXTENTIONS] [RESTART]' -validate_format 'user' 'domain' 'extentions' +is_format_valid 'user' 'domain' 'extentions' is_system_enabled "$PROXY_SYSTEM" 'PROXY_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -51,44 +51,15 @@ is_proxy_template_valid $template # Defining domain parameters get_domain_values 'web' -PROXY="$template" -PROXY_EXT="$extentions" -tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" -conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" -ip=$(get_real_ip $IP) +local_ip=$(get_real_ip $IP) # Preparing domain values for the template substitution -upd_web_domain_values -add_web_config +PROXY_EXT="$extentions" +add_web_config "$PROXY_SYSTEM" "$template.tpl" -# Set permission and ownership -chown root:$user $conf -chmod 640 $conf - -# Checking proxy config -proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf" -if [ -z "$(grep "$conf" $proxy_conf)" ]; then - echo "include $conf;" >> $proxy_conf -fi - -# Checking ssl +# Adding proxy for ssl if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - add_web_config - - chown root:$user $conf - chmod 640 $conf - - proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf" - if [ -z "$(grep "$conf" $proxy_conf)" ]; then - echo "include $conf;" >> $proxy_conf - fi -fi - -# Running template trigger -if [ -x $WEBTPL/$PROXY_SYSTEM/$template.sh ]; then - $WEBTPL/$PROXY_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $docroot + add_web_config "$PROXY_SYSTEM" "$template.stpl" fi @@ -97,7 +68,7 @@ fi #----------------------------------------------------------# # Update config -update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' "$PROXY" +update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' "$template" update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions" # Restarting web server @@ -107,6 +78,6 @@ if [ "$restart" != 'no' ]; then fi log_history "enabled proxy support for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-web-domain-ssl b/bin/v-add-web-domain-ssl index 72767e77..fa8de5c6 100755 --- a/bin/v-add-web-domain-ssl +++ b/bin/v-add-web-domain-ssl @@ -34,7 +34,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN SSL_DIR [SSL_HOME] [RESTART]' -validate_format 'user' 'domain' 'ssl_dir' +is_format_valid 'user' 'domain' 'ssl_dir' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_system_enabled "$WEB_SSL" 'SSL_SUPPORT' is_object_valid 'user' 'USER' "$user" @@ -60,22 +60,6 @@ if [ -e "$ssl_dir/$domain.ca" ]; then fi chmod 660 $USER_DATA/ssl/$domain.* -# Parsing domain values -get_domain_values 'web' -conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" -SSL_HOME="$ssl_home" -ip=$(get_real_ip $IP) - -# Preparing domain values for the template substitution -upd_web_domain_values - -# Adding domain to the web config -add_web_config - -chown root:$user $conf -chmod 640 $conf - # Adding certificate to user dir cp -f $USER_DATA/ssl/$domain.crt $HOMEDIR/$user/conf/web/ssl.$domain.crt cp -f $USER_DATA/ssl/$domain.key $HOMEDIR/$user/conf/web/ssl.$domain.key @@ -84,32 +68,20 @@ if [ -e "$USER_DATA/ssl/$domain.ca" ]; then cp -f $USER_DATA/ssl/$domain.ca $HOMEDIR/$user/conf/web/ssl.$domain.ca fi -# Running template trigger -if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh ]; then - $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh \ - $user $domain $ip $HOMEDIR $sdocroot -fi +# Parsing domain values +get_domain_values 'web' +local_ip=$(get_real_ip $IP) -# Checking web config -web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf" -if [ -z "$(grep "$conf" $web_conf)" ]; then - echo "Include $conf" >> $web_conf -fi +# Preparing domain values for the template substitution +SSL_HOME="$ssl_home" +prepare_web_domain_values -# Checking proxy +# Adding domain to the web config +add_web_config "$WEB_SYSTEM" "$TPL.stpl" + +# Checking proxy config if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - add_web_config - - chown root:$user $conf - chmod 640 $conf - - # Checking proxy config - proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf" - if [ -z "$(grep "$conf" $proxy_conf )" ]; then - echo "include $conf;" >> $proxy_conf - fi + add_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi @@ -137,6 +109,6 @@ fi # Logging log_history "enabled ssl support for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-add-web-domain-stats b/bin/v-add-web-domain-stats index 929e27d0..deec1646 100755 --- a/bin/v-add-web-domain-stats +++ b/bin/v-add-web-domain-stats @@ -30,7 +30,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN TYPE' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_type_valid "$STATS_SYSTEM" "$type" is_object_valid 'user' 'USER' "$user" "$user" @@ -47,10 +47,8 @@ is_object_value_empty 'web' 'DOMAIN' "$domain" '$STATS' # Parse aliases get_domain_values 'web' -# Preparing domain values for the template substitution -upd_web_domain_values - # Adding statistic config +prepare_web_domain_values cat $WEBTPL/$type/$type.tpl |\ sed -e "s|%ip%|$ip|g" \ -e "s|%web_port%|$WEB_PORT|g" \ @@ -90,7 +88,7 @@ update_object_value 'web' 'DOMAIN' "$domain" '$STATS' "$type" # Logging log_history "enabled web log analyzer for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" # Build stats exec $BIN/v-update-web-domain-stat $user $domain diff --git a/bin/v-add-web-domain-stats-user b/bin/v-add-web-domain-stats-user index 007c013d..ab23f209 100755 --- a/bin/v-add-web-domain-stats-user +++ b/bin/v-add-web-domain-stats-user @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN STATS_USER STATS_PASS' -validate_format 'user' 'domain' 'stats_user' +is_format_valid 'user' 'domain' 'stats_user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -63,6 +63,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$STATS_CRYPT' "$stats_crypt" # Logging log_history "added password protection for web stats on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-backup-user b/bin/v-backup-user index 0a335da4..68682e42 100755 --- a/bin/v-backup-user +++ b/bin/v-backup-user @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [NOTIFY]' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$BACKUP_SYSTEM" 'BACKUP_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -41,7 +41,7 @@ is_backup_enabled # Set backup directory if undefined if [ -z "$BACKUP" ]; then - BACKUP=/home/backup + BACKUP=/backup fi mkdir -p $BACKUP @@ -49,28 +49,20 @@ mkdir -p $BACKUP start_time=$(date '+%s') # Set notification email and subject -if [ "$notify" != 'no' ]; then - subj="$user → backup failed" - email=$(get_user_value '$CONTACT') -else - subj="$user → backup failed" - email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f 2 -d \') -fi +subj="$user → backup failed" +email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f 2 -d \') -# Check load average +# Checking load average la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.') i=0 while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do - echo "$(date "+%F %T") LoadAverage $la is above threshold. Sleeping..." - sleep 120 - if [ "$i" -ge "5" ]; then - mail_top=$(top -b| head -n 30) - mail_text="LoadAverage $i is above threshold\n\n$mail_top\n" - echo -e "$mail_text" |$send_mail -s "$subj" $email - echo "Error: LA is too high" + echo -e "$(date "+%F %T") Load Average $la" + sleep 60 + if [ "$i" -ge "15" ]; then + la_error="LoadAverage $la is above threshold" + echo "$la_error" |$SENDMAIL -s "$subj" $email $notify sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_LA" "$EVENT" - exit $E_LA + check_result $E_LA "$la_error" fi la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.') (( ++i)) @@ -79,48 +71,40 @@ done # Creating temporary directory tmpdir=$(mktemp -p $BACKUP -d) if [ "$?" -ne 0 ]; then - echo "Can't create tmp dir $tmpdir" |$send_mail -s "$subj" $email - echo "Error: can't create tmp dir" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + echo "Can't create tmp dir $tmpdir" |$SENDMAIL -s "$subj" $email $notify + check_result $E_NOTEXIST "can't create tmp dir" fi # Backup sys configs -echo -e "-- SYSTEM --" -msg="-- SYSTEM --" +echo "-- SYSTEM --" |tee $BACKUP/$user.log mkdir $tmpdir/vesta -echo -e "$(date "+%F %T") $user.conf" -msg="$msg\n$(date "+%F %T") $user.conf" +echo -e "$(date "+%F %T") $user.conf" |tee -a $BACKUP/$user.log cp -r $USER_DATA/user.conf $tmpdir/vesta/ +cp -r $USER_DATA/ssl $tmpdir/vesta/ if [ -e "$USER_DATA/stats.log" ]; then - echo -e "$(date "+%F %T") stats.log" - msg="$msg\n$(date "+%F %T") stats.log" + echo -e "$(date "+%F %T") stats.log" |tee -a $BACKUP/$user.log cp -r $USER_DATA/stats.log $tmpdir/vesta/ fi if [ -e "$USER_DATA/history.log" ]; then - echo -e "$(date "+%F %T") history.log" - msg="$msg\n$(date "+%F %T") history.log" + echo -e "$(date "+%F %T") history.log" |tee -a $BACKUP/$user.log cp -r $USER_DATA/history.log $tmpdir/vesta/ fi if [ -e "$USER_DATA/backup-excludes.conf" ]; then - echo -e "$(date "+%F %T") backup-excludes.conf" - msg="$msg\n$(date "+%F %T") backup-excludes.conf" + echo -e "$(date "+%F %T") backup-excludes.conf" |tee -a $BACKUP/$user.log cp -r $USER_DATA/backup-excludes.conf $tmpdir/vesta/ fi # Backup PAM mkdir $tmpdir/pam -echo -e "$(date "+%F %T") pam" -msg="$msg\n$(date "+%F %T") pam" +echo -e "$(date "+%F %T") pam" |tee -a $BACKUP/$user.log grep "^$user:" /etc/passwd > $tmpdir/pam/passwd grep "^$user:" /etc/shadow > $tmpdir/pam/shadow grep "^$user:" /etc/group > $tmpdir/pam/group echo -msg="$msg\n" # Parsing excludes if [ -e "$USER_DATA/backup-excludes.conf" ]; then @@ -129,8 +113,7 @@ fi # WEB domains if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then - echo "-- WEB --" - msg="$msg\n-- WEB --" + echo -e "\n-- WEB --" |tee -a $BACKUP/$user.log mkdir $tmpdir/web/ # Parsing domain exclusions @@ -140,8 +123,7 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then if [ -z "$exclusion" ]; then web_list="$web_list $domain" else - echo "$(date "+%F %T") excluding $domain" - msg="$msg\n$(date "+%F %T") excluding $domain" + echo "$(date "+%F %T") excluding $domain"|tee -a $BACKUP/$user.log fi done web_list=$(echo "$web_list" |sed -e "s/ */\ /g" -e "s/^ //") @@ -150,8 +132,7 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then for domain in $web_list; do ((i ++)) - echo -e "$(date "+%F %T") $domain" - msg="$msg\n$(date "+%F %T") $domain" + echo -e "$(date "+%F %T") $domain" |tee -a $BACKUP/$user.log mkdir -p $tmpdir/web/$domain/conf mkdir -p $tmpdir/web/$domain/vesta @@ -167,30 +148,30 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then # Backup vhost config tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" - get_web_config_brds + get_web_config_lines $tpl_file $conf sed -n "$top_line,$bottom_line p" $conf > conf/$WEB_SYSTEM.conf # Backup ssl vhost if [ "$SSL" = 'yes' ]; then tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - get_web_config_brds + get_web_config_lines $tpl_file $conf sed -n "$top_line,$bottom_line p" $conf > conf/s$WEB_SYSTEM.conf fi # Backup proxy config - if [ ! -z "$PROXY" ]; then + if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - get_web_config_brds + get_web_config_lines $tpl_file $conf sed -n "$top_line,$bottom_line p" $conf > conf/$PROXY_SYSTEM.conf fi # Backup ssl proxy config - if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ] ; then + if [ ! -z "$PROXY_SYSTEM" ] && [ "$SSL" = 'yes' ]; then tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - get_web_config_brds + get_web_config_lines $tpl_file $conf sed -n "$top_line,$bottom_line p" $conf > conf/s$PROXY_SYSTEM.conf fi @@ -222,7 +203,7 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then # Backup files cd $HOMEDIR/$user/web/$domain - tar -cpf $tmpdir/web/$domain/domain_data.tar * ${fargs[@]} + tar -cpf $tmpdir/web/$domain/domain_data.tar * ${fargs[@]} # Compress archive gzip -$BACKUP_GZIP $tmpdir/web/$domain/domain_data.tar @@ -230,20 +211,15 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then # Print total if [ "$i" -eq 1 ]; then - echo -e "$(date "+%F %T") *** $i domain ***" - msg="$msg\n$(date "+%F %T") *** $i domain ***" + echo -e "$(date "+%F %T") *** $i domain ***" |tee -a $BACKUP/$user.log else - echo -e "$(date "+%F %T") *** $i domains ***" - msg="$msg\n$(date "+%F %T") *** $i domains ***" + echo -e "$(date "+%F %T") *** $i domains ***"|tee -a $BACKUP/$user.log fi - echo - msg="$msg\n" fi # DNS domains if [ ! -z "$DNS_SYSTEM" ] && [ "$DNS" != '*' ]; then - echo "-- DNS --" - msg="$msg\n-- DNS --" + echo -e "\n-- DNS --" |tee -a $BACKUP/$user.log mkdir $tmpdir/dns/ # Parsing domain exclusions @@ -261,8 +237,7 @@ if [ ! -z "$DNS_SYSTEM" ] && [ "$DNS" != '*' ]; then i=0 for domain in $dns_list; do ((i ++)) - echo -e "$(date "+%F %T") $domain" - msg="$msg\n$(date "+%F %T") $domain" + echo -e "$(date "+%F %T") $domain" |tee -a $BACKUP/$user.log # Building directory tree mkdir -p $tmpdir/dns/$domain/conf @@ -282,20 +257,15 @@ if [ ! -z "$DNS_SYSTEM" ] && [ "$DNS" != '*' ]; then # Print total if [ "$i" -eq 1 ]; then - echo -e "$(date "+%F %T") *** $i domain ***" - msg="$msg\n$(date "+%F %T") *** $i domain ***" + echo -e "$(date "+%F %T") *** $i domain ***" |tee -a $BACKUP/$user.log else - echo -e "$(date "+%F %T") *** $i domains ***" - msg="$msg\n$(date "+%F %T") *** $i domains ***" + echo -e "$(date "+%F %T") *** $i domains ***"|tee -a $BACKUP/$user.log fi - echo - msg="$msg\n" fi # Mail domains if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then - echo "-- MAIL --" - msg="$msg\n-- MAIL --" + echo -e "\n-- MAIL --" |tee -a $BACKUP/$user.log mkdir $tmpdir/mail/ # Parsing domain exclusions @@ -305,8 +275,7 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then if [ -z "$check_exl" ]; then mail_list="$mail_list $domain" else - echo "$(date "+%F %T") excluding $domain" - msg="$msg\n$(date "+%F %T") excluding $domain" + echo "$(date "+%F %T") excluding $domain"|tee -a $BACKUP/$user.log fi done mail_list=$(echo "$mail_list" |sed -e "s/ */\ /g" -e "s/^ //") @@ -314,8 +283,7 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then i=0 for domain in $mail_list; do ((i ++)) - echo -e "$(date "+%F %T") $domain" - msg="$msg\n$(date "+%F %T") $domain" + echo -e "$(date "+%F %T") $domain" |tee -a $BACKUP/$user.log mkdir -p $tmpdir/mail/$domain/conf mkdir -p $tmpdir/mail/$domain/vesta domain_idn=$(idn -t --quiet -a "$domain") @@ -342,13 +310,13 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then # Checking exlusions if [ -z "$exclusion" ] && [[ "$MAIL_SYSTEM" =~ exim ]]; then - echo "$(date "+%F %T") + $account@$domain" - msg="$msg\n$(date "+%F %T") + $account@$domain" + echo "$(date "+%F %T") + $account@$domain" |\ + tee -a $BACKUP/$user.log touch $tmpdir/mail/$domain/accounts.tar tar -rpf $tmpdir/mail/$domain/accounts.tar $account else - echo "$(date "+%F %T") excluding account $account" - msg="$msg\n$(date "+%F %T") excluding account $account" + echo "$(date "+%F %T") excluding mail account $account" |\ + tee -a $BACKUP/$user.log fi done @@ -360,21 +328,16 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then # Print total if [ "$i" -eq 1 ]; then - echo -e "$(date "+%F %T") *** $i domain ***" - msg="$msg\n$(date "+%F %T") *** $i domain ***" + echo -e "$(date "+%F %T") *** $i domain ***" |tee -a $BACKUP/$user.log else - echo -e "$(date "+%F %T") *** $i domains ***" - msg="$msg\n$(date "+%F %T") *** $i domains ***" + echo -e "$(date "+%F %T") *** $i domains ***"|tee -a $BACKUP/$user.log fi - echo - msg="$msg\n" fi # Databases if [ ! -z "$DB_SYSTEM" ] && [ "$DB" != '*' ]; then - echo "-- DB --" - msg="$msg\n-- DB --" + echo -e "\n-- DB --" |tee -a $BACKUP/$user.log mkdir $tmpdir/db/ # Parsing database exclusions @@ -383,8 +346,8 @@ if [ ! -z "$DB_SYSTEM" ] && [ "$DB" != '*' ]; then if [ -z "$exclusion" ]; then db_list="$db_list $database" else - echo "$(date "+%F %T") excluding $database" - msg="$msg\n$(date "+%F %T") excluding $database" + echo "$(date "+%F %T") excluding $database" |\ + tee -a $BACKUP/$user.log fi done @@ -395,9 +358,7 @@ if [ ! -z "$DB_SYSTEM" ] && [ "$DB" != '*' ]; then ((i ++)) get_database_values - echo -e "$(date "+%F %T") $database ($TYPE)" - msg="$msg\n$(date "+%F %T") $database ($TYPE)" - + echo -e "$(date "+%F %T") $database ($TYPE)" |tee -a $BACKUP/$user.log mkdir -p $tmpdir/db/$database/conf mkdir -p $tmpdir/db/$database/vesta @@ -417,20 +378,17 @@ if [ ! -z "$DB_SYSTEM" ] && [ "$DB" != '*' ]; then # Print total if [ "$i" -eq 1 ]; then - echo -e "$(date "+%F %T") *** $i database ***" - msg="$msg\n$(date "+%F %T") *** $i database ***" + echo -e "$(date "+%F %T") *** $i database ***" |\ + tee -a $BACKUP/$user.log else - echo -e "$(date "+%F %T") *** $i databases ***" - msg="$msg\n$(date "+%F %T") *** $i databases ***" + echo -e "$(date "+%F %T") *** $i databases ***"|\ + tee -a $BACKUP/$user.log fi - echo - msg="$msg\n" fi # Cron jobs if [ ! -z "$CRON_SYSTEM" ] && [ "$CRON" != '*' ]; then - echo "-- CRON --" - msg="$msg\n-- CRON --" + echo -e "\n-- CRON --" |tee -a $BACKUP/$user.log mkdir $tmpdir/cron/ # Backup cron.conf @@ -444,20 +402,17 @@ if [ ! -z "$CRON_SYSTEM" ] && [ "$CRON" != '*' ]; then # Print total if [ "$cron_record" -eq 1 ]; then - echo -e "$(date "+%F %T") *** $cron_record job ***" - msg="$msg\n$(date "+%F %T") *** $cron_record job ***" + echo -e "$(date "+%F %T") *** $cron_record job ***" |\ + tee -a $BACKUP/$user.log else - echo -e "$(date "+%F %T") *** $cron_record jobs ***" - msg="$msg\n$(date "+%F %T") *** $cron_record jobs ***" + echo -e "$(date "+%F %T") *** $cron_record jobs ***" |\ + tee -a $BACKUP/$user.log fi - echo - msg="$msg\n" fi # User Directories if [ "$USER" != '*' ]; then - echo "-- User Dir --" - msg="$msg\n-- User Dir --" + echo -e "\n-- User Dir --" |tee -a $BACKUP/$user.log mkdir $tmpdir/user_dir cd $HOMEDIR/$user @@ -471,21 +426,20 @@ if [ "$USER" != '*' ]; then fargs+=(-not) fargs+=(-path) fargs+=("./$xpath*") - echo "$(date "+%F %T") excluding directory $xpath" - msg="$msg\n$(date "+%F %T") excluding directory $xpath" + echo "$(date "+%F %T") excluding directory $xpath" |\ + tee -a $BACKUP/$user.log done IFS=$'\n' set -f i=0 - for udir in $(ls -a |egrep -v "conf|web|dns|mail|^\.\.$|^\.$"); do + for udir in $(ls -a |egrep -v "^conf$|^web$|^dns$|^mail$|^\.\.$|^\.$"); do exclusion=$(echo "$USER" |tr ',' '\n' |grep "^$udir$") if [ -z "$exclusion" ]; then ((i ++)) udir_list="$udir_list $udir" - echo -e "$(date "+%F %T") adding $udir" - msg="$msg\n$(date "+%F %T") adding $udir" + echo -e "$(date "+%F %T") adding $udir" |tee -a $BACKUP/$user.log # Backup files and dirs tar -cpf $tmpdir/user_dir/$udir.tar $udir @@ -499,14 +453,12 @@ if [ "$USER" != '*' ]; then # Print total if [ "$i" -eq 1 ]; then - echo -e "$(date "+%F %T") *** $i user directory ***" - msg="$msg\n$(date "+%F %T") *** $i directory ***" + echo -e "$(date "+%F %T") *** $i user directory ***" |\ + tee -a $BACKUP/$user.log else - echo -e "$(date "+%F %T") *** $i directories ***" - msg="$msg\n$(date "+%F %T") *** $i directories ***" + echo -e "$(date "+%F %T") *** $i directories ***" |\ + tee -a $BACKUP/$user.log fi - echo - msg="$msg\n" fi # Get backup size @@ -514,14 +466,14 @@ size="$(du -shm $tmpdir |cut -f 1)" # Get current time end_time=$(date '+%s') -DATE=$(date +%F) -TIME=$(date +%T) - +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) # Defining local storage function local_backup(){ - rm -f $BACKUP/$user.$DATE.tar + rm -f $BACKUP/$user.$date.tar # Checking retention backup_list=$(ls -lrt $BACKUP/ |awk '{print $9}' |grep "^$user\.") @@ -533,33 +485,30 @@ local_backup(){ # Removing old backup for backup in $(echo "$backup_list" |head -n $backups_rm_number); do backup_date=$(echo $backup |sed -e "s/$user.//" -e "s/.tar$//") - echo -e "$(date "+%F %T") Roated: $backup_date" - msg="$msg\n$(date "+%F %T") Rotated: $backup_date" + echo -e "$(date "+%F %T") Roated: $backup_date" |\ + tee -a $BACKUP/$user.log rm -f $BACKUP/$backup done fi # Checking disk space disk_usage=$(df $BACKUP |tail -n1 |tr ' ' '\n' |grep % |cut -f 1 -d %) - if [ "$disk_usage" -ge "$BACKUP_DISK_LIMIT" ]; then rm -rf $tmpdir - echo "Not enough disk space to run backup" |\ - $send_mail -s "$subj" $email - echo "Error: Not enough disk space" + rm -f $BACKUP/$user.log sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_DISK" "$EVENT" - exit $E_DISK + echo "Not enough disk space" |$SENDMAIL -s "$subj" $email $notify + check_result "$E_DISK" "Not enough dsk space" fi # Creating final tarball cd $tmpdir - tar -cf $BACKUP/$user.$DATE.tar . - chmod 640 $BACKUP/$user.$DATE.tar - chown admin:$user $BACKUP/$user.$DATE.tar + tar -cf $BACKUP/$user.$date.tar . + chmod 640 $BACKUP/$user.$date.tar + chown admin:$user $BACKUP/$user.$date.tar localbackup='yes' - echo -e "$(date "+%F %T") Local: $BACKUP/$user.$DATE.tar" - msg="$msg\n$(date "+%F %T") Local: $BACKUP/$user.$DATE.tar" + echo -e "$(date "+%F %T") Local: $BACKUP/$user.$date.tar" |\ + tee -a $BACKUP/$user.log U_BACKUPS=$(ls $BACKUP/ |grep "^$user." |wc -l) update_user_value "$user" '$U_BACKUPS' "$U_BACKUPS" } @@ -582,21 +531,17 @@ EOF ftp_backup() { # Checking config if [ ! -e "$VESTA/conf/ftp.backup.conf" ]; then - ftp_conf_error="Can't open $VESTA/conf/ftp.backup.conf" - echo "$ftp_conf_error" |$send_mail -s "$subj" $email - echo "Error: $VESTA/conf/ftp.backup.conf doesn't exist" + error="ftp.backup.conf doesn't exist" + rm -rf $tmpdir + rm -f $BACKUP/$user.log + echo "$error" |$SENDMAIL -s "$subj" $email $notify sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + check_result "$E_NOTEXIST" "$error" fi # Parse config source $VESTA/conf/ftp.backup.conf - # Set current data - DATE=$(date +%F) - TIME=$(date +%T) - # Set default port if [ -z "$(grep 'PORT=' $VESTA/conf/ftp.backup.conf)" ]; then PORT='21' @@ -604,30 +549,28 @@ ftp_backup() { # Checking variables if [ -z "$HOST" ] || [ -z "$USERNAME" ] || [ -z "$PASSWORD" ]; then + error="Can't parse ftp backup configuration" rm -rf $tmpdir - echo "Can't parse ftp backup configuration" |\ - $send_mail -s "$subj" $email - echo "Error: Parsing error" + rm -f $BACKUP/$user.log + echo "$error" |$SENDMAIL -s "$subj" $email $notify sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_PARSING" "$EVENT" - exit $E_PARSING + check_result "$E_PARSING" "$error" fi # Debug info - echo -e "$(date "+%F %T") Remote: ftp://$HOST$BPATH/$user.$DATE.tar" + echo -e "$(date "+%F %T") Remote: ftp://$HOST$BPATH/$user.$date.tar" # Checking ftp connection fconn=$(ftpc) ferror=$(echo $fconn |grep -i -e failed -e error -e "Can't" -e "not conn") if [ ! -z "$ferror" ]; then + error="Error: can't login to ftp ftp://$USERNAME@$HOST" rm -rf $tmpdir - echo "Can't login to ftp://$USERNAME@$HOST" |\ - $send_mail -s "$subj" $email - echo "Error: can't login to ftp ftp://$USERNAME@$HOST" + rm -f $BACKUP/$user.log + echo "$error" |$SENDMAIL -s "$subj" $email $notify sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_CONNECT" "$EVENT" - exit $E_CONNECT + check_result "$E_CONNECT" "$error" fi # Check ftp permissions @@ -636,13 +579,12 @@ ftp_backup() { ftpc "mkdir $ftmpdir" "rm $ftmpdir" ftp_result=$(ftpc "mkdir $ftmpdir" "rm $ftmpdir" |grep -v Trying) if [ ! -z "$ftp_result" ] ; then + error="Can't create ftp backup folder ftp://$HOST$BPATH" rm -rf $tmpdir - echo "Can't create ftp backup folder ftp://$HOST$BPATH" |\ - $send_mail -s "$subj" $email - echo "Error: cant's create ftp folder ftp://$HOST$BPATH" + rm -f $BACKUP/$user.log + echo "$error" |$SENDMAIL -s "$subj" $email $notify sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_FTP" "$EVENT" - exit $E_FTP + check_result "$E_FTP" "$error" fi # Checking retention @@ -652,8 +594,8 @@ ftp_backup() { backups_rm_number=$((backups_count - BACKUPS + 1)) for backup in $(echo "$backup_list" |head -n $backups_rm_number); do backup_date=$(echo $backup |sed -e "s/$user.//" -e "s/.tar$//") - echo -e "$(date "+%F %T") Roated ftp backup: $backup_date" - msg="$msg\n$(date "+%F %T") Roated ftp backup: $backup_date" + echo -e "$(date "+%F %T") Roated ftp backup: $backup_date" |\ + tee -a $BACKUP/$user.log ftpc "cd $BPATH" "delete $backup" done fi @@ -661,13 +603,13 @@ ftp_backup() { # Uploading backup archive if [ "$localbackup" = 'yes' ]; then cd $BACKUP - ftpc "cd $BPATH" "put $user.$DATE.tar" + ftpc "cd $BPATH" "put $user.$date.tar" else cd $tmpdir - tar -cf $BACKUP/$user.$DATE.tar . + tar -cf $BACKUP/$user.$date.tar . cd $BACKUP/ - ftpc "cd $BPATH" "put $user.$DATE.tar" - rm -f $user.$DATE.tar + ftpc "cd $BPATH" "put $user.$date.tar" + rm -f $user.$date.tar fi } @@ -733,21 +675,17 @@ sftp_backup() { # Checking config if [ ! -e "$VESTA/conf/sftp.backup.conf" ]; then - sftp_conf_error="Can't open $VESTA/conf/sftp.backup.conf" - echo "$sftp_conf_error" |$send_mail -s "$subj" $email - echo "Error: $VESTA/conf/sftp.backup.conf doesn't exist" + error="Can't open sftp.backup.conf" + rm -rf $tmpdir + rm -f $BACKUP/$user.log + echo "$error" |$SENDMAIL -s "$subj" $email $notify sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + check_result "$E_NOTEXIST" "$error" fi # Parse config source $VESTA/conf/sftp.backup.conf - # Set current data - DATE=$(date +%F) - TIME=$(date +%T) - # Set default port if [ -z "$(grep 'PORT=' $VESTA/conf/sftp.backup.conf)" ]; then PORT='22' @@ -755,17 +693,17 @@ sftp_backup() { # Checking variables if [ -z "$HOST" ] || [ -z "$USERNAME" ] || [ -z "$PASSWORD" ]; then + error="Can't parse sftp backup configuration" rm -rf $tmpdir - echo "Can't parse sftp backup configuration" |\ - $send_mail -s "$subj" $email - echo "Error: Parsing error" + rm -f $BACKUP/$user.log + echo "$error" |$SENDMAIL -s "$subj" $email $notify sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_PARSING" "$EVENT" - exit $E_PARSING + check_result "$E_PARSING" "$error" fi # Debug info - echo -e "$(date "+%F %T") Remote: sftp://$HOST/$BPATH/$user.$DATE.tar" + echo -e "$(date "+%F %T") Remote: sftp://$HOST/$BPATH/$user.$date.tar" |\ + tee -a $BACKUP/$user.log # Checking network connection and write permissions sftmpdir="$BPATH/vst.bK76A9SUkt" @@ -773,47 +711,45 @@ sftp_backup() { sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1 rc=$? if [[ "$rc" != 0 ]]; then - rm -rf $tmpdir case $rc in - $E_CONNECT) echo "Error: can't login to sftp host $HOST" |\ - $send_mail -s "$subj" $email;; - $E_FTP) echo "Error: can't create temp folder on sftp $HOST" |\ - $send_mail -s "$subj" $email;; + $E_CONNECT) error="Can't login to sftp host $HOST" ;; + $E_FTP) error="Can't create temp folder on sftp $HOST" ;; esac + rm -rf $tmpdir + rm -f $BACKUP/$user.log + echo "$error" |$SENDMAIL -s "$subj" $email $notify sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$rc" "$EVENT" - exit "$rc" + check_result "$rc" "$error" fi # Checking retention - backup_list=$(sftpc "cd $BPATH" "ls -l" |awk '{print $9}' |grep "^$user\.") + backup_list=$(sftpc "cd $BPATH" "ls -l" |awk '{print $9}'|grep "^$user\.") backups_count=$(echo "$backup_list" |wc -l) if [ "$backups_count" -ge "$BACKUPS" ]; then backups_rm_number=$((backups_count - BACKUPS + 1)) - for backup in $(echo "$backup_list" |head -n $backups_rm_number); do + for backup in $(echo "$backup_list" |head -n $backups_rm_number); do backup_date=$(echo $backup |sed -e "s/$user.//" -e "s/.tar.*$//") - echo -e "$(date "+%F %T") Roated sftp backup: $backup_date" - msg="$msg\n$(date "+%F %T") Roated sftp backup: $backup_date" + echo -e "$(date "+%F %T") Roated sftp backup: $backup_date" |\ + tee -a $BACKUP/$user.log sftpc "cd $BPATH" "rm $backup" > /dev/null 2>&1 done fi # Uploading backup archive - echo -e "$(date "+%F %T") Uploading $user.$DATE.tar ..." + echo "$(date "+%F %T") Uploading $user.$date.tar"|tee -a $BACKUP/$user.log if [ "$localbackup" = 'yes' ]; then cd $BACKUP - sftpc "cd $BPATH" "put $user.$DATE.tar" > /dev/null 2>&1 + sftpc "cd $BPATH" "put $user.$date.tar" > /dev/null 2>&1 else cd $tmpdir - tar -cf $BACKUP/$user.$DATE.tar . + tar -cf $BACKUP/$user.$date.tar . cd $BACKUP/ - sftpc "cd $BPATH" "put $user.$DATE.tar" > /dev/null 2>&1 - rm -f $user.$DATE.tar + sftpc "cd $BPATH" "put $user.$date.tar" > /dev/null 2>&1 + rm -f $user.$date.tar fi } -echo "-- SUMMARY --" -msg="$msg\n-- SUMMARY --" +echo -e "\n-- SUMMARY --" |tee -a $BACKUP/$user.log # Switching on backup system types for backup_type in $(echo -e "${BACKUP_SYSTEM//,/\\n}"); do @@ -839,10 +775,8 @@ if [ "$run_time" -eq 1 ]; then min=minute fi -echo "$(date "+%F %T") Size: $size Mb" -msg="$msg\n$(date "+%F %T") Size: $size Mb" -echo "$(date "+%F %T") Runtime: $run_time $min" -msg="$msg\n$(date "+%F %T") Runtime: $run_time $min" +echo "$(date "+%F %T") Size: $size Mb" |tee -a $BACKUP/$user.log +echo "$(date "+%F %T") Runtime: $run_time $min" |tee -a $BACKUP/$user.log #----------------------------------------------------------# @@ -851,10 +785,10 @@ msg="$msg\n$(date "+%F %T") Runtime: $run_time $min" # Removing duplicate touch $USER_DATA/backup.conf -sed -i "/$user.$DATE.tar/d" $USER_DATA/backup.conf +sed -i "/$user.$date.tar/d" $USER_DATA/backup.conf # Registering new backup -backup_str="BACKUP='$user.$DATE.tar'" +backup_str="BACKUP='$user.$date.tar'" backup_str="$backup_str TYPE='$BACKUP_SYSTEM' SIZE='$size'" backup_str="$backup_str WEB='${web_list// /,}'" backup_str="$backup_str DNS='${dns_list// /,}'" @@ -862,7 +796,7 @@ backup_str="$backup_str MAIL='${mail_list// /,}'" backup_str="$backup_str DB='${db_list// /,}'" backup_str="$backup_str CRON='$cron_list'" backup_str="$backup_str UDIR='${udir_list// /,}'" -backup_str="$backup_str RUNTIME='$run_time' TIME='$TIME' DATE='$DATE'" +backup_str="$backup_str RUNTIME='$run_time' TIME='$time' DATE='$date'" echo "$backup_str" >> $USER_DATA/backup.conf # Removing old backups @@ -874,13 +808,14 @@ chmod 660 $USER_DATA/backup.conf sed -i "/v-backup-user $user /d" $VESTA/data/queue/backup.pipe # Send notification -if [ "$notify" != 'no' ]; then +if [ -e "$BACKUP/$user.log" ]; then subj="$user → backup has been completed" email=$(get_user_value '$CONTACT') - echo -e "$msg" |$send_mail -s "$subj" $email + cat $BACKUP/$user.log #|$SENDMAIL -s "$subj" $email $notify + rm $BACKUP/$user.log fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-backup-users b/bin/v-backup-users index 3473ad70..e96eb2fb 100755 --- a/bin/v-backup-users +++ b/bin/v-backup-users @@ -27,7 +27,7 @@ $BIN/v-check-vesta-license >/dev/null if [ -z "$BACKUP_SYSTEM" ]; then exit fi -for user in $(ls $VESTA/data/users); do +for user in $(grep '@' /etc/passwd |cut -f1 -d:); do check_suspend=$(grep "SUSPENDED='no'" $VESTA/data/users/$user/user.conf) log=$VESTA/log/backup.log if [ ! -z "$check_suspend" ]; then @@ -44,6 +44,6 @@ done #----------------------------------------------------------# # No Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-cron-job b/bin/v-change-cron-job index c38ad7e9..7a30a258 100755 --- a/bin/v-change-cron-job +++ b/bin/v-change-cron-job @@ -30,7 +30,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '7' "$#" 'USER JOB MIN HOUR DAY MONTH WDAY COMMAND' -validate_format 'user' 'job' 'min' 'hour' 'day' 'month' 'wday' 'command' +is_format_valid 'user' 'job' 'min' 'hour' 'day' 'month' 'wday' 'command' is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -42,10 +42,15 @@ is_object_unsuspended 'cron' 'JOB' "$job" # Action # #----------------------------------------------------------# +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Concatenating cron string command=$(echo $command | sed -e "s/'/%quote%/g") str="JOB='$job' MIN='$min' HOUR='$hour' DAY='$day' MONTH='$month' WDAY='$wday'" -str="$str CMD='$command' SUSPENDED='no' TIME='$TIME' DATE='$DATE'" +str="$str CMD='$command' SUSPENDED='no' TIME='$time' DATE='$date'" # Deleting old job sed -i "/JOB='$job' /d" $USER_DATA/cron.conf @@ -70,6 +75,6 @@ check_result $? "Cron restart failed" >/dev/null # Logging log_history "changed cron job $job" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-database-host-password b/bin/v-change-database-host-password index abe8e06b..fc066293 100755 --- a/bin/v-change-database-host-password +++ b/bin/v-change-database-host-password @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf args_usage='TYPE HOST DBUSER DBPASS' check_args '4' "$#" "$args_usage" -validate_format 'host' 'dbuser' +is_format_valid 'host' 'dbuser' is_object_valid "../../conf/$type" 'HOST' "$host" dbpass="$password" @@ -59,6 +59,6 @@ update_object_value "../../conf/$type" 'HOST' "$host" '$PASSWORD' "$dbpass" #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-database-owner b/bin/v-change-database-owner index 166528f8..d84d8eb2 100755 --- a/bin/v-change-database-owner +++ b/bin/v-change-database-owner @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'DATABASE USER' -validate_format 'database' 'user' +is_format_valid 'database' 'user' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -34,7 +34,7 @@ is_object_unsuspended 'user' 'USER' "$user" owner=$(echo $database | cut -f 1 -d '_') if [ ! -e "$VESTA/data/users/$owner" ]; then echo "Error: database owner doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -47,7 +47,7 @@ fi db_data=$(grep "DB='$database'" $VESTA/data/users/$owner/db.conf) if [ -z "$db_data" ]; then echo "Error: database $database doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -56,7 +56,7 @@ new_db=$(echo $database | sed "s/^${owner}_/${user}_/") check_db=$(grep "DB='$new_db'" $VESTA/data/users/$user/db.conf) if [ ! -z "$check_db" ]; then echo "Error: $new_db database exists" - log_event "$E_EXISTS" "$EVENT" + log_event "$E_EXISTS" "$ARGUMENTS" exit $E_EXISTS fi @@ -69,7 +69,7 @@ fi tmpdir=$(mktemp -p $BACKUP -d) if [ "$?" -ne 0 ]; then echo "Error: can't create $tmpdir" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -80,7 +80,6 @@ $BIN/v-suspend-database $owner $database > /dev/null 2>&1 eval $db_data dump="$tmpdir/$database.$TYPE.sql" grants="$tmpdir/$database.$TYPE.$DBUSER" -send_mail='/bin/true' case $TYPE in mysql) dump_mysql_database ;; pgsql) dump_pgsql_database ;; @@ -120,6 +119,6 @@ $BIN/v-update-user-counters $user #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-database-password b/bin/v-change-database-password index 1272f00a..b911747c 100755 --- a/bin/v-change-database-password +++ b/bin/v-change-database-password @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DATABASE DBPASS' -validate_format 'user' 'database' +is_format_valid 'user' 'database' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -56,6 +56,6 @@ update_object_value 'db' 'DB' "$database" '$MD5' "$md5" # Logging log_history "changed $database database password" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-database-user b/bin/v-change-database-user index 332dfc10..752a7932 100755 --- a/bin/v-change-database-user +++ b/bin/v-change-database-user @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DATABASE DBUSER [DBPASS]' -validate_format 'user' 'database' 'dbuser' +is_format_valid 'user' 'database' 'dbuser' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -86,6 +86,6 @@ fi # Logging log_history "changed $database database user to $dbuser" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-dns-domain-exp b/bin/v-change-dns-domain-exp index da75bca8..ec11acc9 100755 --- a/bin/v-change-dns-domain-exp +++ b/bin/v-change-dns-domain-exp @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN EXP' -validate_format 'user' 'domain' 'exp' +is_format_valid 'user' 'domain' 'exp' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -58,6 +58,6 @@ fi # Logging log_history "changed whois expiration date for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-dns-domain-ip b/bin/v-change-dns-domain-ip index a066c6be..47e01f42 100755 --- a/bin/v-change-dns-domain-ip +++ b/bin/v-change-dns-domain-ip @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN IP' -validate_format 'user' 'domain' 'ip' +is_format_valid 'user' 'domain' 'ip' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -78,6 +78,6 @@ fi # Logging log_history "changed dns ip for $domain to $ip" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-dns-domain-soa b/bin/v-change-dns-domain-soa index 3a8670f7..553bcfc9 100755 --- a/bin/v-change-dns-domain-soa +++ b/bin/v-change-dns-domain-soa @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN SOA' -validate_format 'user' 'domain' 'soa' +is_format_valid 'user' 'domain' 'soa' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -72,6 +72,6 @@ fi # Logging log_history "changed soa record for $domain to $soa" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-dns-domain-tpl b/bin/v-change-dns-domain-tpl index e8ee90c6..8af190f5 100755 --- a/bin/v-change-dns-domain-tpl +++ b/bin/v-change-dns-domain-tpl @@ -14,10 +14,14 @@ # Argument definition user=$1 domain=$(idn -t --quiet -u "$2" ) -domain_idn=$(idn -t --quiet -a "$domain") template=$3 restart=$4 +domain_idn="$domain" +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +fi + # Includes source $VESTA/func/main.sh source $VESTA/func/domain.sh @@ -29,13 +33,13 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN TEMPLATE [RESTART]' -validate_format 'user' 'domain' 'template' +is_format_valid 'user' 'domain' 'template' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" is_object_unsuspended 'dns' 'DOMAIN' "$domain" -is_dns_template_valid +is_dns_template_valid "$template" #----------------------------------------------------------# @@ -43,8 +47,7 @@ is_dns_template_valid #----------------------------------------------------------# # Defining variables -ip=$(get_object_value 'dns' 'DOMAIN' "$domain" '$IP') - +get_domain_values 'dns' i=1 ns=$(get_user_value '$NS') for nameserver in ${ns//,/ };do @@ -52,15 +55,42 @@ for nameserver in ${ns//,/ };do (( ++i)) done +# Reading template +template_data=$(cat $DNSTPL/$template.tpl) + +# Deleting unused nameservers +if [ -z "$ns3" ]; then + template_data=$(echo "$template_data" |grep -v %ns3%) +fi +if [ -z "$ns4" ]; then + template_data=$(echo "$template_data" |grep -v %ns4%) +fi +if [ -z "$ns5" ]; then + template_data=$(echo "$template_data" |grep -v %ns5%) +fi +if [ -z "$ns6" ]; then + template_data=$(echo "$template_data" |grep -v %ns6%) +fi +if [ -z "$ns7" ]; then + template_data=$(echo "$template_data" |grep -v %ns7%) +fi +if [ -z "$ns8" ]; then + template_data=$(echo "$template_data" |grep -v %ns8%) +fi + # Changing tpl -cat $DNSTPL/$template.tpl |\ - sed -e "s/%ip%/$ip/g" \ +echo "$template_data" |\ + sed -e "s/%ip%/$IP/g" \ -e "s/%domain_idn%/$domain_idn/g" \ -e "s/%domain%/$domain/g" \ -e "s/%ns1%/$ns1/g" \ -e "s/%ns2%/$ns2/g" \ -e "s/%ns3%/$ns3/g" \ -e "s/%ns4%/$ns4/g" \ + -e "s/%ns5%/$ns5/g" \ + -e "s/%ns6%/$ns6/g" \ + -e "s/%ns7%/$ns7/g" \ + -e "s/%ns8%/$ns8/g" \ -e "s/%time%/$TIME/g" \ -e "s/%date%/$DATE/g" > $USER_DATA/dns/$domain.conf records="$(wc -l $USER_DATA/dns/$domain.conf |cut -f 1 -d ' ')" @@ -98,6 +128,6 @@ fi # Logging log_history "changed dns template for $domain to $template" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-dns-domain-ttl b/bin/v-change-dns-domain-ttl index 120d7e0d..0e85391f 100755 --- a/bin/v-change-dns-domain-ttl +++ b/bin/v-change-dns-domain-ttl @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN TTL' -validate_format 'user' 'domain' 'ttl' +is_format_valid 'user' 'domain' 'ttl' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -71,6 +71,6 @@ fi # Logging log_history "changed TTL for $domain to $ttl" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-dns-record b/bin/v-change-dns-record index 1569ae9c..505a8a1f 100755 --- a/bin/v-change-dns-record +++ b/bin/v-change-dns-record @@ -12,13 +12,16 @@ # Argument definition user=$1 domain=$(idn -t --quiet -u "$2" ) -domain=$(echo $domain | tr '[:upper:]' '[:lower:]') -domain_idn=$(idn -t --quiet -a "$domain") id=$3 dvalue=$(idn -t --quiet -u "$4" ) priority=$5 restart=$6 +domain_idn="$domain" +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +fi + # Includes source $VESTA/func/main.sh source $VESTA/func/domain.sh @@ -30,7 +33,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN ID VALUE [PRIORITY] [RESTART]' -validate_format 'user' 'domain' 'id' 'dvalue' +is_format_valid 'user' 'domain' 'id' 'dvalue' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -67,9 +70,14 @@ is_dns_nameserver_valid "$domain" "$TYPE" "$dvalue" # Deleting old record sed -i "/^ID='$id'/d" $USER_DATA/dns/$domain.conf +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Adding record dns_rec="ID='$id' RECORD='$RECORD' TYPE='$TYPE' PRIORITY='$priority'" -dns_rec="$dns_rec VALUE='$dvalue' SUSPENDED='no' TIME='$TIME' DATE='$DATE'" +dns_rec="$dns_rec VALUE='$dvalue' SUSPENDED='no' TIME='$time' DATE='$date'" echo "$dns_rec" >> $USER_DATA/dns/$domain.conf # Sorting records @@ -104,6 +112,6 @@ fi # Logging log_history "changed dns record on $domain to $dvalue" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-dns-record-id b/bin/v-change-dns-record-id index 42ab1d74..4c321b0f 100755 --- a/bin/v-change-dns-record-id +++ b/bin/v-change-dns-record-id @@ -29,7 +29,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN ID NEWID [RESTART]' -validate_format 'user' 'domain' 'id' 'newid' +is_format_valid 'user' 'domain' 'id' 'newid' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -78,6 +78,6 @@ fi # Logging log_history "changed dns record id on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-domain-owner b/bin/v-change-domain-owner index 1943473e..c6be1c89 100755 --- a/bin/v-change-domain-owner +++ b/bin/v-change-domain-owner @@ -1,6 +1,6 @@ #!/bin/bash -# info: change ip owner -# options: DOMAIN USER [IP] +# info: change domain owner +# options: DOMAIN USER # # The function of changing domain ownership. @@ -12,7 +12,6 @@ # Argument definition domain=$1 user=$2 -ip=$3 # Includes source $VESTA/func/ip.sh @@ -24,20 +23,13 @@ source $VESTA/conf/vesta.conf # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'DOMAIN USER [IP]' -validate_format 'domain' 'user' +check_args '2' "$#" 'DOMAIN USER' +is_format_valid 'domain' 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" -if [ ! -z "$ip" ]; then - is_ip_valid - is_ip_avalable -fi - owner=$(v-search-domain-owner $domain) if [ -z "$owner" ]; then - echo "Error: domain $domain doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + check_result $E_NOTEXIST "domain $domain doesn't exist" fi if [ "$owner" = "$user" ]; then exit @@ -168,6 +160,6 @@ $BIN/v-update-user-counters $user #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-firewall-rule b/bin/v-change-firewall-rule index 806f093b..d2502bce 100755 --- a/bin/v-change-firewall-rule +++ b/bin/v-change-firewall-rule @@ -40,9 +40,9 @@ sort_fw_rules() { #----------------------------------------------------------# check_args '5' "$#" 'RULE ACTION IP PORT [PROTOCOL] [COMMENT]' -validate_format 'rule' 'action' 'protocol' 'port_ext' 'ip' +is_format_valid 'rule' 'action' 'protocol' 'port_ext' 'ip' if [ ! -z "$comment" ]; then - validate_format 'comment' + is_format_valid 'comment' fi is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' is_object_valid '../../data/firewall/rules' 'RULE' "$rule" @@ -52,10 +52,15 @@ is_object_valid '../../data/firewall/rules' 'RULE' "$rule" # Action # #----------------------------------------------------------# +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Concatenating firewall rule str="RULE='$rule' ACTION='$action' PROTOCOL='$protocol' PORT='$port_ext'" str="$str IP='$ip' COMMENT='$comment' SUSPENDED='no'" -str="$str TIME='$TIME' DATE='$DATE'" +str="$str TIME='$time' DATE='$date'" # Deleting old rule sed -i "/RULE='$rule' /d" $VESTA/data/firewall/rules.conf @@ -75,6 +80,6 @@ $BIN/v-update-firewall #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-fs-file-permission b/bin/v-change-fs-file-permission index 29e47bab..3e6ae6b5 100755 --- a/bin/v-change-fs-file-permission +++ b/bin/v-change-fs-file-permission @@ -28,7 +28,7 @@ if [ -z $homedir ]; then fi # Checking source file -if [ ! -f "$src_file" ]; then +if [ ! -fe "$src_file" ]; then echo "Error: source file doesn't exist $src_file" exit 3 fi @@ -41,11 +41,11 @@ if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then fi # Changing file permissions -sudo -u $user chmod $permissions "$src_file" >/dev/null 2>&1 +sudo -u $user chmod -R $permissions "$src_file" >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "Error: access permission on $src_file was not changed" exit 3 fi # Exiting -exit +exit \ No newline at end of file diff --git a/bin/v-change-mail-account-password b/bin/v-change-mail-account-password index 3109ea21..da6b788c 100755 --- a/bin/v-change-mail-account-password +++ b/bin/v-change-mail-account-password @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN ACCOUNT PASSWORD' -validate_format 'user' 'domain' 'account' +is_format_valid 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -44,7 +44,7 @@ is_password_valid #----------------------------------------------------------# # Generating hashed password -salt=$(gen_password "$PW_MATRIX" "8") +salt=$(generate_password "$PW_MATRIX" "8") md5="{MD5}$($BIN/v-generate-password-hash md5 $salt <<<$password)" if [[ "$MAIL_SYSTEM" =~ exim ]]; then @@ -63,6 +63,6 @@ update_object_value "mail/$domain" 'ACCOUNT' "$account" '$MD5' "$md5" # Logging log_history "changed password for $account@$domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-mail-account-quota b/bin/v-change-mail-account-quota index 3055da72..0d4f8d53 100755 --- a/bin/v-change-mail-account-quota +++ b/bin/v-change-mail-account-quota @@ -28,9 +28,9 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN ACCOUNT QUOTA' -validate_format 'user' 'domain' 'account' +is_format_valid 'user' 'domain' 'account' if [ "$quota" != 'unlimited' ]; then - validate_format 'quota' + is_format_valid 'quota' fi is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -69,6 +69,6 @@ update_object_value "mail/$domain" 'ACCOUNT' "$account" '$QUOTA' "$quota" # Logging log_history "changed mail quota for $account@$domain to $quota" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-mail-domain-catchall b/bin/v-change-mail-domain-catchall index 97909fd6..25e0caaa 100755 --- a/bin/v-change-mail-domain-catchall +++ b/bin/v-change-mail-domain-catchall @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN EMAIL' -validate_format 'user' 'domain' 'email' +is_format_valid 'user' 'domain' 'email' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -56,6 +56,6 @@ update_object_value 'mail' 'DOMAIN' "$domain" '$CATCHALL' "$email" # Logging log_history "changed catchall email for $domain to $email" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-remote-dns-domain-exp b/bin/v-change-remote-dns-domain-exp index a335d63b..421e1408 100755 --- a/bin/v-change-remote-dns-domain-exp +++ b/bin/v-change-remote-dns-domain-exp @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" diff --git a/bin/v-change-remote-dns-domain-soa b/bin/v-change-remote-dns-domain-soa index 65a0c8df..0974e1aa 100755 --- a/bin/v-change-remote-dns-domain-soa +++ b/bin/v-change-remote-dns-domain-soa @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" diff --git a/bin/v-change-remote-dns-domain-ttl b/bin/v-change-remote-dns-domain-ttl index b0e45b77..6bdc90e8 100755 --- a/bin/v-change-remote-dns-domain-ttl +++ b/bin/v-change-remote-dns-domain-ttl @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" diff --git a/bin/v-change-sys-config-value b/bin/v-change-sys-config-value index 0af44ee3..31b62634 100755 --- a/bin/v-change-sys-config-value +++ b/bin/v-change-sys-config-value @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'KEY VALUE' -validate_format 'key' +is_format_valid 'key' #----------------------------------------------------------# @@ -50,6 +50,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-sys-hostname b/bin/v-change-sys-hostname index d977f39f..bf1e8bae 100755 --- a/bin/v-change-sys-hostname +++ b/bin/v-change-sys-hostname @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'HOSTNAME' -validate_format 'domain' +is_format_valid 'domain' #----------------------------------------------------------# @@ -52,6 +52,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-sys-ip-name b/bin/v-change-sys-ip-name index 425efb6e..bf930096 100755 --- a/bin/v-change-sys-ip-name +++ b/bin/v-change-sys-ip-name @@ -24,11 +24,9 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'IP IP_NAME' -validate_format 'ip' -if [ ! -z "$ip_name" ]; then - validate_format 'ip_name' -fi -is_ip_valid +is_format_valid 'ip' +is_format_valid 'ip_name' +is_ip_valid "$ip" #----------------------------------------------------------# @@ -45,6 +43,6 @@ update_ip_value '$NAME' "$ip_name" # Logging log_history "changed associated dns on $ip to $domain" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-sys-ip-nat b/bin/v-change-sys-ip-nat index a76e8878..8f681555 100755 --- a/bin/v-change-sys-ip-nat +++ b/bin/v-change-sys-ip-nat @@ -25,11 +25,9 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'IP NAT_IP [RESTART]' -validate_format 'ip' -if [ ! -z "$nat_ip" ]; then - validate_format 'nat_ip' -fi -is_ip_valid +is_format_valid 'ip' +is_format_valid 'nat_ip' +is_ip_valid "$ip" #----------------------------------------------------------# @@ -82,6 +80,6 @@ fi # Logging log_history "changed associated nat address on $ip to $nat_ip" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-sys-ip-owner b/bin/v-change-sys-ip-owner index 3fbfc43e..5ea71c34 100755 --- a/bin/v-change-sys-ip-owner +++ b/bin/v-change-sys-ip-owner @@ -24,14 +24,13 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'IP USER' -validate_format 'ip' 'user' +is_format_valid 'ip' 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" -is_ip_valid +is_ip_valid "$ip" is_ip_key_empty '$U_WEB_DOMAINS' is_ip_key_empty '$U_SYS_USERS' - #----------------------------------------------------------# # Action # #----------------------------------------------------------# @@ -77,6 +76,6 @@ fi # Logging log_history "changed owner of $ip to $user" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-sys-ip-status b/bin/v-change-sys-ip-status index 907c9e96..7f834065 100755 --- a/bin/v-change-sys-ip-status +++ b/bin/v-change-sys-ip-status @@ -24,21 +24,16 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'IP IP_STATUS' -validate_format 'ip' 'ip_status' -is_ip_valid +is_format_valid 'ip' 'ip_status' +is_ip_valid "$ip" if [ "$ip_status" = "$(get_ip_value '$STATUS')" ]; then - echo "Error: status $ip_status is already set" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + check_result "$E_EXISTS" "status $ip_status is already set" fi - web_domains=$(get_ip_value '$U_WEB_DOMAINS') sys_user=$(get_ip_value '$U_SYS_USERS') ip_owner=$(get_ip_value '$OWNER') if [ "$web_domains" -ne '0' ] && [ "$sys_user" != "$ip_owner" ]; then - echo "Error: ip $ip is used" - log_event "$E_INUSE" "$EVENT" - exit $E_INUSE + check_result "$E_INUSE" "ip $ip is used" fi @@ -56,6 +51,6 @@ update_ip_value '$STATUS' "$ip_status" # Logging log_history "changed $ip status to $ip_status" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-sys-language b/bin/v-change-sys-language index 5b79b0f4..6f27a902 100755 --- a/bin/v-change-sys-language +++ b/bin/v-change-sys-language @@ -20,7 +20,7 @@ source $VESTA/conf/vesta.conf is_language_valid() { if [ ! -e "$VESTA/web/inc/i18n/$language.php" ]; then echo "Error: language file $language doesn't exist" - log_event "$E_NOTEXIST $EVENT" + log_event "$E_NOTEXIST $ARGUMENTS" exit $E_NOTEXIST fi } @@ -31,7 +31,7 @@ is_language_valid() { #----------------------------------------------------------# check_args '1' "$#" 'LANGUAGE' -validate_format 'language' +is_format_valid 'language' is_language_valid $language @@ -52,6 +52,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-sys-timezone b/bin/v-change-sys-timezone index d168d13a..bfd4e5bc 100755 --- a/bin/v-change-sys-timezone +++ b/bin/v-change-sys-timezone @@ -19,7 +19,7 @@ source $VESTA/conf/vesta.conf is_timezone_valid() { if [ ! -e "/usr/share/zoneinfo/$timezone" ]; then echo "Error: tz file $timezone doesn't exist" - log_event $E_NOTEXIST "$EVENT" + log_event $E_NOTEXIST "$ARGUMENTS" exit $E_NOTEXIST fi } @@ -67,6 +67,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-user-contact b/bin/v-change-user-contact index 4228e5aa..bbbb2d16 100755 --- a/bin/v-change-user-contact +++ b/bin/v-change-user-contact @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER EMAIL' -validate_format 'user' 'email' +is_format_valid 'user' 'email' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -49,6 +49,6 @@ $BIN/v-rebuild-cron-jobs $user > /dev/null 2>&1 # Logging log_history "changed contact email to $email" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-user-language b/bin/v-change-user-language index dceda7d2..38084ccc 100755 --- a/bin/v-change-user-language +++ b/bin/v-change-user-language @@ -21,12 +21,12 @@ source $VESTA/conf/vesta.conf is_language_valid() { if ! [[ "$1" =~ ^[[:alnum:]_-]+$ ]]; then echo "Error: language $1 is not valid" - log_event "$E_INVALID" "$EVENT" + log_event "$E_INVALID" "$ARGUMENTS" exit $E_INVALID fi if [ ! -e "$VESTA/web/inc/i18n/$1.php" ]; then echo "Error: language $1 doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi } @@ -37,7 +37,7 @@ is_language_valid() { #----------------------------------------------------------# check_args '2' "$#" 'USER LANGUAGE' -validate_format 'user' 'language' +is_format_valid 'user' 'language' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_language_valid $language @@ -61,6 +61,6 @@ fi # Logging log_history "changed language to $language" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-user-name b/bin/v-change-user-name index 41223181..2776b4cb 100755 --- a/bin/v-change-user-name +++ b/bin/v-change-user-name @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER FNAME LNAME' -validate_format 'user' 'fname' 'lname' +is_format_valid 'user' 'fname' 'lname' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -48,6 +48,6 @@ update_user_value "$user" '$LNAME' "$lname" # Logging log_history "changed user name to $fname $lname" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-user-ns b/bin/v-change-user-ns index 02f06ff0..0e28766c 100755 --- a/bin/v-change-user-ns +++ b/bin/v-change-user-ns @@ -33,30 +33,30 @@ source $VESTA/conf/vesta.conf check_args '3' "$#" 'USER NS1 NS2 [NS3] [NS4] [NS5] [NS6] [NS7] [NS8]' # Checking argument format -validate_format 'user' 'ns1' 'ns2' +is_format_valid 'user' 'ns1' 'ns2' if [ ! -z "$ns3" ]; then ns3=$(echo $4 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns3' + is_format_valid 'ns3' fi if [ ! -z "$ns4" ]; then ns4=$(echo $5 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns4' + is_format_valid 'ns4' fi if [ ! -z "$ns5" ]; then ns5=$(echo $6 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns5' + is_format_valid 'ns5' fi if [ ! -z "$ns6" ]; then ns6=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns6' + is_format_valid 'ns6' fi if [ ! -z "$ns7" ]; then ns7=$(echo $8 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns7' + is_format_valid 'ns7' fi if [ ! -z "$ns8" ]; then ns8=$(echo $9 | sed -e 's/\.*$//g' -e 's/^\.*//g') - validate_format 'ns8' + is_format_valid 'ns8' fi is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -80,6 +80,6 @@ update_user_value "$user" '$NS' "$ns" # Logging log_history "updated nameservers $ns1 $ns2 $ns3 $ns4 $ns5 $ns6 $ns7 $ns8" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-user-package b/bin/v-change-user-package index 80dd2046..bb0b21d8 100755 --- a/bin/v-change-user-package +++ b/bin/v-change-user-package @@ -40,63 +40,44 @@ is_package_avalable() { # Checking usage agains package limits if [ "$WEB_DOMAINS" != 'unlimited' ]; then if [ "$WEB_DOMAINS" -lt "$U_WEB_DOMAINS" ]; then - echo "Error: Package doesn't cover WEB_DOMAIN usage" - log_event "$E_LIMIT" "$EVENT" - exit $E_LIMIT + check_result $E_LIMIT "Package doesn't cover WEB_DOMAIN usage" fi fi if [ "$DNS_DOMAINS" ! = 'unlimited' ]; then if [ "$DNS_DOMAINS" -lt "$U_DNS_DOMAINS" ]; then - echo "Error: Package doesn't cover DNS_DOMAIN usage" - log_event "$E_LIMIT" "$EVENT" - exit $E_LIMIT + check_result $E_LIMIT "Package doesn't cover DNS_DOMAIN usage" fi fi if [ "$MAIL_DOMAINS" != 'unlimited' ]; then if [ "$MAIL_DOMAINS" -lt "$U_MAIL_DOMAINS" ]; then - echo "Error: Package doesn't cover MAIL_DOMAIN usage" - log_event "$E_LIMIT" "$EVENT" - exit $E_LIMIT + check_result $E_LIMIT "Package doesn't cover MAIL_DOMAIN usage" fi fi if [ "$DATABASES" != 'unlimited' ]; then if [ "$DATABASES" -lt "$U_DATABASES" ]; then - echo "Error: Package doesn't cover DATABASE usage" - log_event "$E_LIMIT" "$EVENT" - exit $E_LIMIT + check_result $E_LIMIT "Package doesn't cover DATABASE usage" fi fi if [ "$CRON_JOBS" != 'unlimited' ]; then if [ "$CRON_JOBS" -lt "$U_CRON_JOBS" ]; then - echo "Error: Package doesn't cover CRON usage" - log_event "$E_LIMIT" "$EVENT" - exit $E_LIMIT + check_result $E_LIMIT "Package doesn't cover CRON usage" fi fi if [ "$DISK_QUOTA" != 'unlimited' ]; then if [ "$DISK_QUOTA" -lt "$U_DISK" ]; then - echo "Error: Package doesn't cover DISK usage" - log_event "$E_LIMIT" "$EVENT" - exit $E_LIMIT + check_result $E_LIMIT "Package doesn't cover DISK usage" fi fi if [ "$BANDWIDTH" != 'unlimited' ]; then if [ "$BANDWIDTH" -lt "$U_BANDWIDTH" ]; then - echo "Error: Package doesn't cover BANDWIDTH usage" - log_event "$E_LIMIT" "$EVENT" - exit $E_LIMIT + check_result $E_LIMIT "Package doesn't cover BANDWIDTH usage" fi fi } change_user_package() { - usr_data=$(cat $USER_DATA/user.conf) - eval $usr_data - - pkg_data=$(cat $VESTA/data/packages/$package.pkg |grep -v TIME |\ - grep -v DATE) - eval $pkg_data - + eval $(cat $USER_DATA/user.conf) + eval $(cat $VESTA/data/packages/$package.pkg |egrep -v "TIME|DATE") echo "FNAME='$FNAME' LNAME='$LNAME' PACKAGE='$package' @@ -159,7 +140,7 @@ DATE='$DATE'" > $USER_DATA/user.conf #----------------------------------------------------------# check_args '2' "$#" 'USER PACKAGE [FORCE]' -validate_format 'user' 'package' +is_format_valid 'user' 'package' is_object_valid 'user' 'USER' "$user" is_package_valid if [ "$force" != 'yes' ];then @@ -197,6 +178,6 @@ fi # Logging log_history "changed $user package to $package" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-user-password b/bin/v-change-user-password index af194361..a420502a 100755 --- a/bin/v-change-user-password +++ b/bin/v-change-user-password @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER PASSWORD' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_password_valid @@ -43,11 +43,11 @@ md5=$(awk -v user=$user -F : 'user == $1 {print $2}' /etc/shadow) #----------------------------------------------------------# # Changing RKEY value -update_user_value "$user" '$RKEY' "$(gen_password)" +update_user_value "$user" '$RKEY' "$(generate_password)" update_user_value "$user" '$MD5' "$md5" # Logging log_history "changed password" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-user-shell b/bin/v-change-user-shell index 721c8475..6a079c0a 100755 --- a/bin/v-change-user-shell +++ b/bin/v-change-user-shell @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER SHELL' -validate_format 'user' 'shell' +is_format_valid 'user' 'shell' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -58,6 +58,6 @@ update_user_value "$user" '$SHELL' "$shell" # Logging log_history "changed $user shell to $shell" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-user-template b/bin/v-change-user-template index a67bfc3d..5a329535 100755 --- a/bin/v-change-user-template +++ b/bin/v-change-user-template @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER TYPE TEMPLATE' -validate_format 'user' 'template' +is_format_valid 'user' 'template' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -35,11 +35,11 @@ is_object_unsuspended 'user' 'USER' "$user" #----------------------------------------------------------# case $type in - WEB) is_web_template_valid; + WEB) is_web_template_valid $template; update_user_value "$user" '$WEB_TEMPLATE' "$template";; PROXY) is_proxy_template_valid $template; update_user_value "$user" '$PROXY_TEMPLATE' "$template";; - DNS) is_dns_template_valid; + DNS) is_dns_template_valid $template; update_user_value "$user" '$DNS_TEMPLATE' "$template";; *) check_args '1' '0' 'USER TYPE TEMPLATE' esac @@ -51,6 +51,6 @@ esac # Logging log_history "changed $type template to $template" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-web-domain-backend-tpl b/bin/v-change-web-domain-backend-tpl index 91f6f3c2..40b11df1 100755 --- a/bin/v-change-web-domain-backend-tpl +++ b/bin/v-change-web-domain-backend-tpl @@ -29,20 +29,21 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN TEMPLATE [RESTART]' -validate_format 'user' 'domain' 'template' +is_format_valid 'user' 'domain' 'template' is_system_enabled "$WEB_BACKEND" 'WEB_BACKEND' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" is_object_unsuspended 'web' 'DOMAIN' "$domain" -is_web_backend_template_valid $template -is_web_backend_pool_valid +is_backend_template_valid $template #----------------------------------------------------------# # Action # #----------------------------------------------------------# +prepare_web_backend + # Deleting backend rm -f $pool/$backend.conf @@ -71,34 +72,26 @@ if [ "$backend" = "$user" ]; then nohead=1 for domain in $(shell_list); do - - # Parsing domain values get_domain_values 'web' - ip=$(get_real_ip $IP) + local_ip=$(get_real_ip $IP) + prepare_web_domain_values - # Deleting old vhost - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" - conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" - del_web_config - - # Deleting old ssl vhost + # Rebuilding vhost + del_web_config "$WEB_SYSTEM" "$TPL.tpl" + add_web_config "$WEB_SYSTEM" "$TPL.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - del_web_config + del_web_config "$WEB_SYSTEM" "$TPL.stpl" + add_web_config "$WEB_SYSTEM" "$TPL.stpl" fi - # Adding new vhost - upd_web_domain_values - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" - conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" - add_web_config - - # Adding new ssl vhost - if [ "$SSL" = 'yes' ]; then - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - add_web_config + # Rebuilding proxy configuration + if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then + del_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + if [ "$SSL" = 'yes' ]; then + del_web_config "$PROXY_SYSTEM" "$PROXY.stpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.stpl" + fi fi # Update config @@ -117,31 +110,25 @@ if [ "$backend" = "$user" ]; then else # Parsing domain values get_domain_values 'web' - ip=$(get_real_ip $IP) + local_ip=$(get_real_ip $IP) + prepare_web_domain_values - # Deleting old vhost - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" - conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" - del_web_config - - # Deleting old ssl vhost + # Rebuilding vhost + del_web_config "$WEB_SYSTEM" "$TPL.tpl" + add_web_config "$WEB_SYSTEM" "$TPL.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - del_web_config + del_web_config "$WEB_SYSTEM" "$TPL.stpl" + add_web_config "$WEB_SYSTEM" "$TPL.stpl" fi - # Adding new vhost - upd_web_domain_values - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" - conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" - add_web_config - - # Adding new ssl vhost - if [ "$SSL" = 'yes' ]; then - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - add_web_config + # Rebuilding proxy configuration + if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then + del_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + if [ "$SSL" = 'yes' ]; then + del_web_config "$PROXY_SYSTEM" "$PROXY.stpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.stpl" + fi fi # Update config @@ -166,6 +153,6 @@ fi # Logging log_history "changed backend template for $domain to $template" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-web-domain-ftp-password b/bin/v-change-web-domain-ftp-password index 900c6fa3..1eabe0ef 100755 --- a/bin/v-change-web-domain-ftp-password +++ b/bin/v-change-web-domain-ftp-password @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN FTP_USER FTP_PASSWORD' -validate_format 'user' 'domain' 'ftp_user' +is_format_valid 'user' 'domain' 'ftp_user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -37,7 +37,7 @@ is_password_valid get_domain_values 'web' if [ -z "$(echo $FTP_USER | tr ':' '\n' | grep ^$ftp_user$)" ]; then echo "Error: account $ftp_user doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -67,6 +67,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$FTP_MD5' "$ftp_md5" # Logging log_history "changed password for $ftp_user on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-web-domain-ftp-path b/bin/v-change-web-domain-ftp-path index 71da7d85..6ac0b7df 100755 --- a/bin/v-change-web-domain-ftp-path +++ b/bin/v-change-web-domain-ftp-path @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN FTP_USER FTP_PATH' -validate_format 'user' 'domain' 'ftp_user' +is_format_valid 'user' 'domain' 'ftp_user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -36,13 +36,13 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain" get_domain_values 'web' if [ -z "$(echo $FTP_USER | tr ':' '\n' | grep ^$ftp_user$)" ]; then echo "Error: account $ftp_user doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi ftp_path_a=$(readlink -f "$HOMEDIR/$user/web/$domain/$ftp_path") if [ -z "$(echo $ftp_path_a |grep $HOMEDIR/$user/web/$domain)" ]; then echo "Error: absolute path $ftp_path_a is invalid" - log_event "$E_INVALID" "$EVENT" + log_event "$E_INVALID" "$ARGUMENTS" exit $E_INVALID fi @@ -84,6 +84,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$FTP_PATH' "$ftp_path" # Logging log_history "changed path to $ftp_path_a for $ftp_user@$domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-web-domain-httpauth b/bin/v-change-web-domain-httpauth index 3483838c..91ed166d 100755 --- a/bin/v-change-web-domain-httpauth +++ b/bin/v-change-web-domain-httpauth @@ -29,7 +29,7 @@ htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd" #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN AUTH_USER AUTH_PASSWORD [RESTART]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -39,7 +39,7 @@ is_password_valid get_domain_values 'web' if [ -z "$(echo "$AUTH_USER" |tr : '\n' |grep ^$auth_user$)" ]; then echo "Error: auth user $auth_user doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -71,6 +71,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$AUTH_HASH' "$auth_hash" # Logging log_history "changed auth user $httpauth_user password on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-web-domain-ip b/bin/v-change-web-domain-ip index 22aaca85..b3e19432 100755 --- a/bin/v-change-web-domain-ip +++ b/bin/v-change-web-domain-ip @@ -1,8 +1,8 @@ #!/bin/bash -# info: change web domain ip address -# options: USER DOMAIN IP [RESTART] +# info: change web domain ip +# options: USER DOMAIN DOMAIN [RESTART] # -# The call is used for changing the site ip address. +# The call is used for changing domain ip #----------------------------------------------------------# @@ -11,8 +11,7 @@ # Argument definition user=$1 -domain=$(idn -t --quiet -u "$2" ) -domain_idn=$(idn -t --quiet -a "$domain") +domain=$2 ip=$3 restart=$4 @@ -28,47 +27,41 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN IP [RESTART]' -validate_format 'user' 'domain' 'ip' +is_format_valid 'user' 'domain' 'ip' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" is_object_unsuspended 'web' 'DOMAIN' "$domain" -is_ip_valid -is_ip_avalable +is_ip_valid "$ip" "$user" #----------------------------------------------------------# # Action # #----------------------------------------------------------# -# Define variable for replace +# Preparing variables for vhost replace get_domain_values 'web' -ip=$(get_real_ip $ip) -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" -conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" old=$(get_real_ip $IP) new=$ip -replace_web_config - -# Checking SSL -if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - replace_web_config +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +else + domain_idn=$domain fi -# Checking proxy -if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" - conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - replace_web_config - # Checking SSL proxy - if [ "$SSL" = 'yes' ] && [ ! -z "$PROXY" ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - replace_web_config +# Replacing vhost +replace_web_config "$WEB_SYSTEM" "$TPL.tpl" +if [ "$SSL" = 'yes' ]; then + replace_web_config "$WEB_SYSTEM" "$TPL.stpl" +fi + +# Replacing proxy vhost +if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then + replace_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + if [ "$SSL" = 'yes' ]; then + replace_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi fi @@ -97,6 +90,6 @@ fi # Logging log_history "changed web domain $domain ip to $3" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-web-domain-proxy-tpl b/bin/v-change-web-domain-proxy-tpl index be74713d..cb51169b 100755 --- a/bin/v-change-web-domain-proxy-tpl +++ b/bin/v-change-web-domain-proxy-tpl @@ -32,7 +32,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN TEMPLATE [EXTENTIONS] [RESTART]' -validate_format 'user' 'domain' 'template' +is_format_valid 'user' 'domain' 'template' is_system_enabled "$PROXY_SYSTEM" 'PROXY_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -48,38 +48,21 @@ is_proxy_template_valid $template # Parsing domain values get_domain_values 'web' -tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" -old_tpl=$PROXY -conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" -ip=$(get_real_ip $IP) +local_ip=$(get_real_ip $IP) # Delete old vhost -del_web_config +del_web_config "$PROXY_SYSTEM" "$PROXY.tpl" +if [ "$SSL" = 'yes' ]; then + del_web_config "$PROXY_SYSTEM" "$PROXY.stpl" +fi # Add new vhost PROXY="$template" PROXY_EXT="$extentions" -tpl_file="$WEBTPL/$PROXY_SYSTEM/$template.tpl" -upd_web_domain_values -add_web_config -chown root:$user $conf -chmod 640 $conf - -# Checking SSL +prepare_web_domain_values +add_web_config "$PROXY_SYSTEM" "$PROXY.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$old_tpl.stpl" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - del_web_config - - tpl_file="$WEBTPL/$PROXY_SYSTEM/$template.stpl" - add_web_config - chown root:$user $conf - chmod 640 $conf -fi - -# Running template trigger -if [ -x $WEBTPL/$PROXY_SYSTEM/$template.sh ]; then - $WEBTPL/$PROXY_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $docroot + add_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi @@ -99,6 +82,6 @@ fi # Logging log_history "changed proxy template for $domain to $template" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-web-domain-sslcert b/bin/v-change-web-domain-sslcert index 37624194..67c1e0eb 100755 --- a/bin/v-change-web-domain-sslcert +++ b/bin/v-change-web-domain-sslcert @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN SSL_DIR [RESTART]' -validate_format 'user' 'domain' 'ssl_dir' +is_format_valid 'user' 'domain' 'ssl_dir' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -83,6 +83,6 @@ fi # Logging log_history "changed ssl certificate for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-web-domain-sslhome b/bin/v-change-web-domain-sslhome index 52399ef8..c5764629 100755 --- a/bin/v-change-web-domain-sslhome +++ b/bin/v-change-web-domain-sslhome @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN SSL_HOME [RESTART]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -40,8 +40,6 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$SSL' get_domain_values 'web' old_ssl_home=$SSL_HOME SSL_HOME=$ssl_home -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" -conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" # Parsing tpl_option case $SSL_HOME in @@ -53,13 +51,11 @@ case $SSL_HOME in esac # Changing sslhome directory -replace_web_config +replace_web_config "$WEB_SYSTEM" "$TPL.stpl" -# Checking proxy config +# Changing proxy vhost if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - replace_web_config + replace_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi @@ -83,6 +79,6 @@ fi # Logging log_history "changed ssl home for $domain to $ssl_home" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-change-web-domain-stats b/bin/v-change-web-domain-stats index a341f642..fcd661ff 100755 --- a/bin/v-change-web-domain-stats +++ b/bin/v-change-web-domain-stats @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN TYPE' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_type_valid "$STATS_SYSTEM" "$type" is_object_valid 'user' 'USER' "$user" @@ -46,7 +46,7 @@ get_domain_values 'web' # Comparing stats types if [ "$STATS" == $type ]; then - log_event "$OK" "$EVENT" + log_event "$OK" "$ARGUMENTS" exit 0 fi @@ -59,10 +59,8 @@ rm -rf $stats_dir/* # Deleting config rm -f $HOMEDIR/$user/conf/web/$STATS.$domain.conf -# Preparing domain values for the template substitution -upd_web_domain_values - # Adding statistic config +prepare_web_domain_values cat $WEBTPL/$type/$type.tpl |\ sed -e "s/%ip%/$ip/g" \ -e "s/%web_port%/$WEB_PORT/g" \ @@ -98,7 +96,7 @@ update_object_value 'web' 'DOMAIN' "$domain" '$STATS' "$type" # Logging log_history "changed web log stats for $domain to $type" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" # Build stats exec $BIN/v-update-web-domain-stat $user $domain diff --git a/bin/v-change-web-domain-tpl b/bin/v-change-web-domain-tpl index 6d7d51b7..3366c313 100755 --- a/bin/v-change-web-domain-tpl +++ b/bin/v-change-web-domain-tpl @@ -29,13 +29,13 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN TEMPLATE [RESTART]' -validate_format 'user' 'domain' 'template' +is_format_valid 'user' 'domain' 'template' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" is_object_unsuspended 'web' 'DOMAIN' "$domain" -is_web_template_valid +is_web_template_valid "$template" #----------------------------------------------------------# @@ -44,45 +44,19 @@ is_web_template_valid # Parsing domain values get_domain_values 'web' -ip=$(get_real_ip $IP) +local_ip=$(get_real_ip $IP) # Deleting domain -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" -old_tpl=$TPL -conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" -del_web_config - -# Deleting ssl vhost +del_web_config "$WEB_SYSTEM" "$TPL.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - del_web_config + del_web_config "$WEB_SYSTEM" "$TPL.stpl" fi # Defining variables for new vhost config -upd_web_domain_values -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.tpl" - -# Adding domain to the web conf -add_web_config - -# Running template trigger -if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh ]; then - $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh \ - $user $domain $ip $HOMEDIR $docroot -fi - -# Checking SSL +prepare_web_domain_values +add_web_config "$WEB_SYSTEM" "$TPL.tpl" if [ "$SSL" = 'yes' ]; then - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.stpl" - add_web_config - - # Running template trigger - if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh ]; then - $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh \ - "$user" "$domain" "$ip" "$HOMEDIR" "$sdocroot" - fi + add_web_config "$WEB_SYSTEM" "$TPL.stpl" fi @@ -101,6 +75,6 @@ fi # Logging log_history "changed web domain template for $domain to $template" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-check-letsencrypt-domain b/bin/v-check-letsencrypt-domain new file mode 100755 index 00000000..2fff26e7 --- /dev/null +++ b/bin/v-check-letsencrypt-domain @@ -0,0 +1,147 @@ +#!/bin/bash +# info: check letsencrypt domain +# options: USER DOMAIN +# +# The function check and validates domain with LetsEncript + + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + +# Argument definition +user=$1 +domain=$(idn -t --quiet -u "$2" ) +domain=$(echo $domain | tr '[:upper:]' '[:lower:]') + +# Includes +source $VESTA/func/main.sh +source $VESTA/conf/vesta.conf + +# encode base64 +encode_base64() { + cat |base64 |tr '+/' '-_' |tr -d '\r\n=' +} + + +#----------------------------------------------------------# +# Verifications # +#----------------------------------------------------------# + +check_args '2' "$#" 'USER DOMAIN' +is_format_valid 'user' 'domain' +is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' +is_object_valid 'user' 'USER' "$user" +is_object_unsuspended 'user' 'USER' "$user" +if [ ! -e "$USER_DATA/ssl/le.conf" ]; then + check_result $E_NOTEXIST "LetsEncrypt key doesn't exist" +fi +rdomain=$(egrep "'$domain'|'$domain,|,$domain,|,$domain'" $USER_DATA/web.conf) +if [ -z "$rdomain" ]; then + check_result $E_NOTEXIST "domain $domain doesn't exist" +fi + + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +source $USER_DATA/ssl/le.conf +api='https://acme-v01.api.letsencrypt.org' +r_domain=$(echo "$rdomain" |cut -f 2 -d \') +key="$USER_DATA/ssl/user.key" +exponent="$EXPONENT" +modulus="$MODULUS" +thumb="$THUMB" + +# Defining JWK header +header='{"e":"'$exponent'","kty":"RSA","n":"'"$modulus"'"}' +header='{"alg":"RS256","jwk":'"$header"'}' + +# Requesting nonce +nonce=$(curl -s -I "$api/directory" |grep Nonce |cut -f2 -d \ |tr -d '\r\n') +protected=$(echo -n '{"nonce":"'"$nonce"'"}' |encode_base64) + +# Defining ACME query (request challenge) +query='{"resource":"new-authz","identifier"' +query=$query':{"type":"dns","value":"'"$domain"'"}}' +payload=$(echo -n "$query" |encode_base64) +signature=$(printf "%s" "$protected.$payload" |\ + openssl dgst -sha256 -binary -sign "$key" |encode_base64) +data='{"header":'"$header"',"protected":"'"$protected"'",' +data=$data'"payload":"'"$payload"'","signature":"'"$signature"'"}' + +# Sending request to LetsEncrypt API +answer=$(curl -s -i -d "$data" "$api/acme/new-authz") + +# Checking http answer status +status=$(echo "$answer" |grep HTTP/1.1 |tail -n1 |cut -f2 -d ' ') +if [[ "$status" -ne "201" ]]; then + check_result $E_CONNECT "LetsEncrypt challenge request $status" +fi + +# Parsing domain nonce,token and uri +nonce=$(echo "$answer" |grep Nonce |cut -f2 -d \ |tr -d '\r\n') +protected=$(echo -n '{"nonce":"'"$nonce"'"}' |encode_base64) +token=$(echo "$answer" |grep -A 3 http-01 |grep token |cut -f 4 -d \") +uri=$(echo "$answer" |grep -A 3 http-01 |grep uri |cut -f 4 -d \") + +# Adding location wrapper for request challenge +if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then + conf="$HOMEDIR/$user/conf/web/nginx.$r_domain.conf_letsencrypt" + if [ ! -e "$conf" ]; then + echo 'location ~ "^/\.well-known/acme-challenge/(.*)$" {' > $conf + echo ' default_type text/plain;' >> $conf + echo ' return 200 "$1.'$thumb'";' >> $conf + echo '}' >> $conf + fi +else + acme="$HOMEDIR/$user/web/$r_domain/public_html/.well-known/acme-challenge" + echo "$token" > $acme/$token.$thumb + chown -R $user:$user $HOMEDIR/$user/web/$r_domain/public_html/.well-known +fi + +# Restarting web server +if [ -z "$PROXY_SYSTEM" ]; then + $BIN/v-restart-web + check_result $? "Proxy restart failed" >/dev/null +else + $BIN/v-restart-proxy + $BIN/v-restart-web + check_result $? "Web restart failed" >/dev/null +fi +sleep 30 + +# Defining ACME query (request validation) +query='{"resource":"challenge","type":"http-01","keyAuthorization"' +query=$query':"'$token.$thumb'","token":"'$token'"}' +payload=$(echo -n "$query" |encode_base64) +signature=$(printf "%s" "$protected.$payload" |\ + openssl dgst -sha256 -binary -sign "$key" |encode_base64) +data='{"header":'"$header"',"protected":"'"$protected"'",' +data=$data'"payload":"'"$payload"'","signature":"'"$signature"'"}' + +# Sending request to LetsEncrypt API +answer=$(curl -s -i -d "$data" "$uri") + +# Checking domain validation status +status=$(echo $answer |grep status |cut -f 4 -d \") +location=$(echo "$answer" |grep Location: |awk '{print $2}' |tr -d '\r\n') +while [ "$status" = 'pending' ] ; do + answer=$(curl -s -i "$location") + status=$(echo "$answer" |tr ',' '\n' |grep status |cut -f 4 -d \") +done +if [ "$status" = 'invalid' ]; then + detail="$(echo $answer |tr ',' '\n' |grep detail |cut -f 4 -d \")" + check_result $E_CONNECT "$detail" +fi + + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +# Logging +log_event "$OK" "$ARGUMENTS" + +exit diff --git a/bin/v-check-user-password b/bin/v-check-user-password index 1eecc3dd..6d829c3a 100755 --- a/bin/v-check-user-password +++ b/bin/v-check-user-password @@ -18,18 +18,23 @@ ip=${3-127.0.0.1} source $VESTA/func/main.sh source $VESTA/conf/vesta.conf +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# + check_args '2' "$#" 'USER PASSWORD' -validate_format 'user' +is_format_valid 'user' # Checking user if [ ! -d "$VESTA/data/users/$user" ] && [ "$user" != 'root' ]; then echo "Error: password missmatch" - echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log + echo "$date $time $user $ip failed to login" >> $VESTA/log/auth.log exit 9 fi @@ -39,7 +44,7 @@ is_password_valid # Checking empty password if [[ -z "$password" ]]; then echo "Error: password missmatch" - echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log + echo "$date $time $user $ip failed to login" >> $VESTA/log/auth.log exit 9 fi @@ -48,27 +53,39 @@ fi # Action # #----------------------------------------------------------# + # Parsing user's salt -shadow=$(grep "^$user:" /etc/shadow) -salt=$(echo "$shadow" |cut -f 3 -d \$) -method=$(echo "$shadow" |cut -f 2 -d \$) -if [ "$method" -eq '1' ]; then - method='md5' +shadow=$(grep "^$user:" /etc/shadow | cut -f 2 -d :) + +if echo "$shadow" | grep -qE '^\$[0-9a-z]+\$[^\$]+\$' +then + salt=$(echo "$shadow" |cut -f 3 -d \$) + method=$(echo "$shadow" |cut -f 2 -d \$) + if [ "$method" -eq '1' ]; then + method='md5' + elif [ "$method" -eq '6' ]; then + method='sha-512' + else + echo "Error: password missmatch" + echo "$date $time $user $ip failed to login" >> $VESTA/log/auth.log + exit 9 + fi else - method='sha-512' + salt=${shadow:0:2} + method='des' fi if [ -z "$salt" ]; then echo "Error: password missmatch" - echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log + echo "$date $time $user $ip failed to login" >> $VESTA/log/auth.log exit 9 fi -# Generating SHA-512 +# Generating hash hash=$($BIN/v-generate-password-hash $method $salt <<< $password) if [[ -z "$hash" ]]; then echo "Error: password missmatch" - echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log + echo "$date $time $user $ip failed to login" >> $VESTA/log/auth.log exit 9 fi @@ -76,7 +93,7 @@ fi result=$(grep "^$user:$hash:" /etc/shadow 2>/dev/null) if [[ -z "$result" ]]; then echo "Error: password missmatch" - echo "$DATE $TIME $user $ip failed to login" >> $VESTA/log/auth.log + echo "$date $time $user $ip failed to login" >> $VESTA/log/auth.log exit 9 fi @@ -86,6 +103,6 @@ fi #----------------------------------------------------------# # Logging -echo "$DATE $TIME $user $ip successfully logged in" >> $VESTA/log/auth.log +echo "$date $time $user $ip successfully logged in" >> $VESTA/log/auth.log exit diff --git a/bin/v-deactivate-vesta-license b/bin/v-deactivate-vesta-license index 13a400ab..ad8dc44b 100755 --- a/bin/v-deactivate-vesta-license +++ b/bin/v-deactivate-vesta-license @@ -60,6 +60,6 @@ if [ "$module" = 'SFTPJAIL' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-backup-host b/bin/v-delete-backup-host index 21e27221..d5d44756 100755 --- a/bin/v-delete-backup-host +++ b/bin/v-delete-backup-host @@ -25,7 +25,7 @@ check_args '1' "$#" 'TYPE [HOST]' types=$(echo "$BACKUP_SYSTEM" |sed "s/,/\n/g" |grep "^$type$") if [ -z "$types" ]; then echo "Error: invalid backup type" - log_event "$E_INVALID" "$EVENT" + log_event "$E_INVALID" "$ARGUMENTS" exit $E_INVALID fi @@ -51,6 +51,6 @@ bckp=$(echo "$BACKUP_SYSTEM" |\ sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $VESTA/conf/vesta.conf # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-cron-job b/bin/v-delete-cron-job index d41e0141..77668e17 100755 --- a/bin/v-delete-cron-job +++ b/bin/v-delete-cron-job @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER JOB' -validate_format 'user' 'job' +is_format_valid 'user' 'job' is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -58,6 +58,6 @@ check_result $? "Restart restart failed" >/dev/null # Logging log_history "deleted cron job $job" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-cron-reports b/bin/v-delete-cron-reports index 65c219a7..45fd88ca 100755 --- a/bin/v-delete-cron-reports +++ b/bin/v-delete-cron-reports @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -50,6 +50,6 @@ check_result $? "Cron restart failed" >/dev/null # Logging log_history "disabled cron reporting" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-cron-restart-job b/bin/v-delete-cron-restart-job index 0b27db2b..33c8c566 100755 --- a/bin/v-delete-cron-restart-job +++ b/bin/v-delete-cron-restart-job @@ -39,6 +39,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-cron-vesta-autoupdate b/bin/v-delete-cron-vesta-autoupdate index ec38facf..051bc764 100755 --- a/bin/v-delete-cron-vesta-autoupdate +++ b/bin/v-delete-cron-vesta-autoupdate @@ -56,6 +56,6 @@ $BIN/v-restart-cron check_result $? "Cron restart failed" >/dev/null # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-database b/bin/v-delete-database index e67eda7f..33ed53f1 100755 --- a/bin/v-delete-database +++ b/bin/v-delete-database @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DATABASE' -validate_format 'user' 'database' +is_format_valid 'user' 'database' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -60,6 +60,6 @@ decrease_user_value "$user" '$U_DATABASES' # Logging log_history "deleted $database database" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-database-host b/bin/v-delete-database-host index a5e8a91f..4a52be10 100755 --- a/bin/v-delete-database-host +++ b/bin/v-delete-database-host @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'TYPE HOST' -validate_format 'type' 'host' +is_format_valid 'type' 'host' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_type_valid "$DB_SYSTEM" "$type" is_object_valid "../../conf/$type" 'HOST' "$host" @@ -45,6 +45,6 @@ sed -i "/HOST='$host' /d" $VESTA/conf/$type.conf # Logging log_history "deleted $type database server $host" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-databases b/bin/v-delete-databases index 6edf5fb9..d771bba3 100755 --- a/bin/v-delete-databases +++ b/bin/v-delete-databases @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -43,6 +43,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-dns-domain b/bin/v-delete-dns-domain index b12d6296..5281a10a 100755 --- a/bin/v-delete-dns-domain +++ b/bin/v-delete-dns-domain @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -79,6 +79,6 @@ fi # Logging log_history "deleted dns domain $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-dns-domains b/bin/v-delete-dns-domains index 785e3d5b..f74b4e14 100755 --- a/bin/v-delete-dns-domains +++ b/bin/v-delete-dns-domains @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -49,6 +49,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-dns-domains-src b/bin/v-delete-dns-domains-src index 22f03984..6f1958c6 100755 --- a/bin/v-delete-dns-domains-src +++ b/bin/v-delete-dns-domains-src @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER SRC [RESTART]' -validate_format 'user' 'src' +is_format_valid 'user' 'src' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -50,6 +50,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-dns-on-web-alias b/bin/v-delete-dns-on-web-alias index 6cd93dff..74cc49f4 100755 --- a/bin/v-delete-dns-on-web-alias +++ b/bin/v-delete-dns-on-web-alias @@ -30,7 +30,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ALIAS' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -74,6 +74,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-dns-record b/bin/v-delete-dns-record index f838b9a0..1c713d01 100755 --- a/bin/v-delete-dns-record +++ b/bin/v-delete-dns-record @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ID [RESTART]' -validate_format 'user' 'domain' 'id' +is_format_valid 'user' 'domain' 'id' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -77,6 +77,6 @@ fi # Logging log_history "deleted dns record $id on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-domain b/bin/v-delete-domain index a1fff5ea..a315d3a8 100755 --- a/bin/v-delete-domain +++ b/bin/v-delete-domain @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -35,7 +35,7 @@ is_object_unsuspended 'user' 'USER' "$user" # Working on Web domain if [ ! -z "$WEB_SYSTEM" ]; then - str=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf |grep "SUSPENDED='no") + str=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf) if [ ! -z "$str" ]; then domain_found='yes' $BIN/v-delete-web-domain $user $domain 'no' @@ -45,7 +45,7 @@ fi # Working on DNS domain if [ ! -z "$DNS_SYSTEM" ]; then - str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf |grep "SUSPENDED='no") + str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf) if [ ! -z "$str" ]; then domain_found='yes' $BIN/v-delete-dns-domain $user $domain 'no' @@ -55,7 +55,7 @@ fi # Working on Mail domain if [ ! -z "$MAIL_SYSTEM" ]; then - str=$(grep "DOMAIN='$domain'" $USER_DATA/mail.conf |grep "SUSPENDED='no") + str=$(grep "DOMAIN='$domain'" $USER_DATA/mail.conf) if [ ! -z "$str" ]; then domain_found='yes' $BIN/v-delete-mail-domain $user $domain @@ -65,9 +65,7 @@ fi # Checking domain search result if [ -z "$domain_found" ]; then - echo "Error: domain $domain doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + check_result $E_NOTEXISTS "domain $domain doesn't exist" fi # Restarting services diff --git a/bin/v-delete-firewall-ban b/bin/v-delete-firewall-ban index 8bae0e2c..52f3403d 100755 --- a/bin/v-delete-firewall-ban +++ b/bin/v-delete-firewall-ban @@ -29,7 +29,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'IP CHAIN' -validate_format 'ip' 'chain' +is_format_valid 'ip' 'chain' is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' @@ -59,6 +59,6 @@ chmod 660 $conf #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-firewall-chain b/bin/v-delete-firewall-chain index 917682b9..7e510d80 100755 --- a/bin/v-delete-firewall-chain +++ b/bin/v-delete-firewall-chain @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'CHAIN' -validate_format 'chain' +is_format_valid 'chain' is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' @@ -61,6 +61,6 @@ chmod 660 $chains #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-firewall-rule b/bin/v-delete-firewall-rule index d37e8a18..8f646644 100755 --- a/bin/v-delete-firewall-rule +++ b/bin/v-delete-firewall-rule @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'RULE' -validate_format 'rule' +is_format_valid 'rule' is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' is_object_valid '../../data/firewall/rules' 'RULE' "$rule" @@ -46,6 +46,6 @@ $BIN/v-update-firewall #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-account b/bin/v-delete-mail-account index 6ae7bfec..a16829a6 100755 --- a/bin/v-delete-mail-account +++ b/bin/v-delete-mail-account @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ACCOUNT' -validate_format 'user' 'domain' 'account' +is_format_valid 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -68,6 +68,6 @@ update_object_value 'mail' 'DOMAIN' "$domain" '$ACCOUNTS' "$accounts" # Logging log_history "deleted $account@$domain mail account" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-account-alias b/bin/v-delete-mail-account-alias index 87a1213c..470fa859 100755 --- a/bin/v-delete-mail-account-alias +++ b/bin/v-delete-mail-account-alias @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN ACCOUNT ALIAS' -validate_format 'user' 'domain' 'account' 'malias' +is_format_valid 'user' 'domain' 'account' 'malias' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -39,7 +39,7 @@ is_object_unsuspended "mail/$domain" 'ACCOUNT' "$account" aliases=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$ALIAS') if [ -z "$(echo $aliases | grep -w $malias)" ]; then echo "Error: alias $malias doesn't exist" - log_event "$E_NOTEXIST $EVENT" + log_event "$E_NOTEXIST $ARGUMENTS" exit $E_NOTEXIST fi @@ -69,6 +69,6 @@ update_object_value "mail/$domain" 'ACCOUNT' "$account" '$ALIAS' "$aliases" # Logging log_history "deleted alias $malias on $account@$domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-account-autoreply b/bin/v-delete-mail-account-autoreply index 2f2ef486..67e79d89 100755 --- a/bin/v-delete-mail-account-autoreply +++ b/bin/v-delete-mail-account-autoreply @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ACCOUNT' -validate_format 'user' 'domain' 'account' +is_format_valid 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -60,7 +60,7 @@ rm -f $USER_DATA/mail/$domain/$account@$domain.msg update_object_value "mail/$domain" 'ACCOUNT' "$account" '$AUTOREPLY' 'no' # Logging -log_history "$EVENT" -log_event "$OK" "$EVENT" +log_history "$ARGUMENTS" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-account-forward b/bin/v-delete-mail-account-forward index a77b3d7e..ff289e35 100755 --- a/bin/v-delete-mail-account-forward +++ b/bin/v-delete-mail-account-forward @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '4' "$#" 'USER DOMAIN ACCOUNT FORWARD' -validate_format 'user' 'domain' 'account' 'forward' +is_format_valid 'user' 'domain' 'account' 'forward' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -39,7 +39,7 @@ is_object_unsuspended "mail/$domain" 'ACCOUNT' "$account" fwd=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$FWD') if [ -z "$(echo $fwd | grep -w $forward)" ]; then echo "Error: forward $forward doesn't exist" - log_event "$E_NOTEXIST $EVENT" + log_event "$E_NOTEXIST $ARGUMENTS" exit $E_NOTEXIST fi @@ -71,6 +71,6 @@ update_object_value "mail/$domain" 'ACCOUNT' "$account" '$FWD' "$fwd" # Logging log_history "deleted $forward forward on $account@$domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-account-fwd-only b/bin/v-delete-mail-account-fwd-only index b437b7e3..dbc9a727 100755 --- a/bin/v-delete-mail-account-fwd-only +++ b/bin/v-delete-mail-account-fwd-only @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ACCOUNT' -validate_format 'user' 'domain' 'account' +is_format_valid 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -56,6 +56,6 @@ update_object_value "mail/$domain" 'ACCOUNT' "$account" '$FWD_ONLY' '' # Logging log_history "deleted fwd_only flag for $account@$domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-domain b/bin/v-delete-mail-domain index a57e459d..4833e656 100755 --- a/bin/v-delete-mail-domain +++ b/bin/v-delete-mail-domain @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -79,6 +79,6 @@ decrease_user_value "$user" '$U_MAIL_ACCOUNTS' "$accounts" # Logging log_history "deleted mail domain $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-domain-antispam b/bin/v-delete-mail-domain-antispam index e33b266e..8ba2cfd0 100755 --- a/bin/v-delete-mail-domain-antispam +++ b/bin/v-delete-mail-domain-antispam @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -54,6 +54,6 @@ update_object_value 'mail' 'DOMAIN' "$domain" '$ANTISPAM' 'no' # Logging log_history "disabled antispam support for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-domain-antivirus b/bin/v-delete-mail-domain-antivirus index 7473c125..baea4575 100755 --- a/bin/v-delete-mail-domain-antivirus +++ b/bin/v-delete-mail-domain-antivirus @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -54,6 +54,6 @@ update_object_value 'mail' 'DOMAIN' "$domain" '$ANTIVIRUS' 'no' # Logging log_history "disabled antivirus support on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-domain-catchall b/bin/v-delete-mail-domain-catchall index 3791d7ad..549c5523 100755 --- a/bin/v-delete-mail-domain-catchall +++ b/bin/v-delete-mail-domain-catchall @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -54,6 +54,6 @@ update_object_value 'mail' 'DOMAIN' "$domain" '$CATCHALL' '' # Logging log_history "deleted catchall email on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-domain-dkim b/bin/v-delete-mail-domain-dkim index 88b480b0..e8e57cf4 100755 --- a/bin/v-delete-mail-domain-dkim +++ b/bin/v-delete-mail-domain-dkim @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -65,6 +65,6 @@ decrease_user_value "$user" '$U_MAIL_DKMI' # Logging log_history "disabled DKIM support on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-mail-domains b/bin/v-delete-mail-domains index 116e4874..e734f844 100755 --- a/bin/v-delete-mail-domains +++ b/bin/v-delete-mail-domains @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -42,6 +42,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-remote-dns-domain b/bin/v-delete-remote-dns-domain index b92aec22..5200030e 100755 --- a/bin/v-delete-remote-dns-domain +++ b/bin/v-delete-remote-dns-domain @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER' if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then check_result $E_NOTEXIST "dns-cluster.conf doesn't exist" diff --git a/bin/v-delete-remote-dns-host b/bin/v-delete-remote-dns-host index 9e4b7368..e6586739 100755 --- a/bin/v-delete-remote-dns-host +++ b/bin/v-delete-remote-dns-host @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'HOST' -validate_format 'host' +is_format_valid 'host' is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER' is_object_valid "../../conf/dns-cluster" 'HOST' "$host" @@ -60,6 +60,6 @@ fi # Logging log_history "deleted remote dns server $host" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-remote-dns-record b/bin/v-delete-remote-dns-record index eab802cc..cbc1d4c8 100755 --- a/bin/v-delete-remote-dns-record +++ b/bin/v-delete-remote-dns-record @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ID' -validate_format 'user' 'domain' 'id' +is_format_valid 'user' 'domain' 'id' is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER' if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then check_result $E_NOTEXIST "dns-cluster.conf doesn't exist" diff --git a/bin/v-delete-sys-firewall b/bin/v-delete-sys-firewall index 86b0ff5d..75b78794 100755 --- a/bin/v-delete-sys-firewall +++ b/bin/v-delete-sys-firewall @@ -43,6 +43,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-sys-ip b/bin/v-delete-sys-ip index 17ea1612..3ef1548a 100755 --- a/bin/v-delete-sys-ip +++ b/bin/v-delete-sys-ip @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'IP' -validate_format 'ip' +is_format_valid 'ip' is_ip_valid "$ip" is_ip_key_empty '$U_WEB_DOMAINS' is_ip_key_empty '$U_SYS_USERS' @@ -43,7 +43,7 @@ cidr=$(convert_netmask $NETMASK) interface=$(/sbin/ip addr | grep "$ip/$cidr" | awk '{print $NF}') if [ ! -z "$interface" ] && [ -z "$(echo $interface |cut -s -f2 -d :)" ]; then echo "Error: can't delete main IP address" - log_event "$E_FORBIDEN" "$EVENT" + log_event "$E_FORBIDEN" "$ARGUMENTS" exit $E_FORBIDEN fi @@ -52,7 +52,7 @@ if [ ! -z "$interface" ]; then /sbin/ip addr del $ip/$cidr dev $INTERFACE if [ "$?" -ne 0 ]; then echo "Error: can't delete system ip" - log_event "$E_FORBIDEN" "$EVENT" + log_event "$E_FORBIDEN" "$ARGUMENTS" exit $E_FORBIDEN fi fi @@ -138,6 +138,6 @@ fi # Logging log_history "deleted system ip address $ip" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-sys-quota b/bin/v-delete-sys-quota index b2a5d27b..4b8913bf 100755 --- a/bin/v-delete-sys-quota +++ b/bin/v-delete-sys-quota @@ -63,6 +63,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-sys-sftp-jail b/bin/v-delete-sys-sftp-jail index 103b41a9..e04a15c0 100755 --- a/bin/v-delete-sys-sftp-jail +++ b/bin/v-delete-sys-sftp-jail @@ -63,12 +63,11 @@ fi if [ "$restart" = 'yes' ]; then subj="OpenSSH restart failed" email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f 2 -d \') - send_mail="$VESTA/web/inc/mail-wrapper.php" /usr/sbin/sshd -t >/dev/null 2>&1 if [ "$?" -ne 0 ]; then mail_text="OpenSSH can not be restarted. Please check config: \n\n$(/usr/sbin/sshd -t)" - echo -e "$mail_text" | $send_mail -s "$subj" $email + echo -e "$mail_text" |$SENDMAIL -s "$subj" $email else service ssh restart >/dev/null 2>&1 service sshd restart >/dev/null 2>&1 @@ -84,6 +83,6 @@ sed -i "/v-add-sys-sftp-jail/d" /etc/rc.local 2>/dev/null #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-user b/bin/v-delete-user index d811fe0c..c452f0a0 100755 --- a/bin/v-delete-user +++ b/bin/v-delete-user @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" if [ "$user" = 'admin' ]; then @@ -38,67 +38,56 @@ fi # Action # #----------------------------------------------------------# -# Checking web system is enabled +# Deleting web domains if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then $BIN/v-unsuspend-web-domains $user $restart $BIN/v-delete-web-domains $user $restart - rv="$?" - if [ "$rv" -ne '0' ]; then - exit $rv - fi + check_result "$?" "web domain deletion failed" fi -# Checking dns system is enabled +# Deleting dns domains if [ ! -z "$DNS_SYSTEM" ] && [ "$DNS_SYSTEM" != 'no' ]; then $BIN/v-unsuspend-dns-domains $user $restart $BIN/v-delete-dns-domains $user $restart - rv="$?" - if [ "$rv" -ne '0' ]; then - exit $rv - fi + check_result "$?" "dns domain deletion failed" fi -# Checking mail system is enabled +# Deleting mail domains if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL_SYSTEM" != 'no' ]; then $BIN/v-unsuspend-mail-domains $user $BIN/v-delete-mail-domains $user - rv="$?" - if [ "$rv" -ne '0' ]; then - exit $rv - fi + check_result "$?" "mail domain deletion failed" fi -# Checking db system is enabled +# Deleting databases if [ ! -z "$DB_SYSTEM" ] && [ "$DB_SYSTEM" != 'no' ]; then $BIN/v-unsuspend-databases $user $BIN/v-delete-databases $user - rv="$?" - if [ "$rv" -ne '0' ]; then - exit $rv - fi + check_result "$?" "database deletion failed" fi -# Checking ip +# Releasing user ips $BIN/v-delete-user-ips "$user" -rv="$?" -if [ "$rv" -ne '0' ]; then - exit $rv -fi +check_result "$?" "user ip release failed" # Deleteing user pipes sed -i "/ $user$/d" $VESTA/data/queue/disk.pipe sed -i "/ $user$/d" $VESTA/data/queue/traffic.pipe +# Deleting sftp jail +if [ ! -z "$SFTPJAIL_KEY" ]; then + $BIN/v-delete-user-sftp-jail $user +fi + # Deleting system user /usr/sbin/userdel -f $user >> /dev/null 2>&1 - -if [ "$?" != 0 ]; then +if [ $? -ne 0 ]; then sed -i "/^$user:/d" /etc/passwd sed -i "/^$user:/d" /etc/shadow fi /usr/sbin/groupdel $user >> /dev/null 2>&1 -if [ "$?" != 0 ]; then +if [ $? -ne 0 ]; then sed -i "/^$user:/d" /etc/group fi @@ -122,6 +111,6 @@ fi # Logging log_history "deleted system user $user" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-user-backup b/bin/v-delete-user-backup index 00b7e86b..4a71a40b 100755 --- a/bin/v-delete-user-backup +++ b/bin/v-delete-user-backup @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER BACKUP' -validate_format 'user' 'backup' +is_format_valid 'user' 'backup' is_system_enabled "$BACKUP_SYSTEM" 'BACKUP_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -48,6 +48,6 @@ update_user_value "$user" '$U_BACKUPS' "$U_BACKUPS" # Logging log_history "deleted backup archive $backup" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-user-backup-exclusions b/bin/v-delete-user-backup-exclusions index 875eaa91..0b1a1e33 100755 --- a/bin/v-delete-user-backup-exclusions +++ b/bin/v-delete-user-backup-exclusions @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [SYSTEM]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -72,6 +72,6 @@ if [ -z "$system" ]; then else log_history "deleted $system exlusion" fi -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-user-favourites b/bin/v-delete-user-favourites index 8efffe08..374fa430 100755 --- a/bin/v-delete-user-favourites +++ b/bin/v-delete-user-favourites @@ -27,10 +27,10 @@ source $VESTA/conf/vesta.conf check_args '3' "$#" 'USER SYSTEM OBJECT' case $system in - MAIL_ACC) validate_format 'email' ;; - CRON) validate_format 'id' ;; - DNS_REC) validate_format 'id' ;; - *) validate_format 'object' + MAIL_ACC) is_format_valid 'email' ;; + CRON) is_format_valid 'id' ;; + DNS_REC) is_format_valid 'id' ;; + *) is_format_valid 'object' esac is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -119,6 +119,6 @@ chmod 640 $USER_DATA/favourites.conf # Logging log_history "deleted starred $object from $system listing" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-user-ips b/bin/v-delete-user-ips index 292ce809..7f8e3224 100755 --- a/bin/v-delete-user-ips +++ b/bin/v-delete-user-ips @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" if [ "$user" = 'admin' ]; then @@ -58,6 +58,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-user-notification b/bin/v-delete-user-notification index c9e32607..6b223e0b 100755 --- a/bin/v-delete-user-notification +++ b/bin/v-delete-user-notification @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER NOTIFICATION' -validate_format 'user' 'nid' +is_format_valid 'user' 'nid' is_object_valid 'user' 'USER' "$user" @@ -61,6 +61,6 @@ if [ "$notice" = 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-user-package b/bin/v-delete-user-package index 8ce2195a..dbd75a86 100755 --- a/bin/v-delete-user-package +++ b/bin/v-delete-user-package @@ -22,7 +22,7 @@ is_package_in_use() { check_package=$(grep "PACKAGE='$package'" $USER_DATA/*/user.conf) if [ ! -z "$check_package" ]; then echo "Error: package $package is in use" - log_event "$E_INUSE" "$EVENT" + log_event "$E_INUSE" "$ARGUMENTS" exit $E_INUSE fi } @@ -32,7 +32,7 @@ is_package_in_use() { #----------------------------------------------------------# check_args '1' "$#" 'PACKAGE' -validate_format 'package' +is_format_valid 'package' is_package_valid is_package_in_use @@ -50,6 +50,6 @@ rm -f $VESTA/data/packages/$package.pkg #----------------------------------------------------------# log_history "deleted user package $package" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-user-sftp-jail b/bin/v-delete-user-sftp-jail index e25121a9..d6f51544 100755 --- a/bin/v-delete-user-sftp-jail +++ b/bin/v-delete-user-sftp-jail @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' user_str=$(grep "^$user:" /etc/passwd) if [ -z "$user_str" ]; then exit @@ -58,6 +58,6 @@ gpasswd -d $user sftp-only >/dev/null 2>&1 #----------------------------------------------------------# # Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-web-domain b/bin/v-delete-web-domain index 4daaf518..878ea472 100755 --- a/bin/v-delete-web-domain +++ b/bin/v-delete-web-domain @@ -14,8 +14,7 @@ # Argument definition user=$1 -domain=$(idn -t --quiet -u "$2" ) -domain_idn=$(idn -t --quiet -a "$domain") +domain=$2 restart=$3 # Includes @@ -30,7 +29,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -42,58 +41,44 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain" # Action # #----------------------------------------------------------# -# Get template name -get_domain_values 'web' -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" -conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" -ip=$(get_real_ip $IP) - -# Deleting domain -del_web_config - -# Checking aliases -if [ ! -z "$ALIAS" ]; then - aliases=$(echo $ALIAS | tr ',' '\n' | wc -l ) -else - aliases=0 -fi - -# Checking SSL -if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - del_web_config - - # Deleting SSL certificates - rm -f $HOMEDIR/$user/conf/web/ssl.$domain.* - rm -f $USER_DATA/ssl/$domain.* -fi - -# Checking backend +# Deleting web backend if [ ! -z "$WEB_BACKEND" ]; then $BIN/v-delete-web-domain-backend $user $domain $restart fi -# Checking proxy +# Parsing domain values +get_domain_values 'web' +domain_idn="$domain" +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +fi +local_ip=$(get_real_ip $IP) + +# Deleting domain from web.conf +sed -i "/DOMAIN='$domain'/ d" $USER_DATA/web.conf + +# Deleting vhost configuration +del_web_config "$WEB_SYSTEM" "$TPL.tpl" + +# Deleting SSL configuration and certificates +if [ "$SSL" = 'yes' ]; then + del_web_config "$WEB_SYSTEM" "$TPL.stpl" + rm -f $HOMEDIR/$user/conf/web/ssl.$domain.* + rm -f $USER_DATA/ssl/$domain.* +fi + +# Deleting proxy if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" - conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - del_web_config - + del_web_config "$PROXY_SYSTEM" "$PROXY.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - del_web_config + del_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi - - # Deleting domain from proxy cache pool - pool="/etc/$PROXY_SYSTEM/conf.d/01_caching_pool.conf" - if [ -e "$pool" ]; then - sed -i "/=$domain:/d" $pool + if [ -e "/etc/$PROXY_SYSTEM/conf.d/01_caching_pool.conf" ]; then + sed -i "/=$domain:/d" /etc/$PROXY_SYSTEM/conf.d/01_caching_pool.conf fi fi -# Checking stats +# Deleting web stats if [ ! -z "$STATS" ] && [ "$STATS" != 'no' ]; then sed -i "/ $domain$/d" $VESTA/data/queue/webstats.pipe rm -f $HOMEDIR/$user/conf/web/$STATS.$domain.conf @@ -111,68 +96,36 @@ if [ ! -z "$FTP_USER" ]; then done fi -# Deleting directory -rm -rf $HOMEDIR/$user/web/$domain - # Deleting logs rm -f /var/log/$WEB_SYSTEM/domains/$domain.log* rm -f /var/log/$WEB_SYSTEM/domains/$domain.bytes rm -f /var/log/$WEB_SYSTEM/domains/$domain.error* +# Deleting directory +rm -rf $HOMEDIR/$user/web/$domain + #----------------------------------------------------------# # Vesta # #----------------------------------------------------------# -# Deleting domain -sed -i "/DOMAIN='$domain'/ d" $USER_DATA/web.conf - -# Checking last SSL domain -conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf" -ssl_dom=$(grep "SSL='yes'" $USER_DATA/web.conf | wc -l) -if [ "$ssl_dom" -eq '0' ]; then - sed -i "/.*\/$user\/.*s$WEB_SYSTEM.conf/d" $conf - rm -f $HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf -fi - -# Checking last domain -domains=$(wc -l $USER_DATA/web.conf | cut -f1 -d ' ') -if [ "$domains" -eq '0' ]; then - sed -i "/.*\/$user\/.*$WEB_SYSTEM.conf/d" $conf - rm -f $HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf -fi - -# Proxy -if [ ! -z "$PROXY_SYSTEM" ]; then - # Checking last SSL proxy - conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf" - last_sproxy=$(grep "SSL='yes'" $USER_DATA/web.conf) - if [ -z "$last_sproxy" ]; then - sed -i "/.*\/$user\/.*s$PROXY_SYSTEM.conf/d" $conf - rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf - fi - - # Checking last proxy - last_proxy=$(grep -v "PROXY=''" $USER_DATA/web.conf) - if [ -z "$last_proxy" ]; then - sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf - rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf - fi -fi - -# Decrease counters -decrease_ip_value "$ip" +# Decreasing user counters +decrease_ip_value "$local_ip" decrease_user_value "$user" '$U_WEB_DOMAINS' -decrease_user_value "$user" '$U_WEB_ALIASES' "$aliases" if [ "$SSL" = 'yes' ]; then decrease_user_value "$user" '$U_WEB_SSL' fi +if [ ! -z "$ALIAS" ]; then + aliases=$(echo $ALIAS | tr ',' '\n' | wc -l ) + decrease_user_value "$user" '$U_WEB_ALIASES' "$aliases" +fi # Restarting web server if [ "$restart" != 'no' ]; then $BIN/v-restart-web check_result $? "Web restart failed" >/dev/null + # Restartinh proxy server if [ ! -z "$PROXY_SYSTEM" ]; then $BIN/v-restart-proxy check_result $? "Proxy restart failed" >/dev/null @@ -181,6 +134,6 @@ fi # Logging log_history "deleted web domain $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-web-domain-alias b/bin/v-delete-web-domain-alias index 9b0ac0d0..2a218061 100755 --- a/bin/v-delete-web-domain-alias +++ b/bin/v-delete-web-domain-alias @@ -12,11 +12,9 @@ # Argument definition user=$1 -domain=$(idn -t --quiet -u "$2" ) -domain_idn=$(idn -t --quiet -a "$domain" ) -dom_alias=$(idn -t --quiet -u "$3" ) -dom_alias_idn=$(idn -t --quiet -a "$dom_alias" ) -restart="$4" +domain=$2 +dom_alias=$3 +restart=$4 # Includes source $VESTA/func/main.sh @@ -30,18 +28,15 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN DOM_ALIAS [RESTART]' -validate_format 'user' 'domain' 'dom_alias' +is_format_valid 'user' 'domain' 'dom_alias' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" is_object_unsuspended 'web' 'DOMAIN' "$domain" get_domain_values 'web' -ip=$(get_real_ip $IP) -if [ -z "$(echo $ALIAS | tr ',' '\n' | grep ^$dom_alias$)" ]; then - echo "Error: alias $dom_alias doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST +if [ -z "$(echo $ALIAS |tr ',' '\n' |grep ^$dom_alias$)" ]; then + check_result $E_NOTEXIST "alias $dom_alias doesn't exist" fi @@ -49,41 +44,30 @@ fi # Action # #----------------------------------------------------------# -# Defining new alias string +# Preparing domain values for the template substitution +local_ip=$(get_real_ip $IP) ALIAS=$(echo "$ALIAS" |\ sed -e "s/,/\n/g"|\ sed -e "s/^$dom_alias$//g"|\ sed -e "/^$/d"|\ sed -e ':a;N;$!ba;s/\n/,/g') -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" -conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" - -# Preparing domain values for the template substitution -upd_web_domain_values - -# Recreating vhost -del_web_config -add_web_config +prepare_web_domain_values +# Rebuilding vhost +del_web_config "$WEB_SYSTEM" "$TPL.tpl" +add_web_config "$WEB_SYSTEM" "$TPL.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - del_web_config - add_web_config + del_web_config "$WEB_SYSTEM" "$TPL.stpl" + add_web_config "$WEB_SYSTEM" "$TPL.stpl" fi -# Checking proxy +# Rebuilding proxy configuration if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" - conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - del_web_config - add_web_config - + del_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - del_web_config - add_web_config + del_web_config "$PROXY_SYSTEM" "$PROXY.stpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi fi @@ -94,8 +78,6 @@ fi # Update config update_object_value 'web' 'DOMAIN' "$domain" '$ALIAS' "$ALIAS" - -# Update counters decrease_user_value "$user" '$U_WEB_ALIASES' # Restarting web server @@ -111,6 +93,6 @@ fi # Logging log_history "deleted alias $dom_alias on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-web-domain-backend b/bin/v-delete-web-domain-backend index 4780ae36..92829bc6 100755 --- a/bin/v-delete-web-domain-backend +++ b/bin/v-delete-web-domain-backend @@ -25,27 +25,48 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" is_object_unsuspended 'web' 'DOMAIN' "$domain" -is_web_backend_pool_valid - -# Checking last webdomain -domains=$(search_objects 'web' 'SUSPENDED' "no" 'DOMAIN'|wc -l) -if [ "$backend" = "$user" ] && [ "$domains" -gt 1 ]; then - exit -fi #----------------------------------------------------------# # Action # #----------------------------------------------------------# +# Defining pool directory +if [ -d "/etc/php-fpm.d" ]; then + pool="/etc/php-fpm.d" +fi +if [ -d "/etc/php5/fpm/pool.d" ]; then + pool="/etc/php5/fpm/pool.d" +fi +if [ ! -e "$pool" ]; then + pool=$(find /etc/php* -type d \( -name "pool.d" -o -name "*fpm.d" \)) + if [ ! -e "$pool" ]; then + check_result $E_NOTEXIST "php-fpm pool doesn't exist" + fi +fi + +# Defining backend type +backend_type="$domain" +if [ "$WEB_BACKEND_POOL" = 'user' ]; then + backend_type="$user" +fi + +# Checking last webdomain +if [ "$WEB_BACKEND_POOL" = 'user' ]; then + domains=$(search_objects 'web' 'SUSPENDED' "no" 'DOMAIN'|wc -l) + if [ "$backend" = "$user" ] && [ "$domains" -gt 1 ]; then + exit + fi +fi + # Deleting backend -rm -f $pool/$backend.conf +rm -f $pool/$backend_type.conf #----------------------------------------------------------# @@ -60,6 +81,6 @@ fi # Logging log_history "deleting backend support for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-web-domain-ftp b/bin/v-delete-web-domain-ftp index 8368b179..b53440c4 100755 --- a/bin/v-delete-web-domain-ftp +++ b/bin/v-delete-web-domain-ftp @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN FTP_USER' -validate_format 'user' 'domain' 'ftp_user' +is_format_valid 'user' 'domain' 'ftp_user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -35,7 +35,7 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain" get_domain_values 'web' if [ -z "$(echo $FTP_USER | tr ':' '\n' | grep ^$ftp_user$)" ]; then echo "Error: account $ftp_user doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -78,6 +78,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$FTP_PATH' "$ftp_path" # Logging log_history "deleted ftp account ${3} for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-web-domain-httpauth b/bin/v-delete-web-domain-httpauth index 96c7eed3..84f9767a 100755 --- a/bin/v-delete-web-domain-httpauth +++ b/bin/v-delete-web-domain-httpauth @@ -30,7 +30,7 @@ htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd" #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN AUTH_USER [RESTART]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -40,7 +40,7 @@ is_password_valid get_domain_values 'web' if [ -z "$(echo "$AUTH_USER" |tr : '\n' |grep ^$auth_user$)" ]; then echo "Error: auth user $auth_user doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -82,6 +82,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$AUTH_HASH' "$auth_hash" # Logging log_history "changed auth user $httpauth_user password on $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-web-domain-proxy b/bin/v-delete-web-domain-proxy index d86cb402..558f67f4 100755 --- a/bin/v-delete-web-domain-proxy +++ b/bin/v-delete-web-domain-proxy @@ -26,8 +26,8 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' -is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' +is_format_valid 'user' 'domain' +is_system_enabled "$PROXY_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" @@ -41,19 +41,11 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$PROXY' # Defining domain parameters get_domain_values 'web' -tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" -conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" -if [ ! -z "$PROXY_SYSTEM" ]; then - del_web_config -fi +del_web_config "$PROXY_SYSTEM" "$PROXY.tpl" # Checking SSL if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - if [ ! -z "$PROXY_SYSTEM" ]; then - del_web_config - fi + del_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi @@ -65,25 +57,6 @@ fi update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' '' update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' '' -if [ -z "$PROXY_SYSTEM" ]; then - exit -fi - -# Checking last SSL proxy -conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf" -last_sproxy=$(grep "SSL='yes'" $USER_DATA/web.conf) -if [ -z "$last_sproxy" ]; then - sed -i "/.*\/$user\/.*s$PROXY_SYSTEM.conf/d" $conf - rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf -fi - -# Checking last proxy -last_proxy=$(grep -v "PROXY=''" $USER_DATA/web.conf) -if [ -z "$last_proxy" ]; then - sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf - rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf -fi - # Restart proxy server if [ "$restart" != 'no' ]; then $BIN/v-restart-proxy @@ -92,6 +65,6 @@ fi # Logging log_history "disabled proxy support for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-web-domain-ssl b/bin/v-delete-web-domain-ssl index 49943bab..9115b9d9 100755 --- a/bin/v-delete-web-domain-ssl +++ b/bin/v-delete-web-domain-ssl @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -41,17 +41,13 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$SSL' # Parsing domain values get_domain_values 'web' -conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" # Deleting domain -del_web_config +del_web_config "$WEB_SYSTEM" "$TPL.stpl" # Checking proxy if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - del_web_config + del_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi # Deleting old certificate @@ -68,24 +64,6 @@ chown -R $user:$user $tmpdir # Update config update_object_value 'web' 'DOMAIN' "$domain" '$SSL' 'no' -# Checking last SSL domain -ssl_dom=$(grep "SSL='yes'" $USER_DATA/web.conf) -conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf" -if [ -z "$ssl_dom" ]; then - sed -i "/.*\/$user\/.*s$WEB_SYSTEM.conf/d" $conf - rm -f $HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf - -fi - -# Checking proxy -if [ ! -z "$PROXY_SYSTEM" ]; then - conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf" - if [ -z "$ssl_dom" ]; then - sed -i "/.*\/$user\/.*s$PROXY_SYSTEM.conf/d" $conf - rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf - fi -fi - # Decreasing domain value decrease_user_value "$user" '$U_WEB_SSL' @@ -102,6 +80,6 @@ fi # Logging log_history "disabled ssl support for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-web-domain-stats b/bin/v-delete-web-domain-stats index bd5627a6..34c35f56 100755 --- a/bin/v-delete-web-domain-stats +++ b/bin/v-delete-web-domain-stats @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -65,6 +65,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$STATS' '' # Logging log_history "disabled web log analyzer for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-web-domain-stats-user b/bin/v-delete-web-domain-stats-user index 6e1008ba..c0067271 100755 --- a/bin/v-delete-web-domain-stats-user +++ b/bin/v-delete-web-domain-stats-user @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -56,6 +56,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$STATS_CRYPT' '' # Logging log_history "disabled web stats password protection for $domain" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-delete-web-domains b/bin/v-delete-web-domains index dec2156a..1406abb9 100755 --- a/bin/v-delete-web-domains +++ b/bin/v-delete-web-domains @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART]' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -54,6 +54,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-generate-api-key b/bin/v-generate-api-key index 5fe2cc81..ba60b92f 100755 --- a/bin/v-generate-api-key +++ b/bin/v-generate-api-key @@ -11,7 +11,7 @@ keygen() { - cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-32} | head -n 1 + < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo; } KEYS='/usr/local/vesta/data/keys/' HASH=$(keygen) diff --git a/bin/v-generate-password-hash b/bin/v-generate-password-hash index fd917ad3..78a551fe 100755 --- a/bin/v-generate-password-hash +++ b/bin/v-generate-password-hash @@ -37,5 +37,10 @@ if ($crypt == 'htpasswd' ) { $hash = crypt($password, base64_encode($password)); } +// Generating DES hash +if ($crypt == 'des' ) { + $hash = crypt($password, $salt); +} + // Printing result echo $hash . "\n"; diff --git a/bin/v-generate-ssl-cert b/bin/v-generate-ssl-cert index e96edaa5..80912d78 100755 --- a/bin/v-generate-ssl-cert +++ b/bin/v-generate-ssl-cert @@ -1,6 +1,6 @@ #!/bin/bash # info: generate self signed certificate and CSR request -# options: DOMAIN EMAIL COUNTRY STATE CITY ORG UNIT [FORMAT] +# options: DOMAIN EMAIL COUNTRY STATE CITY ORG UNIT [ALIASES] [FORMAT] # # The function generates self signed SSL certificate and CSR request @@ -11,8 +11,7 @@ # Argument definition domain=$1 -domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g') -domain=$(echo $domain | tr '[:upper:]' '[:lower:]') +domain=$(echo $domain |sed -e 's/\.*$//g' -e 's/^\.*//g') domain_alias=$domain email=$2 country=$3 @@ -20,7 +19,8 @@ state=$4 city=$5 org=$6 org_unit=$7 -format=${8-shell} +aliases=$8 +format=${9-shell} KEY_SIZE=2048 DAYS=365 @@ -35,7 +35,8 @@ json_list_ssl() { echo -e "\t\"$domain\": {" echo " \"CRT\": \"$crt\"," echo " \"KEY\": \"$key\"," - echo " \"CSR\": \"$csr\"" + echo " \"CSR\": \"$csr\"," + echo " \"DIR\": \"$workdir\"" echo -e "\t}\n}" } @@ -50,51 +51,73 @@ shell_list_ssl() { if [ ! -z "$csr" ]; then echo -e "\n$csr" fi + echo -e "\nDirectory: $workdir" } + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# -check_args '7' "$#" 'DOMAIN EMAIL COUNTRY STATE CITY ORG UNIT [FORMAT]' -validate_format 'domain_alias' 'format' +args_usage='DOMAIN EMAIL COUNTRY STATE CITY ORG UNIT [ALIASES] [FORMAT]' +check_args '7' "$#" "$args_usage" +is_format_valid 'domain_alias' 'format' #----------------------------------------------------------# # Action # #----------------------------------------------------------# +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +else + domain_idn=$domain +fi +if [[ "$email" = *[![:ascii:]]* ]]; then + email=$(idn -t --quiet -a $email) +fi + # Create temporary work directory workdir=$(mktemp -d) cd $workdir # Generate private key -export PASSPHRASE=gen_password -openssl genrsa -des3 \ - -out $domain.key \ - -passout env:PASSPHRASE $KEY_SIZE 2>/dev/null +openssl genrsa $KEY_SIZE > $domain.key 2>/dev/null # Generate the CSR subj="/C=$country/ST=$state/localityName=$city/O=$org" -subj="$subj/organizationalUnitName=$org_unit/commonName=$domain" +subj="$subj/organizationalUnitName=$org_unit/commonName=$domain_idn" subj="$subj/emailAddress=$email" +if [ -z "$aliases" ]; then + openssl req -sha256\ + -new \ + -batch \ + -subj "$subj" \ + -key $domain.key \ + -out $domain.csr #>/dev/null 2>&1 +else + for alias in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do + dns_aliases="${dns_aliases}DNS:$alias," + done + dns_aliases=$(echo $dns_aliases |sed "s/,$//") -openssl req -sha256\ - -new \ - -batch \ - -subj "$subj" \ - -key $domain.key \ - -out $domain.csr \ - -passin env:PASSPHRASE >/dev/null 2>&1 + if [ -e "/etc/ssl/openssl.cnf" ]; then + ssl_conf='/etc/ssl/openssl.cnf' + else + ssl_conf="/etc/pki/tls/openssl.cnf" + fi -# Remove passphrase -cp $domain.key $domain.key.tmp -openssl rsa \ - -in $domain.key.tmp \ - -out $domain.key \ - -passin env:PASSPHRASE >/dev/null 2>&1 -rm $domain.key.tmp + openssl req -sha256\ + -new \ + -batch \ + -subj "$subj" \ + -key $domain.key \ + -reqexts SAN \ + -config <(cat $ssl_conf \ + <(printf "[SAN]\nsubjectAltName=$dns_aliases")) \ + -out $domain.csr >/dev/null 2>&1 +fi # Generate the cert 1 year openssl x509 -req -sha256 \ @@ -103,6 +126,7 @@ openssl x509 -req -sha256 \ -signkey $domain.key \ -out $domain.crt >/dev/null 2>&1 + # Listing certificates if [ -e "$domain.crt" ]; then crt=$(cat $domain.crt | sed ':a;N;$!ba;s/\n/\\n/g' ) @@ -124,7 +148,7 @@ case $format in esac # Delete tmp dir -rm -rf $workdir +#rm -rf $workdir #----------------------------------------------------------# @@ -132,6 +156,6 @@ rm -rf $workdir #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-get-dns-domain-value b/bin/v-get-dns-domain-value index d8aa0179..1786e900 100755 --- a/bin/v-get-dns-domain-value +++ b/bin/v-get-dns-domain-value @@ -24,7 +24,7 @@ source $VESTA/func/main.sh #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN KEY' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -42,6 +42,6 @@ get_object_value 'dns' 'DOMAIN' "$domain" "$key" #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-get-mail-account-value b/bin/v-get-mail-account-value index 282c8198..556c61ce 100755 --- a/bin/v-get-mail-account-value +++ b/bin/v-get-mail-account-value @@ -25,7 +25,7 @@ source $VESTA/func/main.sh #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN KEY' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" is_object_valid "mail/$domain" 'ACCOUNT' "$account" @@ -44,6 +44,6 @@ get_object_value "mail/$domain" 'ACCOUNT' "$account" "$key" #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-get-mail-domain-value b/bin/v-get-mail-domain-value index da9abf16..616df282 100755 --- a/bin/v-get-mail-domain-value +++ b/bin/v-get-mail-domain-value @@ -24,7 +24,7 @@ source $VESTA/func/main.sh #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN KEY' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" @@ -42,6 +42,6 @@ get_object_value 'mail' 'DOMAIN' "$domain" "$key" #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-get-user-value b/bin/v-get-user-value index 415a764a..a832801a 100755 --- a/bin/v-get-user-value +++ b/bin/v-get-user-value @@ -22,7 +22,7 @@ source $VESTA/func/main.sh #----------------------------------------------------------# check_args '2' "$#" 'USER KEY' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" diff --git a/bin/v-get-web-domain-value b/bin/v-get-web-domain-value index 2c856937..eb6a63d0 100755 --- a/bin/v-get-web-domain-value +++ b/bin/v-get-web-domain-value @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN KEY' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" diff --git a/bin/v-insert-dns-domain b/bin/v-insert-dns-domain index be66b0a8..0a83c205 100755 --- a/bin/v-insert-dns-domain +++ b/bin/v-insert-dns-domain @@ -27,14 +27,14 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DATA [SRC] [FLUSH] [RESTART]' -validate_format 'user' 'data' +is_format_valid 'user' 'data' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" eval $data domain="$DOMAIN" if [ "$flush" = 'no' ]; then - is_domain_new 'dns' + is_domain_new 'dns' $domain fi @@ -54,10 +54,15 @@ if [ "$flush" ! = 'no' ]; then sed -i "/DOMAIN='$DOMAIN'/d" $USER_DATA/dns.conf 2> /dev/null fi +# Generating timestamp +time_n_date=$(date +'%T %F') +time=$(echo "$time_n_date" |cut -f 1 -d \ ) +date=$(echo "$time_n_date" |cut -f 2 -d \ ) + # Prepare values for the insert dns_rec="DOMAIN='$DOMAIN' IP='$IP' TPL='$TPL' TTL='$TTL' EXP='$EXP'" dns_rec="$dns_rec SOA='$SOA' SERIAL="$SERIAL" SRC='$src' RECORDS='$RECORDS'" -dns_rec="$dns_rec SUSPENDED='$SUSPENDED' TIME='$TIME' DATE='$DATE'" +dns_rec="$dns_rec SUSPENDED='$SUSPENDED' TIME='$time' DATE='$date'" echo "$dns_rec" >> $USER_DATA/dns.conf # Set permission @@ -75,6 +80,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-insert-dns-record b/bin/v-insert-dns-record index 12bf1fd4..90205f61 100755 --- a/bin/v-insert-dns-record +++ b/bin/v-insert-dns-record @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN DATA [RESTART]' -validate_format 'user' 'domain' 'data' +is_format_valid 'user' 'domain' 'data' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -51,6 +51,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-insert-dns-records b/bin/v-insert-dns-records index 9030ba74..3ce767f8 100755 --- a/bin/v-insert-dns-records +++ b/bin/v-insert-dns-records @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN DATAFILE [RESTART]' -validate_format 'user' 'domain' 'data_file' +is_format_valid 'user' 'domain' 'data_file' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -54,6 +54,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-list-backup-host b/bin/v-list-backup-host index 125a1dd9..60e80fa1 100755 --- a/bin/v-list-backup-host +++ b/bin/v-list-backup-host @@ -1,6 +1,6 @@ #!/bin/bash # info: list backup host -# options: TYPE [FORMAT] +# options: TYPE HOST [FORMAT] # # The function for obtaining the list of backup host parameters. @@ -10,46 +10,55 @@ #----------------------------------------------------------# # Argument definition -TYPE=$1 +type=$1 format=${2-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_ftp_host() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - ip_data=$(cat $VESTA/conf/$TYPE.backup.conf) +# JSON list function +json_list() { echo '{' - echo -e "\t\"$TYPE\": {" - eval $ip_data - for field in $fields; do - eval value=$field - if [ $fileds_count -eq $i ]; then - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - fi - (( ++i)) - done - if [ -n "$value" ]; then - echo -e ' }' - fi - echo -e '}' + echo ' "'$type'": { + "HOST": "'$HOST'", + "USERNAME": "'$USERNAME'", + "PORT": "'$PORT'", + "TYPE": "'$type'", + "BPATH": "'$BPATH'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell function -shell_list_ftp_host() { - line=$(cat $VESTA/conf/$TYPE.backup.conf) - eval $line - for field in $fields; do - eval key="$field" - if [ -z "$key" ]; then - key='NULL' - fi - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + echo "HOST: $HOST" + echo "USERNAME: $USERNAME" + echo "PORT: $PORT" + echo "TYPE: $type" + echo "PATH: $BPATH" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -e "$HOST\t$USERNAME\t$PORT\t$type\t$BPATH\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo "HOST,USERNAME,PORT,TYPE,PATH,TIME,DATE" + echo "$HOST,$USERNAME,$PORT,$type,$BPATH,$TIME,$DATE" +} + +# Type format validator +is_type_format_valid() { + exclude="[!|#|$|^|&|(|)|+|=|{|}|:|@|<|>|?|/|\|\"|'|;|%|\`| ]|\." + if [[ "$1" =~ $exclude ]]; then + check_result $E_INVALID "invalid type extention format :: $1" + fi } @@ -58,25 +67,27 @@ shell_list_ftp_host() { #----------------------------------------------------------# check_args '1' "$#" 'TYPE [FORMAT]' +is_type_format_valid "$type" #----------------------------------------------------------# # Action # #----------------------------------------------------------# -if [ ! -e "$VESTA/conf/$TYPE.backup.conf" ]; then +# Checking backup config +if [ ! -e "$VESTA/conf/$type.backup.conf" ]; then exit fi -# Defining fileds to select -fields='$HOST $USERNAME $PORT $TYPE $BPATH $TIME $DATE' +# Parsing backup config +source "$VESTA/conf/$type.backup.conf" -# Listing database -case $format in - json) json_list_ftp_host ;; - plain) nohead=1; shell_list_ftp_host;; - shell) shell_list_ftp_host | column -t ;; - *) check_args '2' '0' '[FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-cron-job b/bin/v-list-cron-job index 45015345..8aa17685 100755 --- a/bin/v-list-cron-job +++ b/bin/v-list-cron-job @@ -2,7 +2,7 @@ # info: list cron job # options: USER JOB [FORMAT] # -# The function of obtaining cron job settings. +# The function of obtaining cron job parameters. #----------------------------------------------------------# @@ -17,44 +17,46 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_job() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - line=$(grep "JOB='$job'" $conf) - echo '{' - eval $line - for field in $fields; do - eval value=$field - value=$(echo "$value"|sed -e 's/"/\\"/g' -e "s/%quote%/'/g") - if [ "$i" -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ "$fileds_count" -eq "$i" ]; then - echo -e "\t\t\"${field//$/}\": \"$value\"" - else - echo -e "\t\t\"${field//$/}\": \"$value\"," - fi - fi - (( ++i)) - done - if [ -n "$value" ]; then - echo -e ' }' - fi - echo -e "}" +# JSON list function +json_list() { + echo "{" + echo -n ' "'$job'": { + "MIN": "'$MIN'", + "HOUR": "'$HOUR'", + "DAY": "'$HOUR'", + "MONTH": "'$MONTH'", + "WDAY": "'$WDAY'", + "CMD": "'$CMD'", + "JOB": "'$JOB'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo + echo '}' } -# Shell function -shell_list_job() { - line=$(grep "JOB='$job'" $conf) - eval $line - for field in $fields; do - eval key="$field" - if [ -z "$key" ]; then - key=NULL - fi - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + echo "MINUTE: $MIN" + echo "HOUR: $HOUR" + echo "DAY: $DAY" + echo "DAY OF WEEK: $WDAY" + echo "COMMAND: $CMD" + echo "SUSPENDED: $SUSPENDED" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -e "$MIN\t$HOUR\t$DAY\t$WDAY\t$CMD\t$SUSPENDED\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo "MIN,HOUR,DAY,WDAY,CMD,SUSPENDED,TIME,DATE" + echo "$MIN,$HOUR,$DAY,$WDAY,\"$CMD\",$SUSPENDED,$TIME,$DATE'" } @@ -63,6 +65,8 @@ shell_list_job() { #----------------------------------------------------------# check_args '2' "$#" 'USER JOB [FORMAT]' +is_format_valid 'user' +is_number_format_valid "$job" "job_id" is_object_valid 'user' 'USER' "$user" @@ -70,17 +74,27 @@ is_object_valid 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -# Defining config and fields to select +# Defining config conf=$USER_DATA/cron.conf -fields="\$JOB \$MIN \$HOUR \$DAY \$MONTH \$WDAY \$CMD \$SUSPENDED" -fields="$fields \$TIME \$DATE" -# Listing domains -case $format in - json) json_list_job ;; - plain) nohead=1; shell_list_job ;; - shell) shell_list_job |column -t ;; - *) check_args '2' '0' 'USER JOB [FORMAT]' +# Checking job id +cron_line=$(grep "JOB='$job'" $conf) +if [ -z "$cron_line" ]; then + check_result $E_NOTEXIST "cron job $job doesn't exist" +fi + +# Parsing cron job +eval $cron_line + +# Replacing quoted and backslahed text +CMD=$(echo "$CMD" |sed -e 's/"/\\"/g' -e "s/%quote%/'/g") + +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-cron-jobs b/bin/v-list-cron-jobs index 5580b074..d9b5c379 100755 --- a/bin/v-list-cron-jobs +++ b/bin/v-list-cron-jobs @@ -16,53 +16,71 @@ format=${2-shell} # Includes source $VESTA/func/main.sh -# Json list function -json_list_cron() { - echo '{' - fileds_count=$(echo $fields| wc -w ) - while read line; do - eval $line - if [ -n "$data" ]; then - echo -e ' },' +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep JOB $USER_DATA/cron.conf |wc -l) + echo "{" + while read str; do + eval $str + CMD=$(echo "$CMD" |sed -e 's/"/\\"/g' -e "s/%quote%/'/g") + echo -n ' "'$JOB'": { + "MIN": "'$MIN'", + "HOUR": "'$HOUR'", + "DAY": "'$DAY'", + "MONTH": "'$MONTH'", + "WDAY": "'$WDAY'", + "CMD": "'$CMD'", + "JOB": "'$JOB'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo fi - i=1 - IFS=' ' - for field in $fields; do - eval value=\"$field\" - value=$(echo "$value"|sed -e 's/"/\\"/g' -e "s/%quote%/'/g") - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - data=1 - fi - fi - done - done < $conf - if [ -n "$data" ]; then - echo -e ' }' - fi - echo -e '}' + ((i++)) + done < <(cat $USER_DATA/cron.conf) + echo '}' } -# Shell list function -shell_list_cron() { - if [ -z "$nohead" ] ; then - echo "${fields//$/}" - for a in $fields; do - echo -e "------ \c" - done - echo - fi - while read line ; do - eval $line - eval echo "$fields" | sed -e "s/%quote%/'/g" - done < $conf + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "JOB^MIN^HOUR^MONTH^WDAY^COMMAND" + echo "---^---^----^-----^----^-------" + while read str; do + eval $str + CMD=$(echo "$CMD" |sed -e 's/"/\\"/g' -e "s/%quote%/'/g") + echo "$JOB^$MIN^$HOUR^$MONTH^$WDAY^$CMD" + done < <(cat $USER_DATA/cron.conf) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + CMD=$(echo "$CMD" |sed -e 's/"/\\"/g' -e "s/%quote%/'/g") + echo -ne "$JOB\t$MIN\t$HOUR\t$MONTH\t$WDAY\t$CMD\t" + echo -e "$SUSPENDED\t$TIME\t$DATE" + done < <(cat $USER_DATA/cron.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "MIN,HOUR,DAY,WDAY,CMD,SUSPENDED,TIME,DATE" + while read str; do + eval $str + CMD=$(echo "$CMD" |sed -e 's/"/\\"/g' -e "s/%quote%/'/g") + echo -n "$JOB,$MIN,$HOUR,$MONTH,$WDAY,\"$CMD\"," + echo "$SUSPENDED,$TIME,$DATE" + done < <(cat $USER_DATA/cron.conf) } @@ -71,7 +89,7 @@ shell_list_cron() { #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -79,23 +97,12 @@ is_object_valid 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -# Defining config -conf=$USER_DATA/cron.conf - -# Defining fileds to select -fields='$JOB $MIN $HOUR $DAY $MONTH $WDAY $CMD $JOB $SUSPENDED $TIME $DATE' - -# Listing domains -case $format in - json) json_list_cron ;; - plain) nohead=1; - fields="\"\$JOB\" \"\$SUSPENDED\" \"\$MIN\" \"\$HOUR\" \"\$DAY\"" - fields="$fields \"\$MONTH\" \"\$WDAY\" \"\$CMD\" "; - fields="$fields \"\$TIME\" \"\$DATE\"" - shell_list_cron ;; - shell) fields='$JOB~$SUSPENDED~$MIN~$HOUR~$DAY~$MONTH~$WDAY~$CMD'; - shell_list_cron |column -t -s '~';; - *) check_args '1' '0' 'USER [FORMAT]' ;; +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t -s '^';; esac diff --git a/bin/v-list-database b/bin/v-list-database index 295d934f..420d0e69 100755 --- a/bin/v-list-database +++ b/bin/v-list-database @@ -17,40 +17,46 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_db() { - i=1 - last_word=$(echo "$fields" | wc -w) - line=$(grep "DB='$database'" $conf) +# JSON list function +json_list() { echo '{' - eval $line - for field in $fields; do - eval value=$field - if [ "$i" -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ "$last_word" -eq "$i" ]; then - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - fi - fi - (( ++i)) - done - if [ -n "$value" ]; then - echo -e "\t}" - fi - echo -e '}' + echo ' "'$database'": { + "DATABASE": "'$DB'", + "DBUSER": "'$DBUSER'", + "HOST": "'$HOST'", + "TYPE": "'$TYPE'", + "CHARSET": "'$CHARSET'", + "U_DISK": "'$U_DISK'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell list for single database -shell_list_db() { - line=$(grep "DB='$database'" $conf) - eval $line - for field in $fields; do - eval key="$field" - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + echo "DATABASE: $DB" + echo "DB USER: $DBUSER" + echo "HOST: $HOST" + echo "TYPE: $TYPE" + echo "CHARSET: $CHARSET" + echo "DISK: $U_DISK" + echo "SUSPENDED: $SUSPENDED" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -ne "$DB\t$DBUSER\t$HOST\t$TYPE\t$CHARSET\t$U_DISK\t" + echo -e "$SUSPENDED\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo "DATABASE,DBUSER,HOST,TYPE,CHARSET,U_DISK,SUSPENDED,TIME,DATE" + echo "$DB,$DBUSER,$HOST,$TYPE,$CHARSET,$U_DISK,$SUSPENDED,$TIME,$DATE" } @@ -59,7 +65,7 @@ shell_list_db() { #----------------------------------------------------------# check_args '2' "$#" 'USER DATABASE [FORMAT]' -validate_format 'user' 'database' +is_format_valid 'user' 'database' is_object_valid 'user' 'USER' "$user" is_object_valid 'db' 'DB' "$database" @@ -68,17 +74,15 @@ is_object_valid 'db' 'DB' "$database" # Action # #----------------------------------------------------------# +# Parsing database +eval $(grep "DB='$database'" $USER_DATA/db.conf) -# Defining fileds to select -conf=$USER_DATA/db.conf -fields='$DB $DBUSER $HOST $TYPE $CHARSET $U_DISK $SUSPENDED $TIME $DATE' - -# Listing database -case $format in - json) json_list_db ;; - plain) shell_list_db ;; - shell) shell_list_db | column -t ;; - *) check_args '2' '0' 'USER DATABASE [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-database-host b/bin/v-list-database-host index b38b6467..326764af 100755 --- a/bin/v-list-database-host +++ b/bin/v-list-database-host @@ -1,8 +1,8 @@ #!/bin/bash -# info: list database server +# info: list database host # options: TYPE HOST [FORMAT] # -# The function for obtaining database server parameters. +# The function for obtaining database host parameters. #----------------------------------------------------------# @@ -17,40 +17,58 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_dbhost() { - i=1 - fields_count=$(echo "$fields" | wc -w) - line=$(grep "HOST='$host'" $conf) +# JSON list function +json_list() { echo '{' - eval $line - for field in $fields; do - eval value=$field - if [ "$i" -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ "$fields_count" -eq "$i" ]; then - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - fi - fi - (( ++i)) - done - if [ -n "$value" ]; then - echo -e "\t}" - fi - echo -e "}" + echo ' "'$HOST'": { + "HOST": "'$HOST'", + "TYPE": "'$type'", + "CHARSETS": "'$CHARSETS'", + "MAX_DB": "'$MAX_DB'", + "U_SYS_USERS": "'$U_SYS_USERS'", + "U_DB_BASES": "'$U_DB_BASES'", + "TPL": "'$TPL'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell function -shell_list_dbhost() { - line=$(grep "HOST='$host'" $conf) - eval $line - for field in $fields; do - eval key="$field" - echo "${field//$/}: $key" - done +# SHELL list function +shell_list() { + echo "HOST: $HOST" + echo "TYPE: $type" + echo "CHARSETS: $CHARSETS" + echo "MAX_DB: $MAX_DB" + echo "U_DB_BASES: $U_DB_BASES" + echo "U_SYS_USERS: $U_SYS_USERS" + echo "TPL: $TPL" + echo "SUSPENDED: $SUSPENDED" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -ne "$HOST\t$type\t$CHARSETS\t$MAX_DB\t$U_SYS_USERS\t" + echo -e "$U_DB_BASES\t$TPL\t$SUSPENDED\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo -n "HOST,TYPE,CHARSETS,MAX_DB,U_SYS_USERS," + echo "U_DB_BASES,TPL,SUSPENDED,TIME,DATE'" + echo -n "$HOST,$type,\"$CHARSETS\",$MAX_DB,\"$U_SYS_USERS\"," + echo "$U_DB_BASES,$TPL,$SUSPENDED,$TIME,$DATE" +} + +# Type format validator +is_type_format_valid() { + exclude="[!|#|$|^|&|(|)|+|=|{|}|:|@|<|>|?|/|\|\"|'|;|%|\`| ]|\." + if [[ "$1" =~ $exclude ]]; then + check_result $E_INVALID "invalid type extention format :: $1" + fi } @@ -59,7 +77,7 @@ shell_list_dbhost() { #----------------------------------------------------------# check_args '2' "$#" 'TYPE HOST [FORMAT]' -validate_format 'host' +is_type_format_valid "$type" is_object_valid "../../conf/$type" 'HOST' "$host" @@ -67,17 +85,15 @@ is_object_valid "../../conf/$type" 'HOST' "$host" # Action # #----------------------------------------------------------# -# Defining fileds to select -conf=$VESTA/conf/$type.conf -fields='$HOST $CHARSETS $MAX_DB $U_SYS_USERS $U_DB_BASES $TPL $SUSPENDED' -fields="$fields \$TIME \$DATE" +# Parsing hosts +eval $(grep "HOST='$host'" $VESTA/conf/$type.conf) -# Listing database -case $format in - json) json_list_dbhost ;; - plain) nohead=1; shell_list_dbhost ;; - shell) shell_list_dbhost | column -t;; - *) check_args '2' '0' 'TYPE HOST [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-database-hosts b/bin/v-list-database-hosts index d7e9e0fe..1355a5a4 100755 --- a/bin/v-list-database-hosts +++ b/bin/v-list-database-hosts @@ -1,8 +1,8 @@ #!/bin/bash -# info: list database servers -# options: TYPE [FORMAT] +# info: list database hosts +# options: [FORMAT] # -# The function for obtaining the list of all hosts of the same databases' type. +# The function for obtaining the list of all configured database hosts. #----------------------------------------------------------# @@ -10,37 +10,122 @@ #----------------------------------------------------------# # Argument definition -type=${1-mysql} -format=${2-shell} +format=${1-shell} # Includes source $VESTA/func/main.sh +source $VESTA/conf/vesta.conf + +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=0 + for type in $(echo $DB_SYSTEM |sed -e 's/,/\n/'); do + if [ -e "$VESTA/conf/$type.conf" ]; then + db_hosts=$(grep HOST $VESTA/conf/$type.conf |wc -l) + objects=$((objects + db_hosts)) + fi + done + + echo "[" + for type in $(echo $DB_SYSTEM |sed -e 's/,/\n/'); do + if [ -e "$VESTA/conf/$type.conf" ]; then + for str in $(cat $VESTA/conf/$type.conf); do + eval $str + echo -n ' { + "HOST": "'$HOST'", + "TYPE": "'$type'", + "CHARSETS": "'$CHARSETS'", + "MAX_DB": "'$MAX_DB'", + "U_SYS_USERS": "'$U_SYS_USERS'", + "U_DB_BASES": "'$U_DB_BASES'", + "TPL": "'$TPL'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done + fi + done + echo ']' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "HOST TYPE MAX_DB DB_USED SPND TIME DATE" + echo "---- ---- ------ ------- ---- ---- ----" + for type in $(echo $DB_SYSTEM |sed -e 's/,/\n/'); do + if [ -e "$VESTA/conf/$type.conf" ]; then + for str in $(cat $VESTA/conf/$type.conf); do + eval $str + echo "$HOST $type $MAX_DB $U_DB_BASES $SUSPENDED $TIME $DATE" + done + fi + done +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + for type in $(echo $DB_SYSTEM |sed -e 's/,/\n/'); do + if [ -e "$VESTA/conf/$type.conf" ]; then + for str in $(cat $VESTA/conf/$type.conf); do + eval $str + echo -ne "$HOST\t$type\t$CHARSETS\t$MAX_DB\t$U_SYS_USERS\t" + echo -e "$U_DB_BASES\t$TPL\t$SUSPENDED\t$TIME\t$DATE" + done + fi + done +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo -n "HOST,TYPE,CHARSETS,MAX_DB,U_SYS_USERS," + echo "U_DB_BASES,TPL,SUSPENDED,TIME,DATE" + for type in $(echo $DB_SYSTEM |sed -e 's/,/\n/'); do + if [ -e "$VESTA/conf/$type.conf" ]; then + for str in $(cat $VESTA/conf/$type.conf); do + eval $str + echo -n "$HOST,$type,\"$CHARSETS\",$MAX_DB,\"$U_SYS_USERS\"," + echo "$U_DB_BASES,$TPL,$SUSPENDED,$TIME,$DATE" + done + fi + done +} + +# Type format validator +is_type_format_valid() { + exclude="[!|#|$|^|&|(|)|+|=|{|}|:|@|<|>|?|/|\|\"|'|;|%|\`| ]|\." + if [[ "$1" =~ $exclude ]]; then + check_result $E_INVALID "invalid type extention format :: $1" + fi +} #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# -# Checking args -#check_args '1' "$#" 'TYPE [FORMAT]' - #----------------------------------------------------------# # Action # #----------------------------------------------------------# -# Defining fileds to select -conf=$VESTA/conf/$type.conf -fields='$HOST $CHARSETS $MAX_DB $U_SYS_USERS $U_DB_BASES $TPL $SUSPENDED' -fields="$fields \$TIME \$DATE" - -# Listing database -case $format in +# Listing data +case $format in json) json_list ;; - plain) nohead=1; shell_list;; - shell) fields='$HOST $MAX_DB $U_DB_BASES $SUSPENDED $DATE'; - shell_list | column -t ;; - *) check_args '2' '0' 'TYPE [FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-database-types b/bin/v-list-database-types index 20e6044f..13f8edad 100755 --- a/bin/v-list-database-types +++ b/bin/v-list-database-types @@ -16,31 +16,40 @@ format=${1-shell} source $VESTA/func/main.sh source $VESTA/conf/vesta.conf -# Json function -json_list_dbtypes() { - types=$(echo "${DB_SYSTEM//,/ }") - t_counter=$(echo "$types" | wc -w) +# JSON list function +json_list() { + objects=$(echo "${DB_SYSTEM//,/ }" |wc -w) i=1 echo '[' - for type in $types; do - if [ "$i" -lt "$t_counter" ]; then - echo -e "\t\"$type\"," + for type in ${DB_SYSTEM//,/ }; do + echo -n ' "'$type'"' + if [ "$i" -lt "$objects" ]; then + echo ',' else - echo -e "\t\"$type\"" + echo fi - (( ++i)) + ((i++)) done echo "]" } -# Shell function -shell_list_dbtypes() { - types=$(echo "${DB_SYSTEM//,/ }") - if [ -z "$nohead" ]; then - echo "TYPES" - echo "----------" - fi - for type in $types; do +# SHELL list function +shell_list() { + echo -e "TYPE\n----" + echo "$DB_SYSTEM" |sed -e "s/,/\n/" +} + +# PLAIN list function +plain_list() { + for type in ${DB_SYSTEM//,/ }; do + echo "$type" + done +} + +# CSV list function +csv_list() { + echo "TYPE" + for type in ${DB_SYSTEM//,/ }; do echo "$type" done } @@ -50,12 +59,12 @@ shell_list_dbtypes() { # Action # #----------------------------------------------------------# -# Listing domains -case $format in - json) json_list_dbtypes ;; - plain) nohead=1; shell_list_dbtypes ;; - shell) shell_list_dbtypes ;; - *) check_args '1' '0' '[FORMAT]' ;; +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list;; esac diff --git a/bin/v-list-databases b/bin/v-list-databases index 538f9649..b3e83b1d 100755 --- a/bin/v-list-databases +++ b/bin/v-list-databases @@ -16,13 +16,73 @@ format=${2-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep "DB=" $USER_DATA/db.conf |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$DB'": { + "DATABASE": "'$DB'", + "DBUSER": "'$DBUSER'", + "HOST": "'$HOST'", + "TYPE": "'$TYPE'", + "CHARSET": "'$CHARSET'", + "U_DISK": "'$U_DISK'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $USER_DATA/db.conf) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "DATABASE USER HOST TYPE DISK SPND DATE" + echo "-------- ---- ---- ---- ---- ---- ----" + while read str; do + eval $str + echo "$DB $DBUSER $HOST $TYPE $U_DISK $SUSPENDED $DATE" + done < <(cat $USER_DATA/db.conf) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -ne "$DB\t$DBUSER\t$HOST\t$TYPE\t$CHARSET\t$U_DISK\t" + echo -e "$SUSPENDED\t$TIME\t$DATE" + done < <(cat $USER_DATA/db.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "DATABASE,DBUSER,HOST,TYPE,CHARSET,U_DISK,SUSPENDED,TIME,DATE" + while read str; do + eval $str + echo "$DB,$DBUSER,$HOST,$TYPE,$CHARSET,$U_DISK,$SUSPENDED,$TIME,$DATE" + done < <(cat $USER_DATA/db.conf) +} + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -30,17 +90,12 @@ is_object_valid 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -# Defining fileds to select -conf=$USER_DATA/db.conf -fields='$DB $DBUSER $HOST $TYPE $CHARSET $U_DISK $SUSPENDED $TIME $DATE' - -# Listing databases -case $format in +# Listing data +case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$DB $DBUSER $HOST $TYPE $U_DISK $DATE'; - shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-dns-domain b/bin/v-list-dns-domain index 51e9d183..f72943f9 100755 --- a/bin/v-list-dns-domain +++ b/bin/v-list-dns-domain @@ -2,8 +2,7 @@ # info: list dns domain # options: USER DOMAIN [FORMAT] # -# The function of obtaining the list of domain parameters. This call, just as -# all v_list_* calls, supports 3 formats - json, shell and plain. +# The function of obtaining the list of dns domain parameters. #----------------------------------------------------------# @@ -18,57 +17,52 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_domain() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - line=$(grep "DOMAIN='$domain'" $conf) - - # Print top bracket +# JSON list function +json_list() { echo '{' - - # Assing key=value - eval $line - - # Starting output loop - for field in $fields; do - # Parsing key=value - eval value=$field - - # Checking first field - if [ "$i" -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ "$fileds_count" -eq "$i" ]; then - echo -e "\t\t\"${field//$/}\": \"$value\"" - else - echo -e "\t\t\"${field//$/}\": \"$value\"," - fi - fi - # Updating iterator - (( ++i)) - done - - # If there was any output - if [ -n "$value" ]; then - echo -e ' }' - fi - # Printing bottom json bracket - echo -e "}" + echo ' "'$DOMAIN'": { + "IP": "'$IP'", + "TPL": "'$TPL'", + "TTL": "'$TTL'", + "EXP": "'$EXP'", + "SOA": "'$SOA'", + "SERIAL": "'$SERIAL'", + "SRC": "'$SRC'", + "RECORDS": "'$RECORDS'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell function -shell_list_domain() { - line=$(grep "DOMAIN='$domain'" $conf) +# SHELL list function +shell_list() { + echo "DOMAIN: $DOMAIN" + echo "IP: $IP" + echo "TEMPLATE: $TPL" + echo "TTL: $TTL" + echo "EXP: $EXP" + echo "SOA: $SOA" + echo "SERIAL: $SERIAL" + echo "RECORDS: $RECORDS" + echo "SUSPENDED: $SUSPENDED" + echo "TIME: $TIME" + echo "DATE: $DATE" +} - # Parsing key=value - eval $line - # Print result line - for field in $fields; do - eval key="$field" - echo "${field//$/}: $key " - done +# PLAIN list function +plain_list() { + echo -ne "$DOMAIN\t$IP\t$TPL\t$TTL\t$EXP\t$SOA\t$SERIAL\t$RECORDS\t" + echo -e "$SUSPENDED\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo "DOMAIN,IP,TPL,TTL,EXP,SOA,SERIAL,RECORDS,SUSPENDED,TIME,DATE" + echo -n "$DOMAIN,$IP,$TPL,$TTL,$EXP,$SOA,$SERIAL,$RECORDS,$SUSPENDED," + echo "$TIME,$DATE" } @@ -85,17 +79,15 @@ is_object_valid 'dns' 'DOMAIN' "$domain" # Action # #----------------------------------------------------------# -# Defining config and fields to select -conf=$USER_DATA/dns.conf -fields='$DOMAIN $IP $TPL $TTL $EXP $SOA $SERIAL $SRC $RECORDS - $SUSPENDED $TIME $DATE' +# Parsing domain +eval $(grep "DOMAIN='$domain'" $USER_DATA/dns.conf) -# Listing domains -case $format in - json) json_list_domain ;; - plain) nohead=1; shell_list_domain ;; - shell) shell_list_domain |column -t ;; - *) check_args '2' '0' 'USER DOMAIN [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-dns-domains b/bin/v-list-dns-domains index 38c5e195..337760e3 100755 --- a/bin/v-list-dns-domains +++ b/bin/v-list-dns-domains @@ -16,13 +16,78 @@ format=${2-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep DOMAIN $USER_DATA/dns.conf |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$DOMAIN'": { + "IP": "'$IP'", + "TPL": "'$TPL'", + "TTL": "'$TTL'", + "EXP": "'$EXP'", + "SOA": "'$SOA'", + "SERIAL": "'$SERIAL'", + "SRC": "'$SRC'", + "RECORDS": "'$RECORDS'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $USER_DATA/dns.conf) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "DOMAIN IP TPL TTL REC SPND DATE" + echo "------ -- --- --- --- ---- ----" + while read str; do + eval $str + echo "$DOMAIN $IP $TPL $TTL $RECORDS $SUSPENDED $DATE" + done < <(cat $USER_DATA/dns.conf) +} + + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -ne "$DOMAIN\t$IP\t$TPL\t$TTL\t$EXP\t$SOA\t$SERIAL\t" + echo -e "$SRC\t$RECORDS\t$SUSPENDED\t$TIME\t$DATE" + done < <(cat $USER_DATA/dns.conf) +} + + +# CSV list function +csv_list() { + IFS=$'\n' + echo "DOMAIN,IP,TPL,TTL,EXP,SOA,SERIAL,SRC,RECORDS,SUSPENDED,TIME,DATE" + while read str; do + eval $str + echo -n "$DOMAIN,$IP,$TPL,$TTL,$EXP,$SOA,$SERIAL," + echo "$SRC,$RECORDS,$SUSPENDED,$TIME,$DATE" + done < <(cat $USER_DATA/dns.conf) +} + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -30,18 +95,12 @@ is_object_valid 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -# Defining config and fields -conf=$USER_DATA/dns.conf -fields='$DOMAIN $IP $TPL $TTL $EXP $SOA $SERIAL $SRC $RECORDS - $SUSPENDED $TIME $DATE' - -# Listing domains -case $format in +# Listing data +case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$DOMAIN $IP $TPL $EXP $DATE'; - shell_list| column -t ;; - *) check_args '1' '0' 'USER [FORMAT]';; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-dns-domains-src b/bin/v-list-dns-domains-src deleted file mode 100755 index 50fc23db..00000000 --- a/bin/v-list-dns-domains-src +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -# info: list dns domains -# options: USER [FORMAT] -# -# The function for obtaining all DNS domains of a user. - - -#----------------------------------------------------------# -# Variable&Function # -#----------------------------------------------------------# - -# Argument definition -user=$1 -format=${2-shell} - -# Includes -source $VESTA/func/main.sh - - -#----------------------------------------------------------# -# Verifications # -#----------------------------------------------------------# - -check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' -is_object_valid 'user' 'USER' "$user" - - -#----------------------------------------------------------# -# Action # -#----------------------------------------------------------# - -# Defining config and fields -conf=$USER_DATA/dns.conf -fields='$DOMAIN $IP $TPL $TTL $EXP $SOA $SRC $RECORDS $SUSPENDED $TIME $DATE' - -# Listing domains -case $format in - json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$DOMAIN $IP $SRC $DATE'; - shell_list| column -t ;; - *) check_args '1' '0' 'USER [FORMAT]';; -esac - - -#----------------------------------------------------------# -# Vesta # -#----------------------------------------------------------# - -exit diff --git a/bin/v-list-dns-records b/bin/v-list-dns-records index 1e34202c..d23634d6 100755 --- a/bin/v-list-dns-records +++ b/bin/v-list-dns-records @@ -17,56 +17,67 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json func -json_list_dns() { - echo '{' - fileds_count=$(echo $fields| wc -w ) - while read line; do - IFS=$'\n' - eval $line - if [ -n "$data" ]; then - echo -e ' },' +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep ID $USER_DATA/dns/$domain.conf |wc -l) + echo "{" + while read str; do + eval $str + VALUE=$(echo "$VALUE" |sed -e 's/"/\\"/g' -e "s/%quote%/'/g") + echo -n ' "'$ID'": { + "RECORD": "'$RECORD'", + "TYPE": "'$TYPE'", + "PRIORITY": "'$PRIORITY'", + "VALUE": "'$VALUE'", + "ID": "'$ID'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo fi - i=1 - IFS=' ' - for field in $fields; do - eval value=\"$field\" - value=$(echo "$value" | sed -e 's/"/\\"/g' -e "s/%quote%/'/g") - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - data=1 - fi - fi - done - done < $conf - if [ -n "$data" ]; then - echo -e ' }' - fi - echo -e '}' + ((i++)) + done < <(cat $USER_DATA/dns/$domain.conf) + echo '}' } -# Shell function -shell_list_dns() { +# SHELL list function +shell_list() { + IFS=$'\n' + echo "ID^RECORD^TYPE^VALUE^DATE" + echo "--^------^----^-----^----" + while read str; do + eval $str + echo "$ID^$RECORD^$TYPE^${VALUE:0:30}^$DATE" + done < <(cat $USER_DATA/dns/$domain.conf) +} - if [ -z "$nohead" ] ; then - echo "${fields//$/}" - for a in $fields; do - echo -e "------ \c" - done - echo - fi - while read line ; do - IFS=$'\n' - eval $line - eval echo "$fields" | sed "s/%quote%/'/g" - done < $conf +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + VALUE=$(echo "$VALUE" |sed -e "s/%quote%/\\'/g") + echo -ne "$ID\t$RECORD\t$TYPE\t$PRIORITY\t$VALUE\t" + echo -e "$SUSPENDED\t$TIME\t$DATE" + done < <(cat $USER_DATA/dns/$domain.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "ID,RECORD,TYPE,PRIORITY,VALUE,SUSPENDED,TIME,DATE" + while read str; do + eval $str + VALUE=$(echo "$VALUE" |sed -e "s/%quote%/\\'/g") + echo -n "$ID,$RECORD,$TYPE,$PRIORITY,\"$VALUE\"," + echo "$SUSPENDED,$TIME,$DATE" + done < <(cat $USER_DATA/dns/$domain.conf) } @@ -75,7 +86,7 @@ shell_list_dns() { #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [FORMAT]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -84,17 +95,12 @@ is_object_valid 'dns' 'DOMAIN' "$domain" # Action # #----------------------------------------------------------# -# Defining config and fields -conf=$USER_DATA/dns/$domain.conf -fields='$ID $RECORD $TYPE $PRIORITY $VALUE $ID $SUSPENDED $TIME $DATE' - -# Listing domains -case $format in - json) json_list_dns ;; - plain) nohead=1; shell_list_dns ;; - shell) fields='$ID $RECORD $TYPE $VALUE'; - shell_list_dns | column -t ;; - *) check_args '2' '0' 'USER DOMAIN [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t -s '^';; esac diff --git a/bin/v-list-dns-template b/bin/v-list-dns-template index 89c464c0..2697c175 100755 --- a/bin/v-list-dns-template +++ b/bin/v-list-dns-template @@ -17,55 +17,62 @@ format=${2-shell} source $VESTA/func/main.sh source $VESTA/func/domain.sh -# Json func -json_list_dns() { - echo '{' - fileds_count=$(echo $fields| wc -w ) - while read line; do - IFS=$'\n' - eval $line - if [ -n "$data" ]; then - echo -e ' },' +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep ID $DNSTPL/$template.tpl |wc -l) + echo "{" + while read str; do + eval $str + VALUE=$(echo "$VALUE" |sed -e 's/"/\\"/g' -e "s/%quote%/'/g") + echo -n ' "'$ID'": { + "RECORD": "'$RECORD'", + "TYPE": "'$TYPE'", + "PRIORITY": "'$PRIORITY'", + "VALUE": "'$VALUE'", + "ID": "'$ID'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo fi - i=1 - IFS=' ' - for field in $fields; do - eval value=\"$field\" - value=$(echo "$value" | sed -e 's/"/\\"/g' -e "s/%quote%/'/g") - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - data=1 - fi - fi - done - done < $conf - if [ -n "$data" ]; then - echo -e ' }' - fi - echo -e '}' + ((i++)) + done < <(cat $DNSTPL/$template.tpl) + echo '}' } -# Shell function -shell_list_dns() { - if [ -z "$nohead" ] ; then - echo "${fields//$/}" - for a in $fields; do - echo -e "------ \c" - done - echo - fi +# SHELL list function +shell_list() { + IFS=$'\n' + echo "ID^RECORD^TYPE^VALUE" + echo "--^------^----^-----" + while read str; do + eval $str + echo "$ID^$RECORD^$TYPE^$VALUE" + done < <(cat $DNSTPL/$template.tpl) +} - while read line ; do - eval $line - eval echo "$fields" | sed "s/%quote%/'/g" - done < $conf +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + VALUE=$(echo "$VALUE" |sed -e "s/%quote%/\\'/g") + echo -e "$ID\t$RECORD\t$TYPE\t$PRIORITY\t$VALUE" + done < <(cat $DNSTPL/$template.tpl) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "ID,RECORD,TYPE,PRIORITY,VALUE" + while read str; do + eval $str + VALUE=$(echo "$VALUE" |sed -e "s/%quote%/\\'/g") + echo "$ID,$RECORD,$TYPE,$PRIORITY,\"$VALUE\"" + done < <(cat $DNSTPL/$template.tpl) } @@ -74,24 +81,20 @@ shell_list_dns() { #----------------------------------------------------------# check_args '1' "$#" 'TEMPLATE [FORMAT]' -validate_format 'template' -is_dns_template_valid +is_format_valid 'template' +is_dns_template_valid "$template" #----------------------------------------------------------# # Action # #----------------------------------------------------------# -# Defining config and fields -conf=$DNSTPL/$template.tpl -fields='$RECORD $TYPE $PRIORITY $VALUE' - -# Listing templates -case $format in - json) json_list_dns ;; - plain) nohead=1; shell_list_dns ;; - shell) shell_list_dns | column -t ;; - *) check_args '1' '0' 'TEMPLATE [FORMAT]';; +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t -s '^';; esac diff --git a/bin/v-list-dns-templates b/bin/v-list-dns-templates index 6cffff38..dffdf482 100755 --- a/bin/v-list-dns-templates +++ b/bin/v-list-dns-templates @@ -15,30 +15,41 @@ format=${1-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_dnstpl() { - templates=$(ls -t $DNSTPL |grep '\.tpl' |cut -f 1 -d '.') - t_counter=$(echo "$templates" | wc -w) +# JSON list function +json_list() { + objects=$(echo "$templates" |wc -l) i=1 - echo '[' + echo "[" for template in $templates; do - if [ "$i" -lt "$t_counter" ]; then - echo -e "\t\"$template\"," + echo -n ' "'$template'"' + if [ "$i" -lt "$objects" ]; then + echo ',' else - echo -e "\t\"$template\"" + echo fi - (( ++i)) + ((i++)) done echo "]" + } -# Shell function -shell_list_dnstpl() { - templates=$(ls -t $DNSTPL |grep '\.tpl' |cut -f 1 -d '.') - if [ -z "$nohead" ]; then - echo "Templates" - echo "----------" - fi +# SHELL list function +shell_list() { + echo "TEMPLATE" + echo "--------" + ls -t $DNSTPL |grep '\.tpl' |cut -f 1 -d '.' +} + +# PLAIN list function +plain_list() { + for template in $templates; do + echo "$template" + done +} + +# CSV list function +csv_list() { + echo "TEMPLATE" for template in $templates; do echo "$template" done @@ -49,12 +60,15 @@ shell_list_dnstpl() { # Action # #----------------------------------------------------------# -# Listing domains -case $format in - json) json_list_dnstpl;; - plain) nohead=1; shell_list_dnstpl ;; - shell) shell_list_dnstpl ;; - *) check_args '1' '0' '[FORMAT] [LIMIT] [OFFSET]';; +# Defining template list +templates=$(ls -t $DNSTPL |grep '\.tpl' |cut -f 1 -d '.') + +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list;; esac diff --git a/bin/v-list-firewall b/bin/v-list-firewall index b4501037..5b0537c1 100755 --- a/bin/v-list-firewall +++ b/bin/v-list-firewall @@ -15,25 +15,77 @@ format=${1-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep RULE $VESTA/data/firewall/rules.conf |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$RULE'": { + "ACTION": "'$ACTION'", + "PROTOCOL": "'$PROTOCOL'", + "PORT": "'$PORT'", + "IP": "'$IP'", + "COMMENT": "'$COMMENT'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $VESTA/data/firewall/rules.conf) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "RULE^ACTION^PROTO^PORT^IP^SPND^DATE" + echo "----^------^-----^----^--^----^----" + while read str; do + eval $str + echo "$RULE^$ACTION^$PROTOCOL^$PORT^$IP^$SUSPENDED^$DATE" + done < <(cat $VESTA/data/firewall/rules.conf) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -ne "$RULE\t$ACTION\t$PROTOCOL\t$PORT\t$IP\t$COMMENT\t" + echo -e "$SUSPENDED\t$TIME\t$DATE" + done < <(cat $VESTA/data/firewall/rules.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "RULE,ACTION,PROTOCOL,PORT,IP,COMMENT,SUSPENDED,TIME,DATE" + while read str; do + eval $str + echo -n "$RULE,$ACTION,$PROTOCOL,$PORT,$IP,\"$COMMENT\"," + echo "$SUSPENDED,$TIME,$DATE" + done < <(cat $VESTA/data/firewall/rules.conf) +} + #----------------------------------------------------------# # Action # #----------------------------------------------------------# -# Defining config -conf=$VESTA/data/firewall/rules.conf - -# Defining fileds to select -fields="\$RULE \$ACTION \$PROTOCOL \$PORT \$IP \$COMMENT" -fields="$fields \$RULE \$SUSPENDED \$TIME \$DATE" - -# Listing domains -case $format in +# Listing data +case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields="\$ACTION \$PROTOCOL \$PORT \$IP"; - shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t -s '^' ;; esac diff --git a/bin/v-list-firewall-ban b/bin/v-list-firewall-ban index a73b863a..62a08120 100755 --- a/bin/v-list-firewall-ban +++ b/bin/v-list-firewall-ban @@ -15,24 +15,71 @@ format=${1-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep IP $VESTA/data/firewall/banlist.conf |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$IP'": { + "IP": "'$IP'", + "CHAIN": "'$CHAIN'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $VESTA/data/firewall/banlist.conf) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "IP CHAIN TIME DATE" + echo "-- ----- ---- ----" + while read str; do + eval $str + echo "$IP $CHAIN $TIME $DATE" + done < <(cat $VESTA/data/firewall/banlist.conf) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -e "$IP\t$CHAIN\t$TIME\t$DATE" + done < <(cat $VESTA/data/firewall/banlist.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "IP,CHAIN,TIME,DATE" + while read str; do + eval $str + echo "$IP,$CHAIN,$TIME,$DATE" + done < <(cat $VESTA/data/firewall/banlist.conf) +} + #----------------------------------------------------------# # Action # #----------------------------------------------------------# -# Defining config -conf=$VESTA/data/firewall/banlist.conf - -# Defining fileds to select -fields="\$IP:\$CHAIN \$TIME \$DATE" - -# Listing domains +# Listing data case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$IP $CHAIN $TIME $DATE'; - shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-firewall-rule b/bin/v-list-firewall-rule index 441212da..e7c7f6b1 100755 --- a/bin/v-list-firewall-rule +++ b/bin/v-list-firewall-rule @@ -16,43 +16,43 @@ format=${2-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_fw_rule() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - line=$(grep "RULE='$rule'" $conf) +json_list() { echo '{' - eval $line - for field in $fields; do - eval value=$field - if [ "$i" -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ "$fileds_count" -eq "$i" ]; then - echo -e "\t\t\"${field//$/}\": \"$value\"" - else - echo -e "\t\t\"${field//$/}\": \"$value\"," - fi - fi - (( ++i)) - done - if [ -n "$value" ]; then - echo -e ' }' - fi - echo -e "}" + echo ' "'$RULE'": { + "ACTION": "'$ACTION'", + "PROTOCOL": "'$PROTOCOL'", + "PORT": "'$PORT'", + "IP": "'$IP'", + "COMMENT": "'$COMMENT'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell function -shell_list_fw_rule() { - line=$(grep "RULE='$rule'" $conf) - eval $line - for field in $fields; do - eval key="$field" - if [ -z "$key" ]; then - key=NULL - fi - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + echo "ACTION: $ACTION" + echo "PROTOCOL: $PROTOCOL" + echo "PORT: $PORT" + echo "IP: $IP" + echo "COMMENT: $COMMENT" + echo "SUSPENDED: $SUSPENDED" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -ne "$RULE\t$ACTION\t$PROTOCOL\t$PORT\t$IP\t$COMMENT\t" + echo -e "$SUSPENDED\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo "RULE,ACTION,PROTOCOL,PORT,IP,COMMENT,SUSPENDED,TIME,DATE" + echo "$RULE,$ACTION,$PROTOCOL,$PORT,$IP,$COMMENT,$SUSPENDED,$TIME,$DATE" } @@ -61,6 +61,7 @@ shell_list_fw_rule() { #----------------------------------------------------------# check_args '1' "$#" 'RULE [FORMAT]' +is_number_format_valid "$rule" "rule id" is_object_valid '../../data/firewall/rules' 'RULE' "$rule" @@ -68,17 +69,15 @@ is_object_valid '../../data/firewall/rules' 'RULE' "$rule" # Action # #----------------------------------------------------------# -# Defining config and fields to select -conf=$VESTA/data/firewall/rules.conf -fields="\$RULE \$ACTION \$PROTOCOL \$PORT \$IP \$COMMENT" -fields="$fields \$RULE \$SUSPENDED \$TIME \$DATE" +# Parsing rules +eval $(grep "RULE='$rule'" $VESTA/data/firewall/rules.conf) -# Listing fw rule -case $format in - json) json_list_fw_rule ;; - plain) nohead=1; shell_list_fw_rule ;; - shell) shell_list_fw_rule |column -t ;; - *) check_args '2' '0' 'RULE [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-letsencrypt-user b/bin/v-list-letsencrypt-user new file mode 100755 index 00000000..cded9600 --- /dev/null +++ b/bin/v-list-letsencrypt-user @@ -0,0 +1,82 @@ +#!/bin/bash +# info: list letsencrypt key +# options: USER [FORMAT] +# +# The function for obtaining the letsencrypt key thumbprint + + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + +# Argument definition +user=$1 +format=${2-shell} + +# Includes +source $VESTA/func/main.sh + +# JSON list function +json_list() { + echo '{' + echo ' "'$user'": { + "EMAIL": "'$EMAIL'", + "EXPONENT": "'$EXPONENT'", + "MODULUS": "'$MODULUS'", + "THUMB: "'$THUMB'" + }' + echo '}' +} + +# SHELL list function +shell_list() { + echo "USER: $user" + echo "EMAIL: $EMAIL" + echo "THUMB: $THUMB" + echo "EXPONENT: $EXPONENT" + echo "MODULUS: $MODULUS" +} + +# PLAIN list function +plain_list() { + echo -e "$user\t$EMAIL\t$EXPONENT\t$MODULUS\t$THUMB" +} + +# CSV list function +csv_list() { + echo "USER,EMAIL,EXPONENT,MODULUS,THUMB" + echo "$user,$EMAIL,$EXPONENT,$MODULUS,$THUMB" +} + + +#----------------------------------------------------------# +# Verifications # +#----------------------------------------------------------# + +check_args '1' "$#" 'USER [FORMAT]' +is_object_valid 'user' 'USER' "$user" +if [ ! -e "$USER_DATA/ssl/le.conf" ]; then + check_result $E_NOTEXIST "LetsEncrypt user account doesn't exist" +fi + + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +source $USER_DATA/ssl/le.conf + +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; +esac + + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +exit diff --git a/bin/v-list-mail-account b/bin/v-list-mail-account index ff5af131..65cc5b90 100755 --- a/bin/v-list-mail-account +++ b/bin/v-list-mail-account @@ -18,43 +18,49 @@ format=${4-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_account() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - line=$(grep "ACCOUNT='$account'" $conf) +# JSON list function +json_list() { echo '{' - eval $line - for field in $fields; do - eval value=$field - if [ "$i" -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ "$fileds_count" -eq "$i" ]; then - echo -e "\t\t\"${field//$/}\": \"$value\"" - else - echo -e "\t\t\"${field//$/}\": \"$value\"," - fi - fi - (( ++i)) - done - if [ -n "$value" ]; then - echo -e ' }' - fi - echo -e "}" + echo ' "'$account'": { + "ALIAS": "'$ALIAS'", + "FWD": "'$FWD'", + "FWD_ONLY": "'$FWD_ONLY'", + "AUTOREPLY": "'$AUTOREPLY'", + "QUOTA": "'$QUOTA'", + "U_DISK": "'$U_DISK'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell function -shell_list_account() { - line=$(grep "ACCOUNT='$account'" $conf) - eval $line - for field in $fields; do - eval key="$field" - if [ -z "$key" ]; then - key=NULL - fi - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + echo "ACCOUNT: $account" + echo "ALIAS: $ALIAS" + echo "FORWARD: $FWD" + echo "FORWARD_ONLY: $FWD_ONLY" + echo "AUTOREPLY: $AUTOREPLY" + echo "QUOTA: $QUOTA" + echo "DISK: $U_DISK" + echo "SUSPENDED: $SUSPENDED" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -ne "$account\t$ALIAS\t$FWD\t$FWD_ONLY\t$AUTOREPLY\t$QUOTA\t" + echo -e "$U_DISK\t$SUSPENDED\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo -n "ACCOUNT,ALIAS,FWD,FWD_ONLY,AUTOREPLY,QUOTA,U_DISK" + echo "SUSPENDED,TIME,DATE" + echo -n "$ACCOUNT,\"$ALIAS\",\"$FWD\",$FWD_ONLY,$AUTOREPLY,$QUOTA," + echo "$U_DISK,$SUSPENDED,$TIME,$DATE" } @@ -63,6 +69,7 @@ shell_list_account() { #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ACCOUNT [FORMAT]' +is_format_valid 'user' 'domain' 'account' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" is_object_valid "mail/$domain" 'ACCOUNT' "$account" @@ -73,17 +80,15 @@ is_object_valid "mail/$domain" 'ACCOUNT' "$account" # Action # #----------------------------------------------------------# -# Defining config and fields to select -conf=$USER_DATA/mail/$domain.conf -fields="\$ACCOUNT \$ALIAS \$FWD \$FWD_ONLY \$QUOTA \$AUTOREPLY \$U_DISK" -fields="$fields \$SUSPENDED \$TIME \$DATE" +# Parsing mail account +eval $(grep "ACCOUNT='$account'" $USER_DATA/mail/$domain.conf) -# Listing domains -case $format in - json) json_list_account ;; - plain) nohead=1; shell_list_account ;; - shell) shell_list_account |column -t ;; - *) check_args '2' '0' 'USER DOMAIN ACCOUNT [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-mail-account-autoreply b/bin/v-list-mail-account-autoreply index b1f5386b..257d873d 100755 --- a/bin/v-list-mail-account-autoreply +++ b/bin/v-list-mail-account-autoreply @@ -18,8 +18,8 @@ format=${4-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_msg() { +# JSON list function +json_list() { i='1' # iterator echo '{' echo -e "\t\"$account\": {" @@ -27,11 +27,20 @@ json_list_msg() { echo -e "\t}\n}" } -# Shell function -shell_list_msg() { - if [ ! -z "$msg" ]; then - echo -e "$msg" - fi +# SHELL list function +shell_list() { + echo "$msg" +} + +# PLAIN list function +plain_list() { + echo "$msg" +} + +# CSV list function +csv_list() { + echo "MSG" + echo "$msg" } @@ -39,7 +48,8 @@ shell_list_msg() { # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'USER DOMAIN [FORMAT]' +check_args '3' "$#" 'USER DOMAIN ACCOUNT [FORMAT]' +is_format_valid 'user' 'domain' 'account' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" is_object_unsuspended 'mail' 'DOMAIN' "$domain" @@ -56,12 +66,12 @@ if [ -e "$USER_DATA/mail/$account@$domain.msg" ]; then sed ':a;N;$!ba;s/\n/\\n/g' ) fi -# Listing domains +# Listing data case $format in - json) json_list_msg ;; - plain) nohead=1; shell_list_msg ;; - shell) shell_list_msg ;; - *) check_args '1' '0' '[FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-mail-accounts b/bin/v-list-mail-accounts index f62b5c31..9d4ef41b 100755 --- a/bin/v-list-mail-accounts +++ b/bin/v-list-mail-accounts @@ -17,13 +17,90 @@ format=${3-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep ACCOUNT $USER_DATA/mail/$domain.conf |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$ACCOUNT'": { + "ALIAS": "'$ALIAS'", + "FWD": "'$FWD'", + "FWD_ONLY": "'$FWD_ONLY'", + "AUTOREPLY": "'$AUTOREPLY'", + "QUOTA": "'$QUOTA'", + "U_DISK": "'$U_DISK'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $USER_DATA/mail/$domain.conf) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "ACCOUNT ALIAS FWD DISK DATE" + echo "------- ----- --- ---- ----" + while read str; do + eval $str + if [ -z "$ALIAS" ]; then + ALIAS='no' + else + if [ "${#ALIAS}" -gt 12 ]; then + ALIAS="${ALIAS:0:12}..." + fi + fi + if [ -z "$FWD" ]; then + FWD='no' + else + if [ "${#FWD}" -gt 20 ]; then + FWD="${FWD:0:20}..." + fi + fi + echo "$ACCOUNT $ALIAS $FWD $U_DISK $DATE" + done < <(cat $USER_DATA/mail/$domain.conf) +} + + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -ne "$ACCOUNT\t$ALIAS\t$FWD\t$FWD_ONLY\t$AUTOREPLY\t" + echo -e "$QUOTA\t$U_DISK\t$SUSPENDED\t$TIME\t$DATE" + done < <(cat $USER_DATA/mail/$domain.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo -n "ACCOUNT,ALIAS,FWD,FWD_ONLY,AUTOREPLY,QUOTA,U_DISK," + echo "SUSPENDED,TIME,DATE" + while read str; do + eval $str + echo -n "$ACCOUNT,\"$ALIAS\",\"$FWD\",$FWD_ONLY,$AUTOREPLY," + echo "$QUOTA,$U_DISK,$SUSPENDED,$TIME,$DATE" + done < <(cat $USER_DATA/mail/$domain.conf) +} + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [FORMAT]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" @@ -32,18 +109,12 @@ is_object_valid 'mail' 'DOMAIN' "$domain" # Action # #----------------------------------------------------------# -# Defining fileds to select -conf=$USER_DATA/mail/$domain.conf -fields="\$ACCOUNT \$ALIAS \$FWD \$FWD_ONLY \$QUOTA \$AUTOREPLY \$U_DISK" -fields="$fields \$SUSPENDED \$TIME \$DATE" - -# Listing domain accounts -case $format in - json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$ACCOUNT $AUTOREPLY $QUOTA $U_DISK $SUSPENDED $TIME $DATE'; - shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-mail-domain b/bin/v-list-mail-domain index e73140fd..25dab90c 100755 --- a/bin/v-list-mail-domain +++ b/bin/v-list-mail-domain @@ -1,9 +1,8 @@ #!/bin/bash -# info: list web domain +# info: list mail domain # options: USER DOMAIN [FORMAT] # -# The function of obtaining the list of domain parameters. This call, just as -# all v_list_* calls, supports 3 formats - json, shell and plain. +# The function of obtaining the list of domain parameters. #----------------------------------------------------------# @@ -18,41 +17,50 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_domain() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - line=$(grep "DOMAIN='$domain'" $conf) +# JSON list function +json_list() { + eval $(grep "DOMAIN='$domain'" $USER_DATA/mail.conf) echo '{' - eval $line - for field in $fields; do - eval value=$field - if [ "$i" -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ "$fileds_count" -eq "$i" ]; then - echo -e "\t\t\"${field//$/}\": \"$value\"" - else - echo -e "\t\t\"${field//$/}\": \"$value\"," - fi - fi - (( ++i)) - done - - if [ -n "$value" ]; then - echo -e ' }' - fi - echo -e "}" + echo ' "'$DOMAIN'": { + "ANTIVIRUS": "'$ANTIVIRUS'", + "ANTISPAM": "'$ANTISPAM'", + "DKIM": "'$DKIM'", + "CATCHALL": "'$CATCHALL'", + "ACCOUNTS": "'$ACCOUNTS'", + "U_DISK": "'$U_DISK'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell function -shell_list_domain() { - line=$(grep "DOMAIN='$domain'" $conf) - eval $line - for field in $fields; do - eval key="$field" - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + echo "DOMAIN: $DOMAIN" + echo "ANTIVIRUS: $ANTIVIRUS" + echo "ANTISPAM: $ANTISPAM" + echo "DKIM: $DKIM" + echo "CATCHALL: $CATCHALL" + echo "ACCOUNTS: $ACCOUNTS" + echo "DISK: $U_DISK" + echo "SUSPENDED: $SUSPENDED" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -ne "$DOMAIN\t$ANTIVIRUS\t$ANTISPAM\t$DKIM\t$CATCHALL\t" + echo -e "$ACCOUNTS\t$U_DISK\t$SUSPENDED\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo -n "DOMAIN,ANTIVIRUS,ANTISPAM,DKIM,CATCHALL,ACCOUNTS,U_DISK," + echo "SUSPENDED,TIME,DATE" + echo -n "$DOMAIN,$ANTIVIRUS,$ANTISPAM,$DKIM,$CATCHALL,$ACCOUNTS,$U_DISK" + echo "$SUSPENDED,$TIME,$DATE" } @@ -61,6 +69,7 @@ shell_list_domain() { #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [FORMAT]' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" @@ -69,17 +78,15 @@ is_object_valid 'mail' 'DOMAIN' "$domain" # Action # #----------------------------------------------------------# -# Defining fileds to select -conf=$USER_DATA/mail.conf -fields='$DOMAIN $ANTIVIRUS $ANTISPAM $DKIM $ACCOUNTS $U_DISK $CATCHALL -$SUSPENDED $TIME $DATE' +# Parsing mail domain +eval $(grep "DOMAIN='$domain'" $USER_DATA/mail.conf) -# Listing domains -case $format in - json) json_list_domain ;; - plain) nohead=1; shell_list_domain ;; - shell) shell_list_domain |column -t ;; - *) check_args '2' '0' 'USER DOMAIN [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-mail-domain-dkim b/bin/v-list-mail-domain-dkim index 727f5323..37088ee0 100755 --- a/bin/v-list-mail-domain-dkim +++ b/bin/v-list-mail-domain-dkim @@ -17,8 +17,8 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_ssl() { +# JSON list function +json_list() { echo '{' echo -e "\t\"$domain\": {" echo " \"PEM\": \"$pem\"," @@ -26,14 +26,21 @@ json_list_ssl() { echo -e "\t}\n}" } -# Shell function -shell_list_ssl() { - if [ ! -z "$pem" ]; then - echo -e "$pem" - fi - if [ ! -z "$pub" ]; then - echo -e "\n$pub" - fi +# SHELL list function +shell_list() { + echo -e "$pem" + echo -e "\n$pub" +} + +# PLAIN list function +plain_list() { + echo "$pem\t$pub" +} + +# CSV list function +csv_list() { + echo "PEM,PUB" + echo "\"$pem\",\"$pub\"" } @@ -42,6 +49,7 @@ shell_list_ssl() { #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [FORMAT]' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" @@ -49,20 +57,22 @@ is_object_valid 'mail' 'DOMAIN' "$domain" #----------------------------------------------------------# # Action # #----------------------------------------------------------# + +# Parsing domain keys if [ -e "$USER_DATA/mail/$domain.pem" ]; then - pem=$(cat $USER_DATA/mail/$domain.pem | sed ':a;N;$!ba;s/\n/\\n/g') + pem=$(cat $USER_DATA/mail/$domain.pem |sed ':a;N;$!ba;s/\n/\\n/g') fi if [ -e "$USER_DATA/mail/$domain.pub" ]; then - pub=$(cat $USER_DATA/mail/$domain.pub | sed ':a;N;$!ba;s/\n/\\n/g') + pub=$(cat $USER_DATA/mail/$domain.pub |sed ':a;N;$!ba;s/\n/\\n/g') fi -# Listing domains +# Listing data case $format in - json) json_list_ssl ;; - plain) nohead=1; shell_list_ssl ;; - shell) shell_list_ssl ;; - *) check_args '1' '0' '[FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-mail-domain-dkim-dns b/bin/v-list-mail-domain-dkim-dns index a78e36e9..d7b3e2a6 100755 --- a/bin/v-list-mail-domain-dkim-dns +++ b/bin/v-list-mail-domain-dkim-dns @@ -17,24 +17,38 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_dkim_dns() { +# JSON list function +json_list() { echo '{' echo -e "\t\"_domainkey\": {" - echo " \"TTL\": \"3600\"," - echo " \"TXT\": \"'t=y; o=~;'\"" + echo " \"TTL\": \"3600\"," + echo " \"TXT\": \"'t=y; o=~;'\"" echo -e "\t}," echo -e "\n\t\"mail._domainkey\": {" - echo " \"TTL\": \"3600\"," - echo " \"TXT\": \"'$pub'\"" + echo " \"TTL\": \"3600\"," + echo " \"TXT\": \"\\\"$pub\\\"\"" echo -e "\t}\n}" - } -# Shell function -shell_list_dkim_dns() { - echo "_domainkey 3600 IN TXT \"t=y; o=~;\"" - echo "mail._domainkey 3600 IN TXT \"k=rsa; p=$pub\"" +# SHELL list function +shell_list() { + echo "RECORD TTL TYPE VALUE" + echo "------ --- ---- -----" + echo "_domainkey 3600 IN TXT \"t=y; o=~;\"" + echo "mail._domainkey 3600 IN TXT \"k=rsa; p=$pub\"" +} + +# PLAIN list function +plain_list() { + echo -e "_domainkey\t3600\tIN\tTXT\t\"t=y; o=~;\"" + echo -e "mail._domainkey\t3600\tIN\tTXT\t\"k=rsa; p=$pub\"" +} + +# CSV list function +csv_list() { + echo "RECORD,TTL,IN,TYPE,VALUE" + echo "_domainkey,3600,IN,TXT,\"\"t=y; o=~;\"\"" + echo "mail._domainkey,3600,IN,TXT,\"\"k=rsa; p=$pub\"\"" } @@ -51,19 +65,20 @@ is_object_valid 'mail' 'DOMAIN' "$domain" # Action # #----------------------------------------------------------# -# Check pub key +# Parsing domain keys if [ -e "$USER_DATA/mail/$domain.pub" ]; then - pub=$(cat $USER_DATA/mail/$domain.pub | sed ':a;N;$!ba;s/\n/\\n/g') + pub=$(cat $USER_DATA/mail/$domain.pub |grep -v "KEY-----") + pub=$(echo "$pub" |sed ':a;N;$!ba;s/\n/\\n/g') else pub="DKIM-SUPPORT-IS-NOT-ACTIVATED" fi -# Listing domains +# Listing data case $format in - json) json_list_dkim_dns ;; - plain) shell_list_dkim_dns ;; - shell) shell_list_dkim_dns ;; - *) check_args '1' '0' '[FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t -s '^';; esac diff --git a/bin/v-list-mail-domains b/bin/v-list-mail-domains index e4a9161e..f6a803b9 100755 --- a/bin/v-list-mail-domains +++ b/bin/v-list-mail-domains @@ -16,13 +16,77 @@ format=${2-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep DOMAIN $USER_DATA/mail.conf |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$DOMAIN'": { + "ANTIVIRUS": "'$ANTIVIRUS'", + "ANTISPAM": "'$ANTISPAM'", + "DKIM": "'$DKIM'", + "CATCHALL": "'$CATCHALL'", + "ACCOUNTS": "'$ACCOUNTS'", + "U_DISK": "'$U_DISK'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $USER_DATA/mail.conf) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "DOMAIN ANTIVIRUS ANTISPAM DKIM ACC DISK SPND DATE" + echo "------ --------- -------- ---- --- ---- --- ----" + while read str; do + eval $str + echo -n "$DOMAIN $ANTIVIRUS $ANTISPAM $DKIM $ACCOUNTS $U_DISK " + echo "$SUSPENDED $DATE" + done < <(cat $USER_DATA/mail.conf) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -ne "$DOMAIN\t$ANTIVIRUS\t$ANTISPAM\t$DKIM\t$CATCHALL\t" + echo -e "$ACCOUNTS\t$U_DISK\t$SUSPENDED\t$TIME\t$DATE" + done < <(cat $USER_DATA/mail.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo -n "DOMAIN,ANTIVIRUS,ANTISPAM,DKIM,CATCHALL,ACCOUNTS,U_DISK," + echo "SUSPENDED,TIME,DATE" + while read str; do + eval $str + echo -n "$DOMAIN,$ANTIVIRUS,$ANTISPAM,$DKIM,$CATCHALL,$ACCOUNTS," + echo "'$U_DISK,$SUSPENDED,$TIME,$DATE" + echo + done < <(cat $USER_DATA/mail.conf) +} + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -30,18 +94,12 @@ is_object_valid 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -# Defining fileds to select -conf=$USER_DATA/mail.conf -fields="\$DOMAIN \$ANTIVIRUS \$ANTISPAM \$DKIM \$ACCOUNTS \$U_DISK \$CATCHALL" -fields="$fields \$SUSPENDED \$TIME \$DATE" - -# Listing domains -case $format in +# Listing data +case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$DOMAIN $ANTIVIRUS $ANTISPAM $DKIM $ACCOUNTS $U_DISK $DATE'; - shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-remote-dns-hosts b/bin/v-list-remote-dns-hosts index 2269381d..63249af2 100755 --- a/bin/v-list-remote-dns-hosts +++ b/bin/v-list-remote-dns-hosts @@ -15,30 +15,84 @@ format=${1-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep HOST $VESTA/conf/dns-cluster.conf |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$HOST'": { + "PORT": "'$PORT'", + "TYPE": "'$TYPE'", + "USER": "'$USER'", + "DNS_USER": "'$DNS_USER'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $VESTA/conf/dns-cluster.conf) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "HOST PORT TYPE USER DNS_USER SPND DATE" + echo "---- ---- ---- ---- -------- ---- ----" + while read str; do + eval $str + echo "$HOST $PORT $TYPE $USER $DNS_USER $SUSPENDED $DATE" + done < <(cat $VESTA/conf/dns-cluster.conf) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -ne "$HOST\t$PORT\t$TYPE\t$USER\t$DNS_USER\t" + echo -e "$SUSPENDED\t$TIME\t$DATE" + done < <(cat $VESTA/conf/dns-cluster.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "HOST,PORT,TYPE,USER,DNS_USER,SUSPENDED,TIME,DATE" + while read str; do + eval $str + echo "$HOST,$PORT,$TYPE,$USER,$DNS_USER,$SUSPENDED,$TIME,$DATE" + done < <(cat $VESTA/conf/dns-cluster.conf) +} + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# +if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then + exit +fi + #----------------------------------------------------------# # Action # #----------------------------------------------------------# -# Check config -conf=$VESTA/conf/dns-cluster.conf -if [ ! -e "$conf" ]; then - exit -fi - -# Defining fileds to select -fields='$HOST $USER $DNS_USER $SUSPENDED $TIME $DATE' - +# Listing data case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) shell_list| column -t ;; - *) check_args '1' '0' 'USER [FORMAT]';; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-sys-config b/bin/v-list-sys-config index fdab5280..c0ed3851 100755 --- a/bin/v-list-sys-config +++ b/bin/v-list-sys-config @@ -1,5 +1,5 @@ #!/bin/bash -# info: list system config +# info: list system configuration # options: [FORMAT] # # The function for obtaining the list of system parameters. @@ -12,33 +12,167 @@ # Argument definition format=${1-shell} -# Json function -json_list_conf() { - lines=$(wc -l $VESTA/conf/vesta.conf | cut -f 1 -d ' ') - i='0' - IFS=$'\n' - echo -e "{\n\t\"config\": {" - for str in $(cat $VESTA/conf/vesta.conf); do - (( ++i)) - key=${str%%=*} - value=${str#*=} - if [ "$i" -lt "$lines" ]; then - echo -e "\t\t\"$key\": \"${value//\'/}\"," - else - echo -e "\t\t\"$key\": \"${value//\'/}\"" - fi - done - echo -e "\t}\n}" +source $VESTA/conf/vesta.conf + +# JSON list function +json_list() { + echo '{ + "config": { + "WEB_SYSTEM": "'$WEB_SYSTEM'", + "WEB_RGROUPS": "'$WEB_RGROUPS'", + "WEB_PORT": "'$WEB_PORT'", + "WEB_SSL": "'$WEB_SSL'", + "WEB_SSL_PORT": "'$WEB_SSL_PORT'", + "WEB_BACKEND": "'$WEB_BACKEND'", + "PROXY_SYSTEM": "'$PROXY_SYSTEM'", + "PROXY_PORT": "'$PROXY_PORT'", + "PROXY_SSL_PORT": "'$PROXY_SSL_PORT'", + "FTP_SYSTEM": "'$FTP_SYSTEM'", + "MAIL_SYSTEM": "'$MAIL_SYSTEM'", + "IMAP_SYSTEM": "'$IMAP_SYSTEM'", + "ANTIVIRUS_SYSTEM": "'$ANTIVIRUS_SYSTEM'", + "ANTISPAM_SYSTEM": "'$ANTISPAM_SYSTEM'", + "DB_SYSTEM": "'$DB_SYSTEM'", + "DNS_SYSTEM": "'$DNS_SYSTEM'", + "DNS_CLUSTER": "'$DNS_CLUSTER'", + "STATS_SYSTEM": "'$STATS_SYSTEM'", + "BACKUP_SYSTEM": "'$BACKUP_SYSTEM'", + "CRON_SYSTEM": "'$CRON_SYSTEM'", + "DISK_QUOTA": "'$DISK_QUOTA'", + "FIREWALL_SYSTEM": "'$FIREWALL_SYSTEM'", + "FIREWALL_EXTENSION": "'$FIREWALL_EXTENSION'", + "FILEMANAGER_KEY": "'$FILEMANAGER_KEY'", + "SFTPJAIL_KEY": "'$SFTPJAIL_KEY'", + "REPOSITORY": "'$REPOSITORY'", + "VERSION": "'$VERSION'", + "LANGUAGE": "'$LANGUAGE'", + "BACKUP_GZIP": "'$BACKUP_GZIP'", + "BACKUP": "'$BACKUP'", + "MAIL_URL": "'$MAIL_URL'", + "DB_PMA_URL": "'$DB_PMA_URL'", + "DB_PGA_URL": "'$DB_PGA_URL'" + } +}' } -# Shell function -shell_list_conf() { - IFS=$'\n' - for str in $(cat $VESTA/conf/vesta.conf); do - key=${str%%=*} - value=${str#*=} - echo "$key: ${value//\'/}" - done +# Shell list +shell_list() { + if [ ! -z "$WEB_SYSTEM" ]; then + echo "WEB Server: $WEB_SYSTEM:$WEB_PORT ($WEB_RGROUPS)" + echo "SSL Support: $WEB_SSL:$WEB_SSL_PORT" + fi + if [ ! -z "$WEB_BACKEND" ]; then + echo "WEB Backend: $WEB_BACKEND" + fi + if [ ! -z "$PROXY_SYSTEM" ]; then + echo "Proxy Server: $PROXY_SYSTEM:$PROXY_PORT" + echo "Proxy SSL: $PROXY_SYSTEM:$PROXY_SSL_PORT" + fi + if [ ! -z "$STATS_SYSTEM" ]; then + echo "Web Stats: ${STATS_SYSTEM//,/, }" + fi + if [ ! -z "$FTP_SYSTEM" ]; then + echo "FTP Server: $FTP_SYSTEM" + fi + if [ ! -z "$MAIL_SYSTEM" ]; then + echo -n "Mail Server: $MAIL_SYSTEM" + if [ ! -z "$IMAP_SYSTEM" ]; then + echo -n " + $IMAP_SYSTEM" + fi + if [ ! -z "$ANTIVIRUS_SYSTEM" ]; then + echo -n " + $ANTIVIRUS_SYSTEM" + fi + if [ ! -z "$ANTISPAM_SYSTEM" ]; then + echo -n " + $ANTISPAM_SYSTEM" + fi + echo + if [ ! -z "$MAIL_URL" ]; then + echo "Web Mail: hostname + $MAIL_URL" + fi + fi + if [ ! -z "$DB_SYSTEM" ]; then + echo "Database: ${DB_SYSTEM//,/, }" + if [ ! -z "$DB_PMA_URL" ]; then + echo "PMA URL: $DB_PMA_URL" + fi + if [ ! -z "$DB_PGA_URL" ]; then + echo "PGA URL: $DB_PGA_URL" + fi + fi + if [ ! -z "$DNS_SYSTEM" ]; then + echo -n "DNS server: $DNS_SYSTEM" + if [ ! -z "$DNS_CLUSTER" ]; then + echo -n " (cluster)" + fi + echo + fi + if [ ! -z "$CRON_SYSTEM" ]; then + echo "CRON: $CRON_SYSTEM" + fi + if [ ! -z "$FIREWALL_SYSTEM" ]; then + echo -n "Firewall: $FIREWALL_SYSTEM" + if [ ! -z "$FIREWALL_EXTENSION" ]; then + echo -n "+ $FIREWALL_EXTENSION" + fi + echo + fi + if [ ! -z "$BACKUP_SYSTEM" ]; then + echo "Backups: ${BACKUP_SYSTEM//,/, }" + if [ ! -z "$BACKUP" ]; then + echo "Backup Dir: $BACKUP" + fi + fi + if [ ! -z "$DISK_QUOTA" ]; then + echo "Disk Quota: $DISK_QUOTA" + fi + if [ ! -z "$FILEMANAGER_KEY" ]; then + echo "FileManager: $FILEMANAGER_KEY" + fi + if [ ! -z "$SFTPJAIL_KEY" ]; then + echo "SFTP Chroot: $SFTPJAIL_KEY" + fi + if [ ! -z "$LANGUAGE" ] && [ "$LANGUAGE" != 'en' ]; then + echo "Language: $LANGUAGE" + fi + echo "Version: $VERSION" +} + +# PLAIN list function +plain_list() { + echo -ne "$WEB_SYSTEM\t$WEB_RGROUPS\t$WEB_PORT\t$WEB_SSL\t" + echo -ne "$WEB_SSL_PORT\t$WEB_BACKEND\t$PROXY_SYSTEM\t$PROXY_PORT\t" + echo -ne "$PROXY_SSL_PORT\t$FTP_SYSTEM\t$MAIL_SYSTEM\t$IMAP_SYSTEM\t" + echo -ne "$ANTIVIRUS_SYSTEM\t$ANTISPAM_SYSTEM\t$DB_SYSTEM\t" + echo -ne "$DNS_SYSTEM\t$DNS_CLUSTER\t$STATS_SYSTEM\t$BACKUP_SYSTEM\t" + echo -ne "$CRON_SYSTEM\t$DISK_QUOTA\t$FIREWALL_SYSTEM\t" + echo -ne "$FIREWALL_EXTENSION\t$FILEMANAGER_KEY\t$SFTPJAIL_KEY\t" + echo -ne "$REPOSITORY\t$VERSION\t$LANGUAGE\t$BACKUP_GZIP\t$BACKUP\t" + echo -e "$MAIL_URL\t$DB_PMA_URL\t$DB_PGA_URL" +} + + +# CSV list +csv_list() { + echo -n "'WEB_SYSTEM','WEB_RGROUPS','WEB_PORT','WEB_SSL'," + echo -n "'WEB_SSL_PORT','WEB_BACKEND','PROXY_SYSTEM','PROXY_PORT'," + echo -n "'PROXY_SSL_PORT','FTP_SYSTEM','MAIL_SYSTEM','IMAP_SYSTEM'," + echo -n "'ANTIVIRUS_SYSTEM','ANTISPAM_SYSTEM','DB_SYSTEM'," + echo -n "'DNS_SYSTEM','DNS_CLUSTER','STATS_SYSTEM','BACKUP_SYSTEM'," + echo -n "'CRON_SYSTEM','DISK_QUOTA','FIREWALL_SYSTEM'," + echo -n "'FIREWALL_EXTENSION','FILEMANAGER_KEY','SFTPJAIL_KEY'," + echo -n "'REPOSITORY','VERSION','LANGUAGE','BACKUP_GZIP','BACKUP'," + echo -n "'MAIL_URL','DB_PMA_URL','DB_PGA_URL'" + echo + echo -n "'$WEB_SYSTEM','$WEB_RGROUPS','$WEB_PORT','$WEB_SSL'," + echo -n "'$WEB_SSL_PORT','$WEB_BACKEND','$PROXY_SYSTEM','$PROXY_PORT'," + echo -n "'$PROXY_SSL_PORT','$FTP_SYSTEM','$MAIL_SYSTEM','$IMAP_SYSTEM'," + echo -n "'$ANTIVIRUS_SYSTEM','$ANTISPAM_SYSTEM','$DB_SYSTEM'," + echo -n "'$DNS_SYSTEM','$DNS_CLUSTER','$STATS_SYSTEM','$BACKUP_SYSTEM'," + echo -n "'$CRON_SYSTEM','$DISK_QUOTA','$FIREWALL_SYSTEM'," + echo -n "'$FIREWALL_EXTENSION','$FILEMANAGER_KEY','$SFTPJAIL_KEY'," + echo -n "'$REPOSITORY','$VERSION','$LANGUAGE','$BACKUP_GZIP','$BACKUP'," + echo -n "'$MAIL_URL','$DB_PMA_URL','$DB_PGA_URL'" + echo } @@ -46,11 +180,12 @@ shell_list_conf() { # Action # #----------------------------------------------------------# -# Listing system config -case $format in - json) json_list_conf ;; - plain) shell_list_conf ;; - shell) shell_list_conf | column -t ;; +# Listing data +case $format in + json) json_list ;; + plain) shell_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-sys-db-status b/bin/v-list-sys-db-status index 6bbfca5a..d3dbe2f7 100755 --- a/bin/v-list-sys-db-status +++ b/bin/v-list-sys-db-status @@ -65,7 +65,7 @@ for db in $(echo $DB_SYSTEM| tr ',' '\n'); do fi # Checking PostgreSQL - if [ "$db" = 'pgsql' ]; then + if [ "$db" = 'pgsql' ] && [ ! -z "$(which psql)" ]; then echo "PostgreSQL $HOST status" export PGPASSWORD="$PASSWORD" psql -h $HOST -U $USER -c "SELECT * FROM pg_stat_activity" diff --git a/bin/v-list-sys-info b/bin/v-list-sys-info index 975f7249..dabd3160 100755 --- a/bin/v-list-sys-info +++ b/bin/v-list-sys-info @@ -15,6 +15,38 @@ format=${1-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + echo '{' + echo ' "sysinfo": { + "HOSTNAME": "'$HOSTNAME'", + "OS": "'$OS'", + "VERSION": "'$VERSION'", + "ARCH": "'$ARCH'", + "UPTIME": "'$UPTIME'", + "LOADAVERAGE": "'$LOADAVERAGE'" + }' + echo '}' +} + +# SHELL list function +shell_list() { + echo "HOSTNAME OS VER ARCH UPTIME LA" + echo "-------- -- --- ---- ------ --" + echo "$HOSTNAME $OS $VERSION $ARCH $UPTIME $LOADAVERAGE" +} + +# PLAIN list function +plain_list() { + echo -e "$HOSTNAME\t$OS\t$VERSION\t$ARCH\t$UPTIME\t$LOADAVERAGE" +} + +# CSV list function +csv_list() { + echo "HOSTNAME,OS,VERSION,ARCH,UPTIME,LOADAVERAGE" + echo "$HOSTNAME,$OS,$VERSION,$ARCH,$UPTIME,$LOADAVERAGE" +} + #----------------------------------------------------------# # Action # @@ -30,13 +62,13 @@ if [ -e '/etc/redhat-release' ]; then else OS="RHEL" fi - VERSION=$(cat /etc/redhat-release | tr ' ' '\n' |grep [0-9]) + VERSION=$(cat /etc/redhat-release| tr ' ' '\n' |grep [0-9]) else if [ "$(lsb_release -si)" == "Ubuntu" ] && [ -e '/etc/debian_version' ]; then OS="Ubuntu" VERSION=$(grep DISTRIB_RELEASE /etc/lsb-release| cut -f 2 -d '=') else - distro=$(head -n1 /etc/issue | cut -f 1 -d ' ') + distro=$(head -n1 /etc/issue |cut -f 1 -d ' ') if [ "$distro" = 'Debian' ]; then OS="Debian" VERSION=$(cat /etc/debian_version) @@ -52,36 +84,19 @@ ARCH=$(arch) # Check uptime UPTIME=$(cat /proc/uptime |cut -f 1 -d ' '|cut -f 1 -d .) -UPTIME="$(echo $UPTIME / 60 | bc)" +UPTIME="$(echo $UPTIME / 60 |bc)" # Check LoadAverage LOADAVERAGE=$(cat /proc/loadavg |cut -f 1 -d ' ') -# Create tmp file -tmp_file=$(mktemp) - -# Define key/value pairs -str="SYS='sysinfo' HOSTNAME='$HOSTNAME' OS='$OS' VERSION='$VERSION'" -str="$str ARCH='$ARCH' UPTIME='$UPTIME' LOADAVERAGE='$LOADAVERAGE'" - -# Defining config -echo -e "$str" > $tmp_file -conf=$tmp_file - -# Defining fileds to select -fields="\$SYS \$HOSTNAME \$OS \$VERSION \$ARCH \$UPTIME \$LOADAVERAGE" - -# Listing services +# Listing data case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields="\$HOSTNAME \$OS \$VERSION \$ARCH \$UPTIME \$LOADAVERAGE" - shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac -rm -f $tmp_file - #----------------------------------------------------------# # Vesta # #----------------------------------------------------------# diff --git a/bin/v-list-sys-interfaces b/bin/v-list-sys-interfaces index bb4dea25..990d9cfd 100755 --- a/bin/v-list-sys-interfaces +++ b/bin/v-list-sys-interfaces @@ -15,31 +15,43 @@ format=${1-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_iface() { - dev=$(cat /proc/net/dev |grep : |cut -f 1 -d : |tr -d ' ' |grep -v lo) - int_counter=$(echo "$dev" | wc -l) +# JSON list function +json_list() { + objects=$(echo "$interfaces" |wc -l) i=1 echo '[' - for interface in $dev; do - if [ "$i" -lt "$int_counter" ]; then - echo -e "\t\"$interface\"," + for interface in $interfaces; do + echo -n ' "'$interface'"' + if [ "$i" -lt "$objects" ]; then + echo ',' else - echo -e "\t\"$interface\"" + echo fi - (( ++i)) + ((i++)) done - echo "]" + echo ']' } -# Shell function -shell_list_iface() { - dev=$(cat /proc/net/dev |grep : |cut -f 1 -d : |tr -d ' ' |grep -v lo) - if [ -z "$nohead" ]; then - echo "INTERFACES" - echo "----------" - fi - for interface in $dev; do +# SHELL list function +shell_list() { + echo "INTERFACE" + echo "---------" + for interface in $interfaces; do + echo "$interface" + done +} + +# PLAIN list function +plain_list() { + for interface in $interfaces; do + echo "$interface" + done +} + +# CSV list function +csv_list() { + echo "INTERFACE" + for interface in $interfaces; do echo "$interface" done } @@ -49,12 +61,15 @@ shell_list_iface() { # Action # #----------------------------------------------------------# -# Listing domains -case $format in - json) json_list_iface ;; - plain) nohead=1; shell_list_iface ;; - shell) shell_list_iface ;; - *) check_args '1' '0' '[FORMAT]' ;; +# Defining interface list +interfaces=$(cat /proc/net/dev |grep : |cut -f 1 -d : |tr -d ' ' |grep -v lo) + +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list;; esac diff --git a/bin/v-list-sys-ip b/bin/v-list-sys-ip index d93957bf..3a7658c5 100755 --- a/bin/v-list-sys-ip +++ b/bin/v-list-sys-ip @@ -11,50 +11,57 @@ # Argument definition ip=$1 -IP=$ip format=${2-shell} # Includes source $VESTA/func/main.sh source $VESTA/func/ip.sh -# Json function -json_list_ip() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - ip_data=$(cat $VESTA/data/ips/$IP) +# JSON list function +json_list() { echo '{' - eval $ip_data - for field in $fields; do - eval value=$field - if [ $i -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ $fileds_count -eq $i ]; then - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - fi - fi - (( ++i)) - done - if [ -n "$value" ]; then - echo -e ' }' - fi - echo -e '}' + echo ' "'$ip'": { + "OWNER": "'$OWNER'", + "STATUS": "'$STATUS'", + "NAME": "'$NAME'", + "U_SYS_USERS": "'$U_SYS_USERS'", + "U_WEB_DOMAINS": "'$U_WEB_DOMAINS'", + "INTERFACE": "'$INTERFACE'", + "NETMASK": "'$NETMASK'", + "NAT": "'$NAT'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell function -shell_list_ip() { - line=$(cat $VESTA/data/ips/$IP) - eval $line - for field in $fields; do - eval key="$field" - if [ -z "$key" ]; then - key='NULL' - fi - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + echo "IP: $ip" + echo "NETMASK: $NETMASK" + echo "INTERFACE: $INTERFACE" + echo "NAT: $NAT" + echo "OWNER: $OWNER" + echo "STATUS: $STATUS" + echo "NAME: $NAME" + echo "USERS: $U_SYS_USERS" + echo "DOMAINS: $U_WEB_DOMAINS" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -ne "$IP\t$OWNER\t$STATUS\t$NAME\t$U_SYS_USERS\t$U_WEB_DOMAINS\t" + echo -e "$INTERFACE\t$NETMASK\t$NAT\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo -n "IP,OWNER,STATUS,NAME,U_SYS_USERS,U_WEB_DOMAINS,INTERFACE" + echo "NETMASK,NAT,TIME,DATE" + echo -n "$IP,$OWNER,$STATUS,$NAME,\"$U_SYS_USERS\",$U_WEB_DOMAINS," + echo "$INTERFACE, $NETMASK,$NAT,$TIME,$DATE" } @@ -62,26 +69,26 @@ shell_list_ip() { # Verifications # #----------------------------------------------------------# -# Checking args check_args '1' "$#" 'IP [FORMAT]' -validate_format 'ip' -is_ip_valid +is_format_valid 'ip' +if [ ! -e "$VESTA/data/ips/$ip" ]; then + check_result $E_NOTEXIST "ip $ip doesn't exist" +fi + #----------------------------------------------------------# # Action # #----------------------------------------------------------# -conf=$VESTA/data/ips/$IP -# Defining fileds to select -fields='$IP $OWNER $STATUS $NAME $U_SYS_USERS $U_WEB_DOMAINS $INTERFACE - $NETMASK $NAT $TIME $DATE' +# Parsing ip +source $VESTA/data/ips/$ip -# Listing ip -case $format in - json) json_list_ip ;; - plain) shell_list_ip ;; - shell) shell_list_ip | column -t ;; - *) check_args '1' '0' 'IP [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-sys-ips b/bin/v-list-sys-ips index 4ab16179..c4f3a8c0 100755 --- a/bin/v-list-sys-ips +++ b/bin/v-list-sys-ips @@ -2,7 +2,7 @@ # info: list system ips # options: [FORMAT] # -# The function for obtaining the list of system ip's. +# The function for obtaining the list of system ip adresses. #----------------------------------------------------------# @@ -15,62 +15,66 @@ format=${1-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_ips() { +# JSON list function +json_list() { echo '{' - ip_list=$(ls --sort=time $VESTA/data/ips/) - fileds_count=$(echo "$fields" | wc -w) - for IP in $ip_list; do - ip_data=$(cat $VESTA/data/ips/$IP) - eval $ip_data - if [ -n "$data" ]; then - echo -e ' },' + ip_count=$(ls $VESTA/data/ips/ |wc -l) + i=1 + while read IP; do + source $VESTA/data/ips/$IP + echo -n ' "'$IP'": { + "OWNER": "'$OWNER'", + "STATUS": "'$STATUS'", + "NAME": "'$NAME'", + "U_SYS_USERS": "'$U_SYS_USERS'", + "U_WEB_DOMAINS": "'$U_WEB_DOMAINS'", + "INTERFACE": "'$INTERFACE'", + "NETMASK": "'$NETMASK'", + "NAT": "'$NAT'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$ip_count" ]; then + echo ',' + else + echo fi - i=1 - for field in $fields; do - eval value=$field - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"$value\"," - else - echo -e "\t\t\"${field//$/}\": \"$value\"" - data=1 - fi - fi - done - done - if [ -n "$data" ]; then - echo -e ' }' - fi - echo -e '}' + ((i++)) + done < <(ls $VESTA/data/ips/) + echo '}' } -# Shell function -shell_list_ips() { - ip_list=$(ls $VESTA/data/ips/) - if [ -z "$nohead" ]; then - echo "${fields//$/}" - for a in $fields; do - echo -e "--------- \c" - done - echo - fi - - for IP in $ip_list; do +# SHELL list function +shell_list() { + echo "IP MASK NAT STATUS WEB DATE" + echo "-- ---- --- ------ --- ----" + while read IP; do source $VESTA/data/ips/$IP - for field in $fields; do - eval value=$field - if [ -z "$value" ]; then - value='NULL' - fi - echo -n "$value " - done - echo - done + if [ -z "$NAT" ]; then + NAT='no' + fi + echo "$IP $NETMASK $NAT $STATUS $U_WEB_DOMAINS $DATE" + done < <(ls $VESTA/data/ips/) +} + +# PLAIN list function +plain_list() { + while read IP; do + source $VESTA/data/ips/$IP + echo -ne "$IP\t$OWNER\t$STATUS\t$NAME\t$U_SYS_USERS\t$U_WEB_DOMAINS\t" + echo -e "$INTERFACE\t$NETMASK\t$NAT\t$TIME\t$DATE" + done < <(ls $VESTA/data/ips/) +} + +# CSV list function +csv_list() { + echo -n "IP,OWNER,STATUS,NAME,U_SYS_USERS,U_WEB_DOMAINS,INTERFACE" + echo "NETMASK,NAT,TIME,DATE" + while read IP; do + source $VESTA/data/ips/$IP + echo -n "$IP,$OWNER,$STATUS,$NAME,\"$U_SYS_USERS\",$U_WEB_DOMAINS," + echo "$INTERFACE, $NETMASK,$NAT,$TIME,$DATE" + done < <(ls $VESTA/data/ips/) } @@ -78,18 +82,12 @@ shell_list_ips() { # Action # #----------------------------------------------------------# -# Defining fileds to select -conf=$VESTA/data/ips/* -fields="\$IP \$OWNER \$STATUS \$NAME \$U_SYS_USERS \$U_WEB_DOMAINS" -fields="$fields \$INTERFACE \$NETMASK \$NAT \$TIME \$DATE" - -# Listing ip addresses -case $format in - json) json_list_ips ;; - plain) nohead=1; shell_list_ips ;; - shell) fields='$IP $NETMASK $NAT $OWNER $U_WEB_DOMAINS'; - shell_list_ips | column -t ;; - *) check_args '1' '0' '[FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-sys-languages b/bin/v-list-sys-languages index e3459fc7..041bc123 100755 --- a/bin/v-list-sys-languages +++ b/bin/v-list-sys-languages @@ -16,13 +16,13 @@ format=${1-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_lang() { - int_counter=$(echo "$languages" | wc -l) +# JSON list function +json_list() { + objects=$(echo "$languages" |wc -l) i=1 echo '[' for lang in $languages; do - if [ "$i" -lt "$int_counter" ]; then + if [ "$i" -lt "$objects" ]; then echo -e "\t\"$lang\"," else echo -e "\t\"$lang\"" @@ -32,12 +32,25 @@ json_list_lang() { echo "]" } -# Shell function -shell_list_lang() { - if [ -z "$nohead" ]; then - echo "LANGUAGES" - echo "----------" - fi +# SHELL list function +shell_list() { + echo "LANGUAGE" + echo "--------" + for lang in $languages; do + echo "$lang" + done +} + +# PLAIN list function +plain_list() { + for lang in $languages; do + echo "$lang" + done +} + +# CSV list function +csv_list() { + echo "LANGUAGE" for lang in $languages; do echo "$lang" done @@ -48,15 +61,15 @@ shell_list_lang() { # Action # #----------------------------------------------------------# -# Check languages -languages=$(ls $VESTA/web/inc/i18n/|cut -f 1 -d .) +# Defining language list +languages=$(ls $VESTA/web/inc/i18n/ |cut -f 1 -d .) -# Listing domains +# Listing data case $format in - json) json_list_lang ;; - plain) nohead=1; shell_list_lang ;; - shell) shell_list_lang ;; - *) check_args '1' '0' '[FORMAT]' ;; + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list;; esac diff --git a/bin/v-list-sys-rrd b/bin/v-list-sys-rrd index 2dc026b9..d746896c 100755 --- a/bin/v-list-sys-rrd +++ b/bin/v-list-sys-rrd @@ -15,10 +15,16 @@ format=${1-shell} source $VESTA/func/main.sh source $VESTA/conf/vesta.conf -# Define json function -json_list_rrd() { +# JSON list function +json_list() { i=1 echo "{" + + # Generating timestamp + time_n_date=$(date +'%T %F') + TIME=$(echo "$time_n_date" |cut -f 1 -d \ ) + DATE=$(echo "$time_n_date" |cut -f 2 -d \ ) + for type in $rrd_types; do for rrd in $(ls $RRD/$type |grep rrd$ |sed "s/\.rrd$//g"); do if [ "$i" -ne 1 ]; then @@ -61,12 +67,37 @@ json_list_rrd() { echo "}" } -# Define jshell function -shell_list_rrd() { - if [ -z "$nohead" ]; then - echo "PATH" - echo "---------" - fi +# SHELL list function +shell_list() { + echo "TYPE VAL_1 VAL_2 VAL_3 TIME DATE" + echo "---- ----- ----- ----- ---- ----" + for type in $rrd_types; do + for rrd in $(ls $RRD/$type |grep rrd$ |sed "s/\.rrd$//g"); do + rrd_type=$(echo "$rrd" |tr '[:lower:]' '[:upper:]') + rrd_data=$(rrdtool fetch "$RRD/$type/$rrd.rrd" AVERAGE -e 0 -s 0) + rrd_data=$(echo "$rrd_data" |tail -n 1) + rrd_timestamp=$(echo "$rrd_data" |cut -f 1 -d :) + rrd_time=$(date -d "@$rrd_timestamp" +%F) + rrd_date=$(date -d "@$rrd_timestamp" +%T) + rrd_val1=$(echo "$rrd_data" |awk '{print $2}' |cut -d. -f1) + rrd_val2=$(echo "$rrd_data" |awk '{print $3}' |cut -d. -f1) + rrd_val3=$(echo "$rrd_data" |awk '{print $4}' |cut -d. -f1) + if [ -z "$rrd_val1" ]; then + rrd_val1="-nan" + fi + if [ -z "$rrd_val2" ]; then + rrd_val2="-nan" + fi + if [ -z "$rrd_val3" ]; then + rrd_val3="-nan" + fi + echo "$rrd_type $rrd_val1 $rrd_val2 $rrd_val3 $rrd_time $rrd_date" + done + done +} + +# PLAIN list function +plain_list() { for type in $rrd_types; do for rrd in $(ls $RRD/$type |grep rrd$ |sed "s/\.rrd$//g"); do echo "$RRD/$type/$rrd.rrd" @@ -74,39 +105,53 @@ shell_list_rrd() { done } +# CSV list function +csv_list() { + for type in $rrd_types; do + echo "RRD" + for rrd in $(ls $RRD/$type |grep rrd$ |sed "s/\.rrd$//g"); do + echo "$RRD/$type/$rrd.rrd" + done + done +} #----------------------------------------------------------# # Action # #----------------------------------------------------------# -# Checking enabled systems +# Definng rrd charts rrd_types="la mem net" -if [ -n "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then +# Checking web system +if [ ! -z "$WEB_SYSTEM" ]; then rrd_types="$rrd_types web" fi -if [ -n "$MAIL_SYSTEM" ] && [ "$MAIL_SYSTEM" != 'no' ]; then +# Checking mail system +if [ ! -z "$MAIL_SYSTEM" ]; then rrd_types="$rrd_types mail" fi -if [ -n "$DB_SYSTEM" ] && [ "$DB_SYSTEM" != 'no' ]; then +# Checking db system +if [ ! -z "$DB_SYSTEM" ]; then rrd_types="$rrd_types db" fi -if [ -n "$FTP_SYSTEM" ] && [ "$FTP_SYSTEM" != 'no' ]; then +# Checking ftp system +if [ ! -z "$FTP_SYSTEM" ]; then rrd_types="$rrd_types ftp" fi +# Adding ssh rrd_types="$rrd_types ssh" - -# Listing domains +# Listing data case $format in - json) json_list_rrd ;; - plain) nohead=1; shell_list_rrd ;; - shell) shell_list_rrd | column -t ;; + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-sys-services b/bin/v-list-sys-services index 8e08d175..c67cd94f 100755 --- a/bin/v-list-sys-services +++ b/bin/v-list-sys-services @@ -18,25 +18,80 @@ source $VESTA/conf/vesta.conf export PATH=$PATH:/sbin +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(echo -e "$data" |grep NAME |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$NAME'": { + "SYSTEM": "'$SYSTEM'", + "STATE": "'$STATE'", + "CPU": "'$CPU'", + "MEM": "'$MEM'", + "RTIME": "'$RTIME'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(echo -e "$data" |grep NAME) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "NAME STATE CPU MEM UPTIME" + echo "---- ----- --- --- ------" + while read str; do + eval $str + echo "$NAME $STATE $CPU $MEM $RTIME" + done < <(echo -e "$data" |grep NAME) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -e "$NAME\t$SYSTEM\t$STATE\t$CPU\t$MEM\t$RTIME" + done < <(echo -e "$data" |grep NAME) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "NAME,SYSTEM,STATE,CPU,MEM,RTIME" + while read str; do + eval $str + echo "$NAME,\"$SYSTEM\",$STATE,$CPU,$MEM,$RTIME" + done < <(echo -e "$data" |grep NAME) +} + +# Get service state function get_srv_state() { srv=$1 - proc_name=${2-$1} - - # Check service status + name=${2-$1} state='running' # Searching related pids if [ -z $3 ]; then - pids=$(pidof $proc_name |tr ' ' '|') + pids=$(pidof $name |tr ' ' '|') else - pids=$(pidof -x $proc_name |tr ' ' '|') + pids=$(pidof -x $name |tr ' ' '|') fi - if [ -z "$pids" ] && [ "$proc_name" != 'nginx' ] ; then - #fallback to pgrep - pids=$(pgrep $proc_name |tr '\n' '|') + if [ -z "$pids" ] && [ "$name" != 'nginx' ]; then + pids=$(pgrep $name |tr '\n' '|') fi + + # Checking pid if [ ! -z "$pids" ]; then - pid=$(echo $pids|cut -f 1 -d \|) + pid=$(echo "$pids" |cut -f 1 -d '|') pids=$(egrep "$pids" $tmp_file) # Calculating CPU usage @@ -46,25 +101,30 @@ get_srv_state() { mem=$(echo "$pids" |awk '{sum += $3} END {print sum/1024 }') mem=$(printf "%.0f\n" $mem) - # Searching service uptime + # Searching pid file + pid_file='' if [ -e "/var/run/$srv.pid" ]; then - srv_file="/var/run/$srv.pid" + pid_file="/var/run/$srv.pid" fi - if [ -z "$srv_file" ] && [ -e "/var/run/$srv/$srv.pid" ]; then - srv_file="/var/run/$srv/$srv.pid" + if [ -z "$pid_file" ] && [ -e "/var/run/$srv/$srv.pid" ]; then + pid_file="/var/run/$srv/$srv.pid" fi - if [ -z $srv_file ] && [ -e "/proc/$pid" ]; then - srv_file="/proc/$pid" + if [ -z "$pid_file" ] && [ -e "/var/run/$name/$name.pid" ]; then + pid_file="/var/run/$name/$name.pid" fi - if [ ! -z "$srv_file" ]; then - mtime=$(stat -c "%Y" $srv_file) + if [ -z "$pid_file" ] && [ -e "/proc/$pid" ]; then + pid_file="/proc/$pid" + fi + + # Calculating uptime + if [ ! -z "$pid_file" ]; then + mtime=$(stat -c "%Y" $pid_file) rtime=$((ctime - mtime)) rtime=$((rtime / 60)) else rtime=0 fi else - # Service is stopped state='stopped' mem=0 cpu=0 @@ -77,105 +137,91 @@ get_srv_state() { # Action # #----------------------------------------------------------# -# Save current proccess list +# Saving current proccess list tmp_file=$(mktemp) ps -eo pid,pcpu,size > $tmp_file -# Get current time +# Checking current time ctime=$(date +%s) -# Web -service=$WEB_SYSTEM -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then - if [ "$service" == 'apache' ]; then - service='httpd' - fi - get_srv_state $service - str="NAME='$service' SYSTEM='web server' STATE='$state' CPU='$cpu'" - str="$str MEM='$mem' RTIME='$rtime'" - +# Checking WEB system +if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'remote' ]; then + get_srv_state $WEB_SYSTEM + data="NAME='$WEB_SYSTEM' SYSTEM='web server' STATE='$state' CPU='$cpu'" + data="$data MEM='$mem' RTIME='$rtime'" fi -# Backend -service=$WEB_BACKEND -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then - get_srv_state $service - str="$str\nNAME='$service' SYSTEM='backend server' STATE='$state' CPU='$cpu'" - str="$str MEM='$mem' RTIME='$rtime'" +# Checking WEB Backend +if [ ! -z "$WEB_BACKEND" ] && [ "$WEB_BACKEND" != 'remote' ]; then + get_srv_state $WEB_BACKEND + data="$data\nNAME='$WEB_BACKEND' SYSTEM='backend server' STATE='$state'" + data="$data CPU='$cpu' MEM='$mem' RTIME='$rtime'" fi -# Proxy -service=$PROXY_SYSTEM -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then - get_srv_state $service - str="$str\nNAME='$service' SYSTEM='reverse proxy' STATE='$state' CPU='$cpu'" - str="$str MEM='$mem' RTIME='$rtime'" +# Checking WEB Proxy +if [ ! -z "$PROXY_SYSTEM" ] && [ "$PROXY_SYSTEM" != 'remote' ]; then + get_srv_state $PROXY_SYSTEM + data="$data\nNAME='$PROXY_SYSTEM' SYSTEM='reverse proxy' STATE='$state'" + data="$data CPU='$cpu' MEM='$mem' RTIME='$rtime'" fi - # DNS service=$DNS_SYSTEM if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then - if [ "$service" == 'bind' ] || [ "$service" == 'bind9' ]; then - proc_name='named' - fi + proc_name='named' get_srv_state $service $proc_name - str="$str\nNAME='$service' SYSTEM='dns server' STATE='$state' CPU='$cpu'" - str="$str MEM='$mem' RTIME='$rtime'" + data="$data\nNAME='$service' SYSTEM='dns server' STATE='$state'" + data="$data CPU='$cpu' MEM='$mem' RTIME='$rtime'" fi -# MAIL -service=$MAIL_SYSTEM -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then - get_srv_state $service - str="$str\nNAME='$service' SYSTEM='mail server' STATE='$state' CPU='$cpu'" - str="$str MEM='$mem' RTIME='$rtime'" +# Checking MAIL system +if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL_SYSTEM" != 'remote' ]; then + get_srv_state $MAIL_SYSTEM + data="$data\nNAME='$MAIL_SYSTEM' SYSTEM='mail server' STATE='$state'" + data="$data CPU='$cpu' MEM='$mem' RTIME='$rtime'" fi -# IMAP -service=$IMAP_SYSTEM -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then - get_srv_state $service - str="$str\nNAME='$service' SYSTEM='pop/imap server' STATE='$state'" - str="$str CPU='$cpu' MEM='$mem' RTIME='$rtime'" +# Checking MAIL IMAP +if [ ! -z "$IMAP_SYSTEM" ] && [ "$IMAP_SYSTEM" != 'remote' ]; then + get_srv_state $IMAP_SYSTEM + data="$data\nNAME='$IMAP_SYSTEM' SYSTEM='pop/imap server' STATE='$state'" + data="$data CPU='$cpu' MEM='$mem' RTIME='$rtime'" fi -# ANTIVIRUS -service=$ANTIVIRUS_SYSTEM -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then +# Checking MAIL ANTIVIRUS +if [ ! -z "$ANTIVIRUS_SYSTEM" ] && [ "$ANTIVIRUS_SYSTEM" != 'remote' ]; then if [ -e "/etc/redhat-release" ]; then - if [ "$ANTIVIRUS_SYSTEM" = 'clamav' ];then - service='clamd' + if [ "$ANTIVIRUS_SYSTEM" == 'clamav' ];then + ANTIVIRUS_SYSTEM='clamd' fi - get_srv_state $service + get_srv_state $ANTIVIRUS_SYSTEM else - if [ "$ANTIVIRUS_SYSTEM" = 'clamav-daemon' ];then - clam_proc_name='clamd' + if [ "$ANTIVIRUS_SYSTEM" == 'clamav-daemon' ];then + proc_name='clamd' fi - get_srv_state $service $clam_proc_name + get_srv_state $ANTIVIRUS_SYSTEM $proc_name fi - str="$str\nNAME='$service' SYSTEM='email antivirus' STATE='$state'" - str="$str CPU='$cpu' MEM='$mem' RTIME='$rtime'" + data="$data\nNAME='$ANTIVIRUS_SYSTEM' SYSTEM='email antivirus'" + data="$data STATE='$state' CPU='$cpu' MEM='$mem' RTIME='$rtime'" + proc_name='' fi -# ANTISPAM -service=$ANTISPAM_SYSTEM -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then - get_srv_state $service spamd - str="$str\nNAME='$service' SYSTEM='email antispam' STATE='$state'" - str="$str CPU='$cpu' MEM='$mem' RTIME='$rtime'" +# Checking MAIL ANTISPAM +if [ ! -z "$ANTISPAM_SYSTEM" ] && [ "$ANTISPAM_SYSTEM" != 'remote' ]; then + get_srv_state $ANTISPAM_SYSTEM spamd + data="$data\nNAME='$ANTISPAM_SYSTEM' SYSTEM='email antispam'" + data="$data STATE='$state' CPU='$cpu' MEM='$mem' RTIME='$rtime'" fi -# DB -service=$DB_SYSTEM -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then +# Checking DB system +if [ ! -z "$DB_SYSTEM" ] && [ "$DB_SYSTEM" != 'remote' ]; then for db in ${DB_SYSTEM//,/ }; do - db_proc_name='' + proc_name='' service="$db" if [ "$service" = 'mysql' ]; then if [ -e "/etc/redhat-release" ]; then service='mysqld' - db_proc_name='mysqld' + proc_name='mysqld' if [ -e "/usr/lib/systemd/system/mariadb.service" ]; then service='mariadb' fi @@ -183,74 +229,61 @@ if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then fi if [ "$service" == 'pgsql' ]; then service='postgresql' - db_proc_name='postmaster' + proc_name='postmaster' if [ ! -e "/etc/redhat-release" ]; then - db_proc_name='postgres' + proc_name='postgres' fi if [ ! -e '/etc/init.d/postgresql' ]; then - db_proc_name='postgres' + proc_name='postgres' fi fi - get_srv_state $service $db_proc_name - str="$str\nNAME='$service' SYSTEM='database server' STATE='$state'" - str="$str CPU='$cpu' MEM='$mem' RTIME='$rtime'" + get_srv_state $service $proc_name + data="$data\nNAME='$service' SYSTEM='database server' STATE='$state'" + data="$data CPU='$cpu' MEM='$mem' RTIME='$rtime'" + proc_name='' done fi -# FTP -service=$FTP_SYSTEM -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then - get_srv_state $service - str="$str\nNAME='$service' SYSTEM='ftp server' STATE='$state' CPU='$cpu'" - str="$str MEM='$mem' RTIME='$rtime'" +# Checking FTP system +if [ ! -z "$FTP_SYSTEM" ] && [ "$FTP_SYSTEM" != 'remote' ]; then + get_srv_state $FTP_SYSTEM + data="$data\nNAME='$FTP_SYSTEM' SYSTEM='ftp server' STATE='$state'" + data="$data CPU='$cpu' MEM='$mem' RTIME='$rtime'" fi -# CRON -service=$CRON_SYSTEM -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then - get_srv_state $service - str="$str\nNAME='$service' SYSTEM='job scheduler' STATE='$state'" - str="$str CPU='$cpu' MEM='$mem' RTIME='$rtime'" +# Checking CRON system +if [ ! -z "$CRON_SYSTEM" ] && [ "$CRON_SYSTEM" != 'remote' ]; then + get_srv_state $CRON_SYSTEM + data="$data\nNAME='$CRON_SYSTEM' SYSTEM='job scheduler' STATE='$state'" + data="$data CPU='$cpu' MEM='$mem' RTIME='$rtime'" fi -# FIREWALL -service=$FIREWALL_SYSTEM -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then +# Checking FIREWALL system +if [ ! -z "$FIREWALL_SYSTEM" ] && [ "$FIREWALL_SYSTEM" != 'remote' ]; then state="stopped" /sbin/iptables -L vesta >/dev/null 2>&1 if [ "$?" -eq 0 ]; then state="running" fi - str="$str\nNAME='$FIREWALL_SYSTEM' SYSTEM='firewall'" - str="$str STATE='$state' CPU='0' MEM='0' RTIME='0'" + data="$data\nNAME='$FIREWALL_SYSTEM' SYSTEM='firewall'" + data="$data STATE='$state' CPU='0' MEM='0' RTIME='0'" fi -# Fail2ban -service=$FIREWALL_EXTENSION -if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then - get_srv_state $service fail2ban-server script - str="$str\nNAME='$service' SYSTEM='brute-force monitor' STATE='$state'" - str="$str CPU='$cpu' MEM='$mem' RTIME='$rtime'" +# Checking FIREWALL Fail2ban extention +if [ ! -z "$FIREWALL_EXTENSION" ]; then + get_srv_state $FIREWALL_EXTENSION fail2ban-server script + data="$data\nNAME='$FIREWALL_EXTENSION' SYSTEM='brute-force monitor'" + data="$data STATE='$state' CPU='$cpu' MEM='$mem' RTIME='$rtime'" fi - -# Defining config -echo -e "$str" > $tmp_file -conf=$tmp_file - -# Defining fileds to select -fields="\$NAME \$SYSTEM \$STATE \$CPU \$MEM \$RTIME" - -# Listing services -case $format in +# Listing data +case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$NAME $STATE $CPU $MEM $RTIME' - shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac -rm -f $tmp_file #----------------------------------------------------------# # Vesta # diff --git a/bin/v-list-sys-shells b/bin/v-list-sys-shells index be43a16e..dec180f5 100755 --- a/bin/v-list-sys-shells +++ b/bin/v-list-sys-shells @@ -15,14 +15,12 @@ format=${1-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_sh() { - shells=$(grep -v '#' /etc/shells) +# JSON list function +json_list() { sh_counter=$(echo "$shells" | wc -l) i=1 echo '[' for shell in $shells; do - shell=$(basename $shell) if [ "$i" -lt "$sh_counter" ]; then echo -e "\t\"$shell\"," else @@ -33,15 +31,26 @@ json_list_sh() { echo "]" } -# Shell function -shell_list_sh() { - shells=$(grep -v '#' /etc/shells) - if [ -z "$nohead" ]; then - echo "SHELLS" - echo "----------" - fi +# SHELL list function +shell_list() { + echo "SHELL" + echo "-----" + for shell in $shells; do + echo "$shell" + done +} + +# PLAIN list function +plain_list() { + for shell in $shells; do + echo "$shell" + done +} + +# CSV list function +csv_list() { + echo "SHELL" for shell in $shells; do - shell=$(basename $shell) echo "$shell" done } @@ -51,12 +60,15 @@ shell_list_sh() { # Action # #----------------------------------------------------------# -# Listing domains -case $format in - json) json_list_sh ;; - plain) nohead=1; shell_list_sh ;; - shell) shell_list_sh ;; - *) check_args '1' '0' '[FORMAT]' ;; +# Defining system shells +shells=$(grep -v '#' /etc/shells |awk -F '/' '{print $NF}' |sort -u) + +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-sys-users b/bin/v-list-sys-users index 16be8d65..cd297338 100755 --- a/bin/v-list-sys-users +++ b/bin/v-list-sys-users @@ -16,32 +16,44 @@ format=${1-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_users() { - users=$(grep @ /etc/passwd|cut -f 1 -d :) - int_counter=$(echo "$users" | wc -l) +# JSON list function +json_list() { + objects=$(grep @ /etc/passwd |wc -l) i=1 echo '[' - for user in $users; do - if [ "$i" -lt "$int_counter" ]; then + while read user; do + if [ "$i" -lt "$objects" ]; then echo -e "\t\"$user\"," else echo -e "\t\"$user\"" fi (( ++i)) - done + done < <(grep @ /etc/passwd |cut -f 1 -d :) echo "]" } -# Shell function -shell_list_users() { - if [ -z "$nohead" ]; then - echo "USERS" - echo "----------" - fi - for user in $(grep @ /etc/passwd|cut -f 1 -d :); do +# SHELL list function +shell_list() { + echo "USER" + echo "----" + while read user; do echo "$user" - done + done < <(grep @ /etc/passwd |cut -f 1 -d :) +} + +# PLAIN list function +plain_list() { + while read user; do + echo "$user" + done < <(grep @ /etc/passwd |cut -f 1 -d :) +} + +# CSV list function +csv_list() { + echo "USER" + while read user; do + echo "$user" + done < <(grep @ /etc/passwd |cut -f 1 -d :) } @@ -49,12 +61,12 @@ shell_list_users() { # Action # #----------------------------------------------------------# -# Listing domains +# Listing data case $format in - json) json_list_users ;; - plain) nohead=1; shell_list_users ;; - shell) shell_list_users ;; - *) check_args '1' '0' '[FORMAT]' ;; + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-sys-vesta-autoupdate b/bin/v-list-sys-vesta-autoupdate index ba89029f..f9457018 100755 --- a/bin/v-list-sys-vesta-autoupdate +++ b/bin/v-list-sys-vesta-autoupdate @@ -1,6 +1,6 @@ #!/bin/bash # info: list vesta autoupdate settings -# options: NONE +# options: [FORMAT] # # The function for obtaining autoupdate setings. @@ -16,8 +16,8 @@ format=${1-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_autoupdate() { +# JSON list function +json_list() { echo '[' if [ -z "$check_cron" ]; then echo -e "\t\"Disabled\"," @@ -27,12 +27,28 @@ json_list_autoupdate() { echo "]" } -# Shell function -shell_list_autoupdate() { - if [ -z "$nohead" ]; then - echo "AUTOUPDATE" - echo "----------" +# SHELL list function +shell_list() { + echo -n "AUTOUPDATE: " + if [ -z "$check_cron" ]; then + echo "Disabled" + else + echo "Enabled" fi +} + +# PLAIN list function +plain_list() { + if [ -z "$check_cron" ]; then + echo "Disabled" + else + echo "Enabled" + fi +} + +# CSV list function +csv_list() { + echo "AUTOUPDATE" if [ -z "$check_cron" ]; then echo "Disabled" else @@ -48,15 +64,16 @@ shell_list_autoupdate() { # Check cron tab check_cron=$(grep 'v-update-sys-vesta-all' $USER_DATA/cron.conf) -# Listing domains -case $format in - json) json_list_autoupdate ;; - plain) nohead=1; shell_list_autoupdate ;; - shell) shell_list_autoupdate ;; - *) check_args '1' '0' '[FORMAT]' ;; +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list;; esac + #----------------------------------------------------------# # Vesta # #----------------------------------------------------------# diff --git a/bin/v-list-sys-vesta-updates b/bin/v-list-sys-vesta-updates index 0fefa584..dee911dc 100755 --- a/bin/v-list-sys-vesta-updates +++ b/bin/v-list-sys-vesta-updates @@ -14,22 +14,55 @@ format=${1-shell} # Includes source $VESTA/func/main.sh +fields="\$NAME \$VERSION \$RELEASE \$ARCH \$UPDATED \$DESCR \$TIME \$DATE" + +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(echo -e "$data" |grep NAME |wc -l) + echo "{" + for str in $(echo -e "$data"); do + eval $str + echo -n ' "'$NAME'": { + "VERSION": "'$VERSION'", + "RELEASE": "'$RELEASE'", + "ARCH": "'$ARCH'", + "UPDATED": "'$UPDATED'", + "DESCR": "'$DESCR'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "PKG VER REL ARCH UPDT DATE" + echo "--- --- --- ---- ---- ----" + for str in $(echo -e "$data"); do + eval $str + echo "$NAME $VERSION $RELEASE $ARCH $UPDATED $DATE" + done +} #----------------------------------------------------------# # Action # #----------------------------------------------------------# -# Remove upd_flag -rm -f $VESTA/web/.update +# Checking official latest version +latest=$(wget -q -T 1 -t 1 http://c.vestacp.com/latest.txt -O -) -# Create tmp file -tmp_file=$(mktemp) - -# Check latest version -wget -q -T 1 -t 1 http://c.vestacp.com/latest.txt -O $tmp_file - -# Check vesta version +# Checking installed vesta version if [ -e "/etc/redhat-release" ]; then rpm_format="VERSION='%{VERSION}'" rpm_format="$rpm_format RELEASE='%{RELEASE}'" @@ -41,22 +74,20 @@ if [ -e "/etc/redhat-release" ]; then else dpkg_data=$(dpkg-query -s vesta) pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/vesta.list) - ARCH=$(echo "$dpkg_data"|grep Architecture | cut -f 2 -d ' ') + ARCH=$(echo "$dpkg_data"|grep Architecture |cut -f 2 -d ' ') VERSION=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 1 -d \-) RELEASE=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 2 -d \-) DATE=$(date -d @$pkg_date +"%F") TIME=$(date -d @$pkg_date +"%T") fi -latest=$(grep vesta $tmp_file) UPDATED='yes' if [ ! -z "$latest" ] && [ "$latest" != "vesta-$VERSION-$RELEASE" ]; then UPDATED='no' - set_upd_flag='yes' fi -str="NAME='vesta' VERSION='$VERSION' RELEASE='$RELEASE' ARCH='$ARCH'" -str="$str UPDATED='$UPDATED' DESCR='core package' TIME='$TIME' DATE='$DATE'" +data="NAME='vesta' VERSION='$VERSION' RELEASE='$RELEASE' ARCH='$ARCH'" +data="$data UPDATED='$UPDATED' DESCR='core package' TIME='$TIME' DATE='$DATE'" -# Check vesta-php version +# Checking installed vesta-php version if [ -e "/etc/redhat-release" ]; then eval $(rpm --queryformat="$rpm_format" -q vesta-php) DATE=$(date -d @$UTIME +%F) @@ -70,17 +101,11 @@ else DATE=$(date -d @$pkg_date +"%F") TIME=$(date -d @$pkg_date +"%T") fi -latest=$(grep php $tmp_file) -UPDATED='yes' -if [ ! -z "$latest" ] && [ "$latest" != "php-$VERSION-$RELEASE" ]; then - UPDATED='no' - set_upd_flag='yes' -fi -str="$str\nNAME='vesta-php' VERSION='$VERSION' RELEASE='$RELEASE' ARCH='$ARCH'" -str="$str UPDATED='$UPDATED' DESCR='php interpreter' TIME='$TIME'" -str="$str DATE='$DATE'" +data="$data\nNAME='vesta-php' VERSION='$VERSION' RELEASE='$RELEASE'" +data="$data ARCH='$ARCH' UPDATED='$UPDATED' DESCR='php interpreter'" +data="$data TIME='$TIME' DATE='$DATE'" -# Check vesta-nginx version +# Checking installed vesta-nginx version if [ -e "/etc/redhat-release" ]; then eval $(rpm --queryformat="$rpm_format" -q vesta-nginx) DATE=$(date -d @$UTIME +%F) @@ -94,39 +119,19 @@ else DATE=$(date -d @$pkg_date +"%F") TIME=$(date -d @$pkg_date +"%T") fi -latest=$(grep nginx $tmp_file) -UPDATED='yes' -if [ ! -z "$latest" ] && [ "$latest" != "nginx-$VERSION-$RELEASE" ]; then - UPDATED='no' - set_upd_flag='yes' -fi -str="$str\nNAME='vesta-nginx' VERSION='$VERSION' RELEASE='$RELEASE'" -str="$str ARCH='$ARCH' UPDATED='$UPDATED' DESCR='internal web server'" -str="$str TIME='$TIME' DATE='$DATE'" +data="$data\nNAME='vesta-nginx' VERSION='$VERSION' RELEASE='$RELEASE'" +data="$data ARCH='$ARCH' UPDATED='$UPDATED' DESCR='internal web server'" +data="$data TIME='$TIME' DATE='$DATE'" -# Create flag if updates avaiable -if [ "$set_upd_flag" == 'yes' ]; then - touch $VESTA/web/.update - chmod a+r $VESTA/web/.update -fi -# Defining config -echo -e "$str" > $tmp_file -conf=$tmp_file - -# Defining fileds to select -fields="\$NAME \$VERSION \$RELEASE \$ARCH \$UPDATED \$DESCR \$TIME \$DATE" - -# Listing services +# Listing data case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$NAME $VERSION $RELEASE $ARCH $UPDATED $TIME $DATE' - shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t;; esac -rm -f $tmp_file #----------------------------------------------------------# # Vesta # diff --git a/bin/v-list-user b/bin/v-list-user index eef71883..05649f91 100755 --- a/bin/v-list-user +++ b/bin/v-list-user @@ -1,57 +1,151 @@ #!/bin/bash -# info: list system user +# info: list user parameters # options: USER [FORMAT] # -# The function for obtaining the list of all user's parameters. +# The function to obtain user parameters. #----------------------------------------------------------# # Variable&Function # #----------------------------------------------------------# +# Argument definition +user=$1 +format=${2-shell} + # Includes source $VESTA/func/main.sh -# Argument definition -user=$1 -USER="$user" -format=${2-shell} - -# Json function -json_list_user() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - source $VESTA/data/users/$user/user.conf - echo '{' - for field in $fields; do - eval value=$field - if [ "$i" -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ "$fileds_count" -eq "$i" ]; then - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - fi - fi - (( ++i)) - done - if [ -n "$value" ]; then - echo -e ' }' - fi - echo -e "}" +# JSON list function +json_list() { + echo '{ + "'$USER'": { + "FNAME": "'$FNAME'", + "LNAME": "'$LNAME'", + "PACKAGE": "'$PACKAGE'", + "WEB_TEMPLATE": "'$WEB_TEMPLATE'", + "BACKEND_TEMPLATE": "'$BACKEND_TEMPLATE'", + "PROXY_TEMPLATE": "'$PROXY_TEMPLATE'", + "DNS_TEMPLATE": "'$DNS_TEMPLATE'", + "WEB_DOMAINS": "'$WEB_DOMAINS'", + "WEB_ALIASES": "'$WEB_ALIASES'", + "DNS_DOMAINS": "'$DNS_DOMAINS'", + "DNS_RECORDS": "'$DNS_RECORDS'", + "MAIL_DOMAINS": "'$MAIL_DOMAINS'", + "MAIL_ACCOUNTS": "'$MAIL_ACCOUNTS'", + "DATABASES": "'$DATABASES'", + "CRON_JOBS": "'$CRON_JOBS'", + "DISK_QUOTA": "'$DISK_QUOTA'", + "BANDWIDTH": "'$BANDWIDTH'", + "HOME": "'$HOME'", + "NS": "'$NS'", + "SHELL": "'$SHELL'", + "BACKUPS": "'$BACKUPS'", + "CONTACT": "'$CONTACT'", + "CRON_REPORTS": "'$CRON_REPORTS'", + "RKEY": "'$RKEY'", + "SUSPENDED": "'$SUSPENDED'", + "SUSPENDED_USERS": "'$SUSPENDED_USERS'", + "SUSPENDED_WEB": "'$SUSPENDED_WEB'", + "SUSPENDED_DNS": "'$SUSPENDED_DNS'", + "SUSPENDED_MAIL": "'$SUSPENDED_MAIL'", + "SUSPENDED_DB": "'$SUSPENDED_DB'", + "SUSPENDED_CRON": "'$SUSPENDED_CRON'", + "IP_AVAIL": "'$IP_AVAIL'", + "IP_OWNED": "'$IP_OWNED'", + "U_USERS": "'$U_USERS'", + "U_DISK": "'$U_DISK'", + "U_DISK_DIRS": "'$U_DISK_DIRS'", + "U_DISK_WEB": "'$U_DISK_WEB'", + "U_DISK_MAIL": "'$U_DISK_MAIL'", + "U_DISK_DB": "'$U_DISK_DB'", + "U_BANDWIDTH": "'$U_BANDWIDTH'", + "U_WEB_DOMAINS": "'$U_WEB_DOMAINS'", + "U_WEB_SSL": "'$U_WEB_SSL'", + "U_WEB_ALIASES": "'$U_WEB_ALIASES'", + "U_DNS_DOMAINS": "'$U_DNS_DOMAINS'", + "U_DNS_RECORDS": "'$U_DNS_RECORDS'", + "U_MAIL_DOMAINS": "'$U_MAIL_DOMAINS'", + "U_MAIL_DKIM": "'$U_MAIL_DKIM'", + "U_MAIL_ACCOUNTS": "'$U_MAIL_ACCOUNTS'", + "U_DATABASES": "'$U_DATABASES'", + "U_CRON_JOBS": "'$U_CRON_JOBS'", + "U_BACKUPS": "'$U_BACKUPS'", + "LANGUAGE": "'$LANGUAGE'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + } +}' } -# Shell function -shell_list_user() { - source $VESTA/data/users/$user/user.conf - for field in $fields; do - eval key="$field" - if [ -z "$key" ]; then - key='NULL' - fi - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + echo "USERNAME: $USER" + echo "FULL NAME: $FNAME $LNAME" + echo "EMAIL: $CONTACT" + echo "LANGUAGE: $LANGUAGE" + echo "SUSPENDED: $SUSPENDED" + echo "PACKAGE: $PACKAGE" + echo "SHELL: $SHELL" + echo "WEB DOMAINS: $U_WEB_DOMAINS/$WEB_DOMAINS" + echo "WEB ALIASES: $U_WEB_ALIASES/$WEB_ALIASES" + echo "DNS DOMAINS: $U_DNS_DOMAINS/$DNS_DOMAINS" + echo "DNS RECORDS: $U_DNS_RECORDS/$DNS_RECORDS" + echo "MAIL DOMAINS: $U_MAIL_DOMAINS/$MAIL_DOMAINS" + echo "MAIL ACCOUNTS: $U_MAIL_ACCOUNTS/$MAIL_ACCOUNTS" + echo "BACKUPS: $U_BACKUPS/$BACKUPS" + echo "DATABASES: $U_DATABASES/$DATABASES" + echo "CRON_JOBS: $U_CRON_JOBS/$CRON_JOBS" + echo "DISK: $U_DISK/$DISK_QUOTA" + echo "BANDWIDTH: $U_BANDWIDTH/$BANDWIDTH" + echo "IP ADDRESSES $IP_AVAIL/$IP_OWNED" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -ne "$USER\t$FNAME\t$LNAME\t$PACKAGE\t$WEB_TEMPLATE\t" + echo -ne "$BACKEND_TEMPLATE\t$PROXY_TEMPLATE\t$DNS_TEMPLATE\t" + echo -ne "$WEB_DOMAINS\t$WEB_ALIASES\t$DNS_DOMAINS\t$DNS_RECORDS\t" + echo -ne "$MAIL_DOMAINS\t$MAIL_ACCOUNTS\t$DATABASES\t$CRON_JOBS\t" + echo -ne "$DISK_QUOTA\t$BANDWIDTH\t$NS\t$HOME\t$SHELL\t$BACKUPS\t" + echo -ne "$CONTACT\t$CRON_REPORTS\t$RKEY\t$SUSPENDED\t" + echo -ne "$SUSPENDED_USERS\t$SUSPENDED_WEB\t$SUSPENDED_DNS\t" + echo -ne "$SUSPENDED_MAIL\t$SUSPENDED_DB\t$SUSPENDED_CRON\t" + echo -ne "$IP_AVAIL\t$IP_OWNED\t$U_USERS\t$U_DISK\t$U_DISK_DIRS\t" + echo -ne "$U_DISK_WEB\t$U_DISK_MAIL\t$U_DISK_DB\t$U_BANDWIDTH\t" + echo -ne "$U_WEB_DOMAINS\t$U_WEB_SSL\t$U_WEB_ALIASES\t" + echo -ne "$U_DNS_DOMAINS\t$U_DNS_RECORDS\t$U_MAIL_DOMAINS\t" + echo -ne "$U_MAIL_DKIM\t$U_MAIL_ACCOUNTS\t$U_DATABASES\t" + echo -e "'$U_CRON_JOBS\t$U_BACKUPS\t$LANGUAGE\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo -n "USER,FNAME,LNAME,PACKAGE,WEB_TEMPLATE,BACKEND_TEMPLATE," + echo -n "PROXY_TEMPLATE,DNS_TEMPLATE,WEB_DOMAINS,WEB_ALIASES," + echo -n "DNS_DOMAINS,DNS_RECORDS,MAIL_DOMAINS,MAIL_ACCOUNTS," + echo -n "DATABASES,CRON_JOBS,DISK_QUOTA,BANDWIDTH,NS,HOME,SHELL," + echo -n "BACKUPS,CONTACT,CRON_REPORTS,RKEY,SUSPENDED,SUSPENDED_USERS," + echo -n "SUSPENDED_WEB,SUSPENDED_DNS,SUSPENDED_MAIL,SUSPENDED_DB," + echo -n "SUSPENDED_CRON,IP_AVAIL,IP_OWNED,U_USERS,U_DISK,U_DISK_DIRS," + echo -n "U_DISK_WEB,U_DISK_MAIL,U_DISK_DB,U_BANDWIDTH,U_WEB_DOMAINS," + echo -n "U_WEB_SSL,U_WEB_ALIASES,U_DNS_DOMAINS,U_DNS_RECORDS," + echo -n "U_MAIL_DOMAINS,U_MAIL_DKIM,U_MAIL_ACCOUNTS,U_DATABASES" + echo "U_CRON_JOBS,U_BACKUPS,LANGUAGE,TIME,DATE" + echo -n "$USER,\"$FNAME\",\"$LNAME\",$PACKAGE,$WEB_TEMPLATE," + echo -n "$BACKEND_TEMPLATE,$PROXY_TEMPLATE,$DNS_TEMPLATE,$WEB_DOMAINS," + echo -n "$WEB_ALIASES,$DNS_DOMAINS,$DNS_RECORDS,$MAIL_DOMAINS," + echo -n "$MAIL_ACCOUNTS,$DATABASES,$CRON_JOBS,$DISK_QUOTA,$BANDWIDTH," + echo -n "\"$NS\",$HOME,$SHELL,$BACKUPS,$CONTACT,$CRON_REPORTS,\"$RKEY\"," + echo -n "$SUSPENDED,$SUSPENDED_USERS,$SUSPENDED_WEB,$SUSPENDED_DNS," + echo -n "$SUSPENDED_MAIL,$SUSPENDED_DB,$SUSPENDED_CRON,$IP_AVAIL," + echo -n "$IP_OWNED,$U_USERS,$U_DISK,$U_DISK_DIRS,$U_DISK_WEB," + echo -n "$U_DISK_MAIL,$U_DISK_DB,$U_BANDWIDTH,$U_WEB_DOMAINS,$U_WEB_SSL," + echo -n "$U_WEB_ALIASES,$U_DNS_DOMAINS,$U_DNS_RECORDS,$U_MAIL_DOMAINS," + echo -n "$U_MAIL_DKIM,$U_MAIL_ACCOUNTS,$U_DATABASES,$U_CRON_JOBS," + echo "$U_BACKUPS,$LANGUAGE,$TIME,$DATE" } @@ -60,7 +154,6 @@ shell_list_user() { #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -69,26 +162,16 @@ is_object_valid 'user' 'USER' "$user" #----------------------------------------------------------# # Defining config -conf=$USER_DATA/user.conf +USER=$user HOME=$HOMEDIR/$user +source $VESTA/data/users/$user/user.conf -# Defining fileds to select -fields='$USER $FNAME $LNAME $PACKAGE $WEB_TEMPLATE $BACKEND_TEMPLATE - $PROXY_TEMPLATE $DNS_TEMPLATE $WEB_DOMAINS $WEB_ALIASES $DNS_DOMAINS - $DNS_RECORDS $MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES $CRON_JOBS - $DISK_QUOTA $BANDWIDTH $NS $SHELL $BACKUPS $CONTACT $CRON_REPORTS - $RKEY $SUSPENDED $SUSPENDED_USERS $SUSPENDED_WEB $SUSPENDED_DNS - $SUSPENDED_MAIL $SUSPENDED_DB $SUSPENDED_CRON $IP_AVAIL $IP_OWNED - $U_USERS $U_DISK $U_DISK_DIRS $U_DISK_WEB $U_DISK_MAIL $U_DISK_DB - $U_BANDWIDTH $U_WEB_DOMAINS $U_WEB_SSL $U_WEB_ALIASES $U_DNS_DOMAINS - $U_DNS_RECORDS $U_MAIL_DOMAINS $U_MAIL_DKIM $U_MAIL_ACCOUNTS $U_DATABASES - $U_CRON_JOBS $U_BACKUPS $LANGUAGE $HOME $NOTIFICATIONS $TIME $DATE' - -# Listing user -case $format in - json) json_list_user ;; - plain) nohead=1; shell_list_user ;; - shell) shell_list_user | column -t ;; +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-user-backup b/bin/v-list-user-backup index e2006917..2e0a98d0 100755 --- a/bin/v-list-user-backup +++ b/bin/v-list-user-backup @@ -18,57 +18,55 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_backup() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - line=$(grep "BACKUP='$backup'" $conf) +fields="\$BACKUP \$TYPE \$SIZE \$WEB \$DNS \$DB \$MAIL \$CRON \$UDIR" +fields="$fields \$RUNTIME \$TIME \$DATE" - # Print top bracket +# JSON list function +json_list() { echo '{' - - # Assing key=value - eval $line - - # Starting output loop - for field in $fields; do - # Parsing key=value - eval value=$field - - # Checking first field - if [ "$i" -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ "$fileds_count" -eq "$i" ]; then - echo -e "\t\t\"${field//$/}\": \"$value\"" - else - echo -e "\t\t\"${field//$/}\": \"$value\"," - fi - fi - # Updating iterator - (( ++i)) - done - - # If there was any output - if [ -n "$value" ]; then - echo -e ' }' - fi - # Printing bottom json bracket - echo -e "}" + echo ' "'$BACKUP'": { + "TYPE": "'$TYPE'", + "SIZE": "'$SIZE'", + "WEB": "'$WEB'", + "DNS": "'$DNS'", + "MAIL": "'$MAIL'", + "DB": "'$DB'", + "CRON": "'$CRON'", + "UDIR": "'$UDIR'", + "RUNTIME": "'$RUNTIME'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell function -shell_list_backup() { - line=$(grep "BACKUP='$backup'" $conf) +# SHELL list function +shell_list() { + echo "BACKUP: $BACKUP" + echo "TYPE: $TYPE" + echo "SIZE: $SIZE mb" + echo "RUNTIME: $RUNTIME min" + echo "WEB: ${WEB//,/ }" + echo "DNS: ${DNS//,/ }" + echo "MAIL: ${MAIL//,/ }" + echo "DB: ${DB//,/ }" + echo "CRON: $CRON" + echo "UDIR: ${UDIR//,/ }" + echo "TIME: $TIME" + echo "DATE: $DATE" +} - # Parsing key=value - eval $line +# PLAIN list function +plain_list() { + echo -ne "$BACKUP\t$TYPE\t$SIZE\t$WEB\t$DNS\t$MAIL\t$DB\t$CRON\t" + echo -e "$UDIR\t$RUNTIME\t$TIME\t$DATE" +} - # Print result line - for field in $fields; do - eval key="$field" - echo "${field//$/}: $key " - done +# CSV list function +csv_list() { + echo "BACKUP,TYPE,SIZE,WEB,DNS,MAIL,DB,CRON,UDIR,RUNTIME,TIME,DATE" + echo -n "$BACKUP,$TYPE,$SIZE,\"$WEB\",\"$DNS\",\"$MAIL\",\"$DB\"," + echo "\"$CRON\",\"$UDIR\",$RUNTIME,$TIME,$DATE" } @@ -85,18 +83,15 @@ is_object_valid 'backup' 'BACKUP' "$backup" # Action # #----------------------------------------------------------# -# Defining config and fields to select -conf=$USER_DATA/backup.conf +# Parsing backup config +eval $(grep "BACKUP='$backup'" $USER_DATA/backup.conf) -fields="\$BACKUP \$TYPE \$SIZE \$WEB \$DNS \$DB \$MAIL \$CRON \$UDIR" -fields="$fields \$RUNTIME \$TIME \$DATE" - -# Listing backup -case $format in - json) json_list_backup ;; - plain) nohead=1; shell_list_backup ;; - shell) shell_list_backup |column -t ;; - *) check_args '2' '0' 'USER BACKUP [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-user-backup-exclusions b/bin/v-list-user-backup-exclusions index a06d101e..d0f428e8 100755 --- a/bin/v-list-user-backup-exclusions +++ b/bin/v-list-user-backup-exclusions @@ -12,52 +12,134 @@ # Argument definition user=$1 format=${2-shell} -USER='' # Includes source $VESTA/func/main.sh -# Json function -json_list_backup_xld() { - set -f - echo '{' - fields_count=$(echo "$fields" | wc -w) +# JSON list function +json_list() { i=1 - source $USER_DATA/backup-excludes.conf - for field in $fields; do - eval value=$field + echo '{' + echo ' "WEB": {' + objects=$(echo "${WEB//,/ }" |wc -w) + for object in $(echo "${WEB//,/ }"); do j=1 - echo -e "\t\"${field//$/}\": {" - for exlcude in ${value//,/ }; do - exlcude_obj=$(echo $exlcude |cut -f 1 -d:) - exclude_param=$(echo $exlcude |sed -e "s/$exlcude_obj://") - if [ "$exlcude_obj" = "$exclude_param" ]; then - exclude_param='' - fi - if [ $j -lt "$(echo ${value//,/ } |wc -w)" ]; then - echo -e "\t\t\"$exlcude_obj\": \"$exclude_param\"," + object_keys=$(echo ${object//:/ } |wc -w) + for key in $(echo "${object/:/ }"); do + if [ "$j" -eq 1 ]; then + echo -n " \"$key\": " + if [ "$object_keys" -eq 1 ]; then + echo -n '""' + fi else - echo -e "\t\t\"$exlcude_obj\": \"$exclude_param\"" + echo -n "\"${key//:/,}\"" fi - (( ++j)) + ((j++)) done - if [ $i -lt $fields_count ]; then - echo -e "\t}," + if [ "$i" -lt "$objects" ]; then + echo ',' else - echo -e "\t}" + echo fi - (( ++i)) + ((i++)) done + echo ' },' + i=1 + echo ' "MAIL": {' + objects=$(echo "${MAIL//,/ }" |wc -w) + for object in $(echo "${MAIL//,/ }"); do + j=1 + object_keys=$(echo ${object//:/ } |wc -w) + for key in $(echo "${object/:/ }"); do + if [ "$j" -eq 1 ]; then + echo -n " \"$key\": " + if [ "$object_keys" -eq 1 ]; then + echo -n '""' + fi + else + echo -n "\"${key//:/,}\"" + fi + ((j++)) + done + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done + echo ' },' + i=1 + echo ' "DB": {' + objects=$(echo "${DB//,/ }" |wc -w) + for object in $(echo "${DB//,/ }"); do + j=1 + object_keys=$(echo ${object//:/ } |wc -w) + for key in $(echo "${object/:/ }"); do + if [ "$j" -eq 1 ]; then + echo -n " \"$key\": " + if [ "$object_keys" -eq 1 ]; then + echo -n '""' + fi + else + echo -n "\"${key//:/,}\"" + fi + ((j++)) + done + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done + echo ' },' + i=1 + echo ' "USER": {' + objects=$(echo "${USER//,/ }" |wc -w) + for object in $(echo "${USER//,/ }"); do + j=1 + object_keys=$(echo ${object//:/ } |wc -w) + for key in $(echo "${object/:/ }"); do + if [ "$j" -eq 1 ]; then + echo -n " \"$key\": " + if [ "$object_keys" -eq 1 ]; then + echo -n '""' + fi + else + echo -n "\"${key//:/,}\"" + fi + ((j++)) + done + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done + echo ' }' echo '}' + } -# Shell function -shell_list_backup_xld() { - source $USER_DATA/backup-excludes.conf - for field in $fields; do - eval value=$field - echo -e "${field//$/}: $value" - done +# SHELL list function +shell_list() { + echo "WEB: $WEB" + echo "MAIL: $MAIL" + echo "DB: $DB" + echo "USER DIRS: $USER" +} + +# PLAIN list function +plain_list() { + echo "$WEB\t$MAIL\t$DB\t$USER" +} + +# CSV list function +csv_list() { + echo "WEB,MAIL,DB,USER" + echo "\"$WEB\",\"$MAIL\",\"$DB\",\"$USER\"" } @@ -66,7 +148,7 @@ shell_list_backup_xld() { #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -74,24 +156,23 @@ is_object_valid 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -# Flush variables +# Flushing variables WEB='' -DNS='' MAIL='' DB='' -CRON='' USER='' -# Defining fileds to select -touch $USER_DATA/backup-excludes.conf -fields="\$WEB \$DNS \$MAIL \$DB \$CRON \$USER" +# Parsing backup exclusion list +if [ -e "$USER_DATA/backup-excludes.conf" ]; then + source $USER_DATA/backup-excludes.conf +fi -# Listing backup exclusions +# Listing data case $format in - json) json_list_backup_xld ;; - plain) nohead=1; shell_list_backup_xld ;; - shell) shell_list_backup_xld;; - *) check_args '1' '0' '[FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-user-backups b/bin/v-list-user-backups index eb666ab1..813ee687 100755 --- a/bin/v-list-user-backups +++ b/bin/v-list-user-backups @@ -16,12 +16,76 @@ format=${2-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep BACKUP $USER_DATA/backup.conf |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$BACKUP'": { + "TYPE": "'$TYPE'", + "SIZE": "'$SIZE'", + "WEB": "'$WEB'", + "DNS": "'$DNS'", + "MAIL": "'$MAIL'", + "DB": "'$DB'", + "CRON": "'$CRON'", + "UDIR": "'$UDIR'", + "RUNTIME": "'$RUNTIME'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $USER_DATA/backup.conf) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "BACKUP TYPE SIZE TIME DATE" + echo "------ ---- --- ---- ----" + while read str; do + eval $str + echo "$BACKUP $TYPE $SIZE $RUNTIME $DATE" + done < <(cat $USER_DATA/backup.conf) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -ne "$BACKUP\t$TYPE\t$SIZE\t$WEB\t$DNS\t$MAIL\t$CRON\t$UDIR\t" + echo -e "$RUNTIME\t$TIME\t$DATE" + done < <(cat $USER_DATA/backup.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "BACKUP,TYPE,SIZE,WEB,DNS,MAIL,CRON,UDIR,RUNTIME,TIME,DATE" + while read str; do + eval $str + echo -n "$BACKUP,$TYPE,$SIZE,\"$WEB\",\"$DNS\",\"$MAIL\",\"$CRON\"," + echo "\"$UDIR\",$RUNTIME,$TIME,$DATE" + done < <(cat $USER_DATA/backup.conf) +} + + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -35,17 +99,12 @@ if [ ! -e "$conf" ]; then touch $conf fi -# Defining fileds to select -fields="\$BACKUP \$TYPE \$SIZE \$WEB \$DNS \$DB \$MAIL \$CRON \$UDIR" -fields="$fields \$RUNTIME \$TIME \$DATE" - -# Listing domains -case $format in +# Listing data +case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$BACKUP $TYPE $SIZE $RUNTIME $TIME $DATE'; - shell_list |column -t;; - *) check_args '1' '0' '[FORMAT]' ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-user-favourites b/bin/v-list-user-favourites index 362d39a1..ceb2ba2c 100755 --- a/bin/v-list-user-favourites +++ b/bin/v-list-user-favourites @@ -16,43 +16,55 @@ format=${2-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_favourites() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - fvrt_data=$(cat $USER_DATA/favourites.conf 2>/dev/null) +# JSON list function +json_list() { echo '{' - eval $fvrt_data - for field in $fields; do - eval value=$field - if [ $i -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ $fileds_count -eq $i ]; then - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - fi - fi - (( ++i)) - done - #if [ -n "$value" ]; then - echo -e ' }' - #fi - echo -e '}' + echo ' "Favourites": { + "USER": "'$USER'", + "WEB": "'$WEB'", + "DNS": "'$DN'", + "DNS_REC": "'$DNS_REC'", + "MAIL": "'$MAIL'", + "MAIL_ACC": "'$MAIL_ACC'", + "DB": "'$DB'", + "CRON": "'$CRON'", + "BACKUP": "'$BACKUP'", + "IP": "'$IP'", + "PACKAGE": "'$PACKAGE'", + "FIREWALL": "'$FIREWALL'" + }' + echo '}' } -# Shell function -shell_list_favourites() { - line=$(cat $USER_DATA/favourites.conf 2>/dev/null) - eval $line - for field in $fields; do - eval key="$field" - if [ -z "$key" ]; then - key='NULL' - fi - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + echo "USER: $USER" + echo "WEB: $WEB" + echo "DNS: $DNS" + echo "DNS RECORD: $DNS_REC" + echo "MAIL: $MAIL" + echo "MAIL USER: $MAIL_ACC" + echo "DATABASE: $DB" + echo "CRON: $CRON" + echo "BACKUP: $BACKUP" + echo "IP: $IP" + echo "PACKAGE: $PACKAGE" + echo "FIREWALL: $FIREWALL" +} + +# PLAIN list function +plain_list() { + echo -ne "$USER\t$WEB\t$DNS\t$DNS_REC\t$MAIL\t$MAIL_ACC\t$DB\t$CRON\t" + echo -e "$BACKUP\t$IP\t$PACKAGE\t$FIREWALL" +} + +# CSV list function +csv_list() { + echo -n "USER,WEB,DNS,DNS_REC,MAIL,MAIL_ACC,DB,CRON,BACKUP,IP," + echo "PACKAGE,FIREWALL" + echo -n "\"$USER\",\"$WEB\",\"$DNS\",\"$DNS_REC\",\"$MAIL\"," + echo -n "\"$MAIL_ACC\",\"$DB\",\"$CRON\",\"$BACKUP\",\"$IP\"," + echo "\"$PACKAGE\",\"$FIREWALL\"" } @@ -62,7 +74,7 @@ shell_list_favourites() { # Checking args check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -84,17 +96,17 @@ IP='' PACKAGE='' FIREWALL='' -# Defining fileds to select -OBJ='Favourites' -fields='$OBJ $USER $WEB $DNS $DNS_REC $MAIL $MAIL_ACC $DB $CRON $BACKUP - $IP $PACKAGE $FIREWALL' +# Parsing user favourites +if [ -e "$VESTA/data/users/$user/favourites.conf" ]; then + source $VESTA/data/users/$user/favourites.conf +fi -# Listing favourites +# Listing data case $format in - json) json_list_favourites ;; - plain) shell_list_favourites ;; - shell) shell_list_favourites | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-user-ips b/bin/v-list-user-ips index d2b7930c..dad6f6f8 100755 --- a/bin/v-list-user-ips +++ b/bin/v-list-user-ips @@ -16,89 +16,59 @@ format=${2-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_user_ips() { +# JSON list function +json_list() { echo '{' - fileds_count=$(echo "$fields" | wc -w) - for IP in $(ls $VESTA/data/ips/); do + ip_count=$(echo "$ips" |wc -l) + i=1 + for IP in $ips; do source $VESTA/data/ips/$IP - if [ "$OWNER" = "$user" ]; then - if [ -n "$data" ]; then - echo -e ' },' - fi - i=1 - for field in $fields; do - eval value=$field - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - data=1 - fi - fi - done + echo -n ' "'$IP'": { + "OWNER": "'$OWNER'", + "STATUS": "'$STATUS'", + "NAME": "'$NAME'", + "NAT": "'$NAT'" + }' + if [ "$i" -lt "$ip_count" ]; then + echo ',' else - if [ "$OWNER" = 'admin' ] && [ "$STATUS" = 'shared' ]; then - if [ -n "$data" ]; then - echo -e ' },' - fi - i=1 - - for field in $fields; do - eval value=$field - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - data=1 - fi - fi - done - fi + echo fi + ((i++)) done - if [ -n "$data" ]; then - echo -e ' }' - fi - echo -e '}' - + echo '}' } -# Shell function -shell_list_user_ips() { - for IP in $(ls $VESTA/data/ips/); do +# SHELL list function +shell_list() { + echo "IP NAT OWNER STATUS NAME" + echo "-- --- ----- ------ ---" + for IP in $ips; do source $VESTA/data/ips/$IP - if [ "$OWNER" = "$user" ]; then - for field in $fields; do - eval value=$field - if [ -z "$value" ]; then - value='NULL' - fi - echo -n "$value " - done - echo - else - if [ "$OWNER" = 'admin' ] && [ "$STATUS" = 'shared' ]; then - for field in $fields; do - eval value=$field - if [ -z "$value" ]; then - value='NULL' - fi - echo -n "$value " - done - echo - fi + if [ -z "$NAT" ]; then + NAT='no' fi + if [ -z "$NAME" ]; then + NAME='no' + fi + echo "$IP $NAT $OWNER $STATUS $NAME" + done +} + +# PLAIN list function +plain_list() { + for IP in $ips; do + source $VESTA/data/ips/$IP + echo -e "$IP\t$OWNER\t$STATUS\t$NAME\t$NAT" + done +} + +# CSV list function +csv_list() { + echo "IP,OWNER,STATUS,NAME,NAT" + for IP in $ips; do + source $VESTA/data/ips/$IP + echo "$IP,$OWNER,$STATUS,$NAME,$NAT" done } @@ -108,7 +78,7 @@ shell_list_user_ips() { #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -117,14 +87,21 @@ is_object_valid 'user' 'USER' "$user" #----------------------------------------------------------# # Defining fileds to select +owner='admin' +owner_ips=$(grep -A 1 -H "OWNER='$owner'" $VESTA/data/ips/*) +owner_ips=$(echo "$owner_ips" |grep "STATUS='shared'") +owner_ips=$(echo "$owner_ips" |cut -f 7 -d / |cut -f 1 -d -) +user_ips=$(grep -H "OWNER='$user'" $VESTA/data/ips/*) +user_ips=$(echo "$user_ips" |cut -f 7 -d / |cut -f 1 -d :) +ips=$(echo -e "$user_ips\n$owner_ips" |sort -u |sed "/^$/d") fields='$IP $OWNER $STATUS $NAME $NAT' -# Listing ips +# Listing data case $format in - json) json_list_user_ips ;; - plain) nohead=1; shell_list_user_ips ;; - shell) shell_list_user_ips | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' ;; + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-user-log b/bin/v-list-user-log index bcd0f7ce..2b4557f4 100755 --- a/bin/v-list-user-log +++ b/bin/v-list-user-log @@ -16,48 +16,71 @@ format=${2-shell} # Includes source $VESTA/func/main.sh -# Json func -json_list_history() { - echo '{' - fileds_count=$(echo $fields| wc -w ) - while read line; do - IFS=$'\n' - eval $line - if [ -n "$data" ]; then - echo -e ' },' +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(echo "$logs" |wc -l) + echo "{" + for str in $logs; do + eval $str + echo -n ' "'$ID'": { + "CMD": "'$CMD'", + "UNDO": "'$UNDO'", + "DATE": "'$DATE'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo fi - i=1 - IFS=' ' - for field in $fields; do - eval value=\"$field\" - value=$(echo "$value" | sed -e 's/"/\\"/g' -e "s/%quote%/'/g") - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - data=1 - fi - fi - done - done < $conf - if [ -n "$data" ]; then - echo -e ' }' - fi - echo -e '}' + ((i++)) + done + echo '}' } +shell_list() { + IFS=$'\n' + echo "DATE~TIME~CMD" + echo "----~----~---" + for str in $logs; do + eval $str + if [ -z "$DATE" ]; then + DATE='no' + fi + if [ -z "$TIME" ]; then + TIME='no' + fi + echo "$DATE~$TIME~$CMD" + done +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + for str in $logs; do + eval $str + echo -e "$ID\t$CMD\t$UNDO\t$TIME\t$DATE" + done +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "ID,CMD,UNDO,TIME,DATE" + for str in $logs; do + eval $str + echo "$ID,\"$CMD\",\"$UNDO\",$TIME,$DATE" + done +} #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -65,19 +88,14 @@ is_object_valid 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -# Defining config -conf=$USER_DATA/history.log +# Parsing history log +logs=$(tail -n 300 $USER_DATA/history.log 2>/dev/null) -# Defining fileds to select -fields="\$ID \$DATE \$TIME \$CMD \$UNDO" - -# Listing domains -case $format in - json) json_list_history ;; - plain) nohead=1; shell_list ;; - shell) fields='$ID~$DATE~$TIME~$CMD'; - shell_list |column -t -s '~';; - *) check_args '1' '0' 'USER [FORMAT]' +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t -s '~';; esac diff --git a/bin/v-list-user-notifications b/bin/v-list-user-notifications index 23cd3f87..1d9a976a 100755 --- a/bin/v-list-user-notifications +++ b/bin/v-list-user-notifications @@ -16,50 +16,69 @@ format=${2-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_notifications() { - echo '{' - fileds_count=$(echo $fields| wc -w ) - while read line; do - eval $line - if [ -n "$data" ]; then - echo -e ' },' +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep NID $USER_DATA/notifications.conf |wc -l) + echo "{" + while read str; do + eval $str + TOPIC=$(echo "$TOPIC" |sed -e "s/%quote%/'/g") + NOTICE=$(echo "$NOTICE" |sed -e "s/%quote%/'/g") + echo -n ' "'$NID'": { + "TOPIC": "'$TOPIC'", + "NOTICE": "'$NOTICE'", + "TYPE": "'$TYPE'", + "ACK": "'$ACK'", + "TPL": "'$TPL'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo fi - i=1 - IFS=' ' - for field in $fields; do - eval value=\"$field\" - value=$(echo "$value"|sed -e 's/"/\\"/g' -e "s/%quote%/'/g") - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - data=1 - fi - fi - done - done < $conf - if [ -n "$data" ]; then - echo -e ' }' - fi - echo -e '}' + ((i++)) + done < <(cat $USER_DATA/notifications.conf) + echo '}' } -# Shell function -shell_list_notifications() { - while read line ; do - eval $line +# SHELL list function +shell_list() { + IFS=$'\n' + while read str; do + eval $str echo "$TOPIC" |sed -e "s/%quote%/'/g" echo "$NOTICE" |sed -e "s/%quote%/'/g" echo "$DATE $TIME" echo "--" echo - done < $conf + done < <(cat $USER_DATA/notifications.conf) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + TOPIC=$(echo "$TOPIC" |sed -e "s/%quote%/'/g") + NOTICE=$(echo "$NOTICE" |sed -e "s/%quote%/'/g") + echo -e "$NID\t$TOPIC\t$NOTICE\t$TIME\t$DATE" + done < <(cat $USER_DATA/notifications.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo "NID,TOPIC,NOTICE,TIME,DATE" + while read str; do + eval $str + TOPIC=$(echo "$TOPIC" |sed -e "s/%quote%/'/g") + NOTICE=$(echo "$NOTICE" |sed -e "s/%quote%/'/g") + echo "$NID,\"$TOPIC\",\"$NOTICE\",$TIME,$DATE" + done < <(cat $USER_DATA/notifications.conf) } @@ -69,7 +88,7 @@ shell_list_notifications() { # Checking args check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -77,16 +96,12 @@ is_object_valid 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -# Defining fileds to select -conf=$USER_DATA/notifications.conf -fields='$NID $TOPIC $NOTICE $TYPE $ACK $TIME $DATE' - -# Listing favourites +# Listing data case $format in - json) json_list_notifications ;; - plain) shell_list_notifications ;; - shell) shell_list_notifications ;; - *) check_args '1' '0' 'USER [FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-user-ns b/bin/v-list-user-ns index 5c950fa5..7754285d 100755 --- a/bin/v-list-user-ns +++ b/bin/v-list-user-ns @@ -16,30 +16,41 @@ format=${2-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_ns() { - ns=$(grep "^NS='" $USER_DATA/user.conf |cut -f 2 -d \') - echo '[' +# JSON list function +json_list() { i=1 - nslistc=$(echo -e "${ns//,/\\n}"|wc -l) + objects=$(echo -e "${ns//,/\\n}" |wc -l) + echo '[' for nameserver in ${ns//,/ };do - if [ "$i" -ne "$nslistc" ]; then + if [ "$i" -ne "$objects" ]; then echo -e "\t\"$nameserver\"," else echo -e "\t\"$nameserver\"" fi (( ++i)) done - echo "]" + echo ']' } -# Shell function -shell_list_ns() { - ns=$(grep "^NS='" $USER_DATA/user.conf |cut -f 2 -d \') - if [ -z "$nohead" ]; then - echo "NAMESERVER" - echo "----------" - fi +# SHELL list function +shell_list() { + echo "NS" + echo "--" + for nameserver in ${ns//,/ };do + echo "$nameserver" + done +} + +# PLAIN list function +plain_list() { + for nameserver in ${ns//,/ };do + echo "$nameserver" + done +} + +# CSV list function +csv_list() { + echo "NAMESERVER" for nameserver in ${ns//,/ };do echo "$nameserver" done @@ -51,7 +62,7 @@ shell_list_ns() { #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -59,12 +70,15 @@ is_object_valid 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -# Listing nameservers -case $format in - json) json_list_ns ;; - plain) nohead=1; shell_list_ns ;; - shell) shell_list_ns ;; - *) check_args '1' '0' 'USER [FORMAT]' +# Parsing name servers +ns=$(grep "^NS='" $USER_DATA/user.conf |cut -f 2 -d \') + +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-user-package b/bin/v-list-user-package index 38a390f8..26d80923 100755 --- a/bin/v-list-user-package +++ b/bin/v-list-user-package @@ -17,43 +17,73 @@ format=${2-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_package() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - pkg_data=$(cat $VESTA/data/packages/$PACKAGE.pkg) +# JSON list function +json_list() { echo '{' - eval $pkg_data - for field in $fields; do - eval value=$field - if [ $i -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ $fileds_count -eq $i ]; then - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - fi - fi - (( ++i)) - done - if [ -n "$value" ]; then - echo -e ' }' - fi - echo -e '}' + echo ' "'$PACKAGE'": { + "WEB_TEMPLATE": "'$WEB_TEMPLATE'", + "PROXY_TEMPLATE": "'$PROXY_TEMPLATE'", + "DNS_TEMPLATE": "'$DNS_TEMPLATE'", + "WEB_DOMAINS": "'$WEB_DOMAINS'", + "WEB_ALIASES": "'$WEB_ALIASES'", + "DNS_DOMAINS": "'$DNS_DOMAINS'", + "DNS_RECORDS": "'$DNS_RECORDS'", + "MAIL_DOMAINS": "'$MAIL_DOMAINS'", + "MAIL_ACCOUNTS": "'$MAIL_ACCOUNTS'", + "DATABASES": "'$DATABASES'", + "CRON_JOBS": "'$CRON_JOBS'", + "DISK_QUOTA": "'$DISK_QUOTA'", + "BANDWIDTH": "'$BANDWIDTH'", + "NS": "'$NS'", + "SHELL": "'$SHELL'", + "BACKUPS": "'$BACKUPS'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell function -shell_list_package() { - line=$(cat $VESTA/data/packages/$PACKAGE.pkg) - eval $line - for field in $fields; do - eval key="$field" - if [ -z "$key" ]; then - key='NULL' - fi - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + echo "PACKAGE: $PACKAGE" + echo "WEB TEMPLATE: $WEB_TEMPLATE" + echo "PROXY TEMPLATE: $PROXY_TEMPLATE" + echo "DNS TEMPLATE: $DNS_TEMPLATE" + echo "WEB DOMAINS: $WEB_DOMAINS" + echo "WEB ALIASES: $WEB_ALIASES" + echo "DNS DOMAINS: $DNS_DOMAINS" + echo "DNS RECORDS: $DNS_RECORDS" + echo "MAIL DOMAINS: $MAIL_DOMAINS" + echo "MAIL ACCOUNTS: $MAIL_ACCOUNTS" + echo "DATABASES: $DATABASES" + echo "CRON JOBS: $CRON_JOBS" + echo "DISK QUOTA: $DISK_QUOTA" + echo "BANDWIDTH: $BANDWIDTH" + echo "NS: $NS" + echo "SHELL: $SHELL" + echo "BACKUPS: $BACKUPS" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -ne "$PACKAGE\t$WEB_TEMPLATE\t$PROXY_TEMPLATE\t$DNS_TEMPLATE\t" + echo -ne "$WEB_DOMAINS\t$WEB_ALIASES\t$DNS_DOMAINS\t$DNS_RECORDS\t" + echo -ne "$MAIL_DOMAINS\t$MAIL_ACCOUNTS\t$DATABASES\t$CRON_JOBS\t" + echo -e "$DISK_QUOTA\t$BANDWIDTH\t$NS\t$SHELL\t$BACKUPS\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo -n "PACKAGE,WEB_TEMPLATE,PROXY_TEMPLATE,DNS_TEMPLATE," + echo -n "WEB_DOMAINS,WEB_ALIASES,DNS_DOMAINS,DNS_RECORDS," + echo -n "MAIL_DOMAINS,MAIL_ACCOUNTS,DATABASES,CRON_JOBS," + echo "DISK_QUOTA,BANDWIDTH,NS,SHELL,BACKUPS,TIME,DATE" + echo -n "$PACKAGE,$WEB_TEMPLATE,$PROXY_TEMPLATE,$DNS_TEMPLATE," + echo -n "$WEB_DOMAINS,$WEB_ALIASES,$DNS_DOMAINS,$DNS_RECORDS," + echo -n "$MAIL_DOMAINS,$MAIL_ACCOUNTS,$DATABASES,$CRON_JOBS," + echo "$DISK_QUOTA,$BANDWIDTH,\"$NS\",$SHELL,$BACKUPS,$TIME,$DATE" } @@ -63,7 +93,7 @@ shell_list_package() { # Checking args check_args '1' "$#" 'PACKAGE [FORMAT]' -validate_format 'package' +is_format_valid 'package' is_package_valid @@ -71,18 +101,15 @@ is_package_valid # Action # #----------------------------------------------------------# -# Defining fileds to select -fields='$PACKAGE $WEB_TEMPLATE $PROXY_TEMPLATE $DNS_TEMPLATE $WEB_DOMAINS - $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS $MAIL_DOMAINS $MAIL_ACCOUNTS - $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH $NS $SHELL $BACKUPS $TIME - $DATE' +# Parsing package +source $VESTA/data/packages/$PACKAGE.pkg -# Listing ip -case $format in - json) json_list_package ;; - plain) shell_list_package ;; - shell) shell_list_package | column -t ;; - *) check_args '1' '0' 'IP [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-user-packages b/bin/v-list-user-packages index 4f052342..3c923879 100755 --- a/bin/v-list-user-packages +++ b/bin/v-list-user-packages @@ -15,53 +15,85 @@ format=${1-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_pkgs() { - echo '{' - fileds_count=$(echo "$fields" | wc -w) - for package in $(ls --sort=time $VESTA/data/packages |grep .pkg); do + +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(echo "$packages" |wc -l) + echo "{" + for package in $packages; do PACKAGE=${package/.pkg/} - pkg_data=$(cat $VESTA/data/packages/$package) - eval $pkg_data - if [ -n "$data" ]; then - echo -e ' },' + source $VESTA/data/packages/$package + echo -n ' "'$PACKAGE'": { + "WEB_TEMPLATE": "'$WEB_TEMPLATE'", + "PROXY_TEMPLATE": "'$PROXY_TEMPLATE'", + "DNS_TEMPLATE": "'$DNS_TEMPLATE'", + "WEB_DOMAINS": "'$WEB_DOMAINS'", + "WEB_ALIASES": "'$WEB_ALIASES'", + "DNS_DOMAINS": "'$DNS_DOMAINS'", + "DNS_RECORDS": "'$DNS_RECORDS'", + "MAIL_DOMAINS": "'$MAIL_DOMAINS'", + "MAIL_ACCOUNTS": "'$MAIL_ACCOUNTS'", + "DATABASES": "'$DATABASES'", + "CRON_JOBS": "'$CRON_JOBS'", + "DISK_QUOTA": "'$DISK_QUOTA'", + "BANDWIDTH": "'$BANDWIDTH'", + "NS": "'$NS'", + "SHELL": "'$SHELL'", + "BACKUPS": "'$BACKUPS'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo fi - i=1 - for field in $fields; do - eval value=$field - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"," - else - echo -e "\t\t\"${field//$/}\": \"${value//,/, }\"" - data=1 - fi - fi - done + ((i++)) done - if [ -n "$data" ]; then - echo -e ' }' - fi - echo -e '}' + echo '}' } -# Shell fnction -shell_list_pkgs() { - for package in $(ls -t $VESTA/data/packages |grep .pkg); do +# SHELL list function +shell_list() { + echo "PKG TPL WEB DNS MAIL DB SHELL DISK BW" + echo "--- --- --- --- ---- -- ----- ---- --" + for package in $packages; do + source $VESTA/data/packages/$package PACKAGE=${package/.pkg/} - pkg_descr=$(cat $VESTA/data/packages/$package) - eval $pkg_descr - if [ -z "$nohead" ]; then - echo '----------' - fi - for field in $fields; do - eval value=$field - echo -e "${field//$/}: $value" - done + package_data=$(cat $VESTA/data/packages/$package) + package_data=$(echo "$package_data" |sed -e 's/unlimited/unlim/g') + eval $package_data + echo -n "$PACKAGE $WEB_TEMPLATE $WEB_DOMAINS $DNS_DOMAINS " + echo "$MAIL_DOMAINS $DATABASES $SHELL $DISK_QUOTA $BANDWIDTH" + done +} + +# PLAIN list function +plain_list() { + for package in $packages; do + source $VESTA/data/packages/$package + PACKAGE=${package/.pkg/} + echo -ne "$PACKAGE\t$WEB_TEMPLATE\t$PROXY_TEMPLATE\t$DNS_TEMPLATE\t" + echo -ne "$WEB_DOMAINS\t$WEB_ALIASES\t$DNS_DOMAINS\t$DNS_RECORDS\t" + echo -ne "$MAIL_DOMAINS\t$MAIL_ACCOUNTS\t$DATABASES\t$CRON_JOBS\t" + echo -e "$DISK_QUOTA\t$BANDWIDTH\t$NS\t$SHELL\t$BACKUPS\t$TIME\t$DATE" + done +} + +# CSV list function +csv_list() { + echo -n "PACKAGE,WEB_TEMPLATE,PROXY_TEMPLATE,DNS_TEMPLATE," + echo -n "WEB_DOMAINS,WEB_ALIASES,DNS_DOMAINS,DNS_RECORDS," + echo -n "MAIL_DOMAINS,MAIL_ACCOUNTS,DATABASES,CRON_JOBS," + echo "DISK_QUOTA,BANDWIDTH,NS,SHELL,BACKUPS,TIME,DATE" + for package in $packages; do + PACKAGE=${package/.pkg/} + echo -n "$PACKAGE,$WEB_TEMPLATE,$PROXY_TEMPLATE,$DNS_TEMPLATE," + echo -n "$WEB_DOMAINS,$WEB_ALIASES,$DNS_DOMAINS,$DNS_RECORDS," + echo -n "$MAIL_DOMAINS,$MAIL_ACCOUNTS,$DATABASES,$CRON_JOBS," + echo "$DISK_QUOTA,$BANDWIDTH,\"$NS\",$SHELL,$BACKUPS,$TIME,$DATE" done } @@ -70,18 +102,15 @@ shell_list_pkgs() { # Action # #----------------------------------------------------------# -# Defining fields -fields='$PACKAGE $WEB_TEMPLATE $BACKEND_TEMPLATE $PROXY_TEMPLATE - $DNS_TEMPLATE $WEB_DOMAINS $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS - $MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH - $NS $SHELL $BACKUPS $TIME $DATE' +# Parsing packages +packages=$(ls --sort=time $VESTA/data/packages |grep .pkg) -# Listing domains +# Listing data case $format in - json) json_list_pkgs ;; - plain) nohead=1; shell_list_pkgs ;; - shell) shell_list_pkgs | column -t ;; - *) check_args '1' '0' '[FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-user-stats b/bin/v-list-user-stats index 8b56fcc8..11b867af 100755 --- a/bin/v-list-user-stats +++ b/bin/v-list-user-stats @@ -1,6 +1,6 @@ #!/bin/bash # info: list user stats -# options: USER [FORMAT] +# options: [FORMAT] # # The function for listing user statistics @@ -16,13 +16,105 @@ format=${2-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep DATE $USER_DATA/stats.log |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$DATE'": { + "TIME": "'$TIME'", + "PACKAGE": "'$PACKAGE'", + "IP_OWNED": "'$IP_OWNED'", + "DISK_QUOTA": "'$DISK_QUOTA'", + "U_DISK": "'$U_DISK'", + "U_DISK_DIRS": "'$U_DISK_DIRS'", + "U_DISK_WEB": "'$U_DISK_WEB'", + "U_DISK_MAIL": "'$U_DISK_MAIL'", + "U_DISK_DB": "'$U_DISK_DB'", + "BANDWIDTH": "'$BANDWIDTH'", + "U_BANDWIDTH": "'$U_BANDWIDTH'", + "U_WEB_DOMAINS": "'$U_WEB_DOMAINS'", + "U_WEB_SSL": "'$U_WEB_SSL'", + "U_WEB_ALIASES": "'$U_WEB_ALIASES'", + "U_DNS_DOMAINS": "'$U_DNS_DOMAINS'", + "U_DNS_RECORDS": "'$U_DNS_RECORDS'", + "U_MAIL_DOMAINS": "'$U_MAIL_DOMAINS'", + "U_MAIL_DKIM": "'$U_MAIL_DKIM'", + "U_MAIL_ACCOUNTS": "'$U_MAIL_ACCOUNTS'", + "U_DATABASES": "'$U_DATABASES'", + "U_CRON_JOBS": "'$U_CRON_JOBS'", + "U_BACKUPS": "'$U_BACKUPS'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $USER_DATA/stats.log) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "DATE WEB DNS MAIL DB BACKUPS IP DISK BW" + echo "---- --- --- ---- -- ------- -- ---- --" + while read str; do + eval $str + if [ -z "$U_USERS" ]; then + U_USERS=1 + fi + echo -n "$DATE $U_WEB_DOMAINS $U_DNS_DOMAINS " + echo -n "$U_MAIL_DOMAINS $U_DATABASES $U_BACKUPS $IP_OWNED " + echo "$U_DISK $U_BANDWIDTH" + done < <(cat $USER_DATA/stats.log) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -ne "$DATE\t$TIME\t$PACKAGE\t$IP_OWNED\t$DISK_QUOTA\t$U_DISK\t" + echo -ne "$U_DISK_DIRS\t$U_DISK_WEB\t$U_DISK_MAIL\t$U_DISK_DB\t" + echo -ne "$BANDWIDTH\t$U_BANDWIDTH\t$U_WEB_DOMAINS\t$U_WEB_SSL\t" + echo -ne "$U_WEB_ALIASES\t$U_DNS_DOMAINS\t$U_DNS_RECORDS\t" + echo -ne "$U_MAIL_DOMAINS\t$U_MAIL_DKIM\t$U_MAIL_ACCOUNTS\t" + echo -e "$U_DATABASES\t$U_CRON_JOBS\t$U_BACKUPS" + done < <(cat $USER_DATA/stats.log) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo -n "DATE,TIME,PACKAGE,IP_OWNED,DISK_QUOTA,U_DISK," + echo -n "U_DISK_DIRS,U_DISK_WEB,U_DISK_MAIL,U_DISK_DB," + echo -n "BANDWIDTH,U_BANDWIDTH,U_WEB_DOMAINS,U_WEB_SSL," + echo -n "U_WEB_ALIASES,U_DNS_DOMAINS,U_DNS_RECORDS," + echo -n "U_MAIL_DOMAINS,U_MAIL_DKIM,U_MAIL_ACCOUNTS," + echo "U_DATABASES,U_CRON_JOBS,U_BACKUPS" + + while read str; do + eval $str + echo -n "$DATE,$TIME,$PACKAGE,$IP_OWNED,$DISK_QUOTA,$U_DISK," + echo -n "$U_DISK_DIRS,$U_DISK_WEB,$U_DISK_MAIL,$U_DISK_DB," + echo -n "$BANDWIDTH,$U_BANDWIDTH,$U_WEB_DOMAINS,$U_WEB_SSL," + echo -n "$U_WEB_ALIASES,$U_DNS_DOMAINS,$U_DNS_RECORDS," + echo -n "$U_MAIL_DOMAINS,$U_MAIL_DKIM,$U_MAIL_ACCOUNTS," + echo "$U_DATABASES,$U_CRON_JOBS,$U_BACKUPS" + done < <(cat $USER_DATA/stats.log) +} + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -36,21 +128,12 @@ if [ ! -e "$conf" ]; then touch $conf fi -# Defining fileds to select -fields="\$DATE \$TIME \$PACKAGE \$IP_OWNED \$DISK_QUOTA \$U_DISK \$U_DISK_DIRS" -fields="$fields \$U_DISK_WEB \$U_DISK_MAIL \$U_DISK_DB \$BANDWIDTH" -fields="$fields \$U_BANDWIDTH \$U_WEB_DOMAINS \$U_WEB_SSL \$U_WEB_ALIASES" -fields="$fields \$U_DNS_DOMAINS \$U_DNS_RECORDS \$U_MAIL_DOMAINS \$U_MAIL_DKIM" -fields="$fields \$U_MAIL_ACCOUNTS \$U_DATABASES \$U_CRON_JOBS \$U_BACKUPS" - -# Listing domains -case $format in +# Listing data +case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$DATE $PACKAGE $U_DISK $U_BANDWIDTH $U_WEB_DOMAINS'; - fields="$fields \$U_DATABASES" - shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-users b/bin/v-list-users index 4c65b105..14a6d007 100755 --- a/bin/v-list-users +++ b/bin/v-list-users @@ -1,8 +1,8 @@ #!/bin/bash -# info: list system users +# info: list users # options: [FORMAT] # -# The function for obtaining the list of all server's users. +# The function to obtain the list of all system users. #----------------------------------------------------------# @@ -12,59 +12,148 @@ # Argument definition format=${1-shell} -# Json function -json_list_users() { +# JSON list function +json_list() { echo '{' - fileds_count=$(echo "$fields" | wc -w) - for USER in $(grep @ /etc/passwd|cut -f 1 -d :); do + object_count=$(grep '@' /etc/passwd |wc -l) + i=1 + while read USER; do source $VESTA/data/users/$USER/user.conf - if [ -n "$data" ]; then - echo -e ' },' + echo -n ' "'$USER'": { + "FNAME": "'$FNAME'", + "LNAME": "'$LNAME'", + "PACKAGE": "'$PACKAGE'", + "WEB_TEMPLATE": "'$WEB_TEMPLATE'", + "BACKEND_TEMPLATE": "'$BACKEND_TEMPLATE'", + "PROXY_TEMPLATE": "'$PROXY_TEMPLATE'", + "DNS_TEMPLATE": "'$DNS_TEMPLATE'", + "WEB_DOMAINS": "'$WEB_DOMAINS'", + "WEB_ALIASES": "'$WEB_ALIASES'", + "DNS_DOMAINS": "'$DNS_DOMAINS'", + "DNS_RECORDS": "'$DNS_RECORDS'", + "MAIL_DOMAINS": "'$MAIL_DOMAINS'", + "MAIL_ACCOUNTS": "'$MAIL_ACCOUNTS'", + "DATABASES": "'$DATABASES'", + "CRON_JOBS": "'$CRON_JOBS'", + "DISK_QUOTA": "'$DISK_QUOTA'", + "BANDWIDTH": "'$BANDWIDTH'", + "NS": "'$NS'", + "SHELL": "'$SHELL'", + "BACKUPS": "'$BACKUPS'", + "CONTACT": "'$CONTACT'", + "CRON_REPORTS": "'$CRON_REPORTS'", + "RKEY": "'$RKEY'", + "SUSPENDED": "'$SUSPENDED'", + "SUSPENDED_USERS": "'$SUSPENDED_USERS'", + "SUSPENDED_WEB": "'$SUSPENDED_WEB'", + "SUSPENDED_DNS": "'$SUSPENDED_DNS'", + "SUSPENDED_MAIL": "'$SUSPENDED_MAIL'", + "SUSPENDED_DB": "'$SUSPENDED_DB'", + "SUSPENDED_CRON": "'$SUSPENDED_CRON'", + "IP_AVAIL": "'$IP_AVAIL'", + "IP_OWNED": "'$IP_OWNED'", + "U_USERS": "'$U_USERS'", + "U_DISK": "'$U_DISK'", + "U_DISK_DIRS": "'$U_DISK_DIRS'", + "U_DISK_WEB": "'$U_DISK_WEB'", + "U_DISK_MAIL": "'$U_DISK_MAIL'", + "U_DISK_DB": "'$U_DISK_DB'", + "U_BANDWIDTH": "'$U_BANDWIDTH'", + "U_WEB_DOMAINS": "'$U_WEB_DOMAINS'", + "U_WEB_SSL": "'$U_WEB_SSL'", + "U_WEB_ALIASES": "'$U_WEB_ALIASES'", + "U_DNS_DOMAINS": "'$U_DNS_DOMAINS'", + "U_DNS_RECORDS": "'$U_DNS_RECORDS'", + "U_MAIL_DOMAINS": "'$U_MAIL_DOMAINS'", + "U_MAIL_DKIM": "'$U_MAIL_DKIM'", + "U_MAIL_ACCOUNTS": "'$U_MAIL_ACCOUNTS'", + "U_DATABASES": "'$U_DATABASES'", + "U_CRON_JOBS": "'$U_CRON_JOBS'", + "U_BACKUPS": "'$U_BACKUPS'", + "LANGUAGE": "'$LANGUAGE'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$object_count" ]; then + echo ',' + else + echo fi - i=1 - for field in $fields; do - eval value=$field - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"$value\"," - else - echo -e "\t\t\"${field//$/}\": \"$value\"" - data=1 - fi - fi - done - done - if [ -n "$data" ]; then - echo -e ' }' - fi - echo -e '}' + ((i++)) + done < <(grep '@' /etc/passwd |cut -f1 -d:) + + echo '}' } -# Shell function -shell_list_users() { - if [ -z "$nohead" ]; then - echo "${fields//$/}" - for a in $fields; do - echo -e "--------- \c" - done - echo - fi - - for USER in $(grep @ /etc/passwd|cut -f 1 -d :); do +# SHELL list function +shell_list() { + echo "USER PKG WEB DNS MAIL DB DISK BW SPND DATE" + echo "---- --- --- --- --- -- ---- -- ---- ----" + while read USER; do source $VESTA/data/users/$USER/user.conf - for field in $fields; do - eval value=$field - if [ -z "$value" ]; then - value='NULL' - fi - echo -n "$value " - done - echo - done + echo -n "$USER $PACKAGE $U_WEB_DOMAINS $U_DNS_DOMAINS $U_MAIL_DOMAINS" + echo " $U_DATABASES $U_DISK $U_BANDWIDTH $SUSPENDED $DATE" + done < <(grep '@' /etc/passwd |cut -f1 -d:) +} + +# PLAIN list function +plain_list() { + while read USER; do + source $VESTA/data/users/$USER/user.conf + echo -ne "$USER\t$FNAME\t$LNAME\t$PACKAGE\t$WEB_TEMPLATE\t" + echo -ne "$BACKEND_TEMPLATE\t$PROXY_TEMPLATE\t$DNS_TEMPLATE\t" + echo -ne "$WEB_DOMAINS\t$WEB_ALIASES\t$DNS_DOMAINS\t$DNS_RECORDS\t" + echo -ne "$MAIL_DOMAINS\t$MAIL_ACCOUNTS\t$DATABASES\t$CRON_JOBS\t" + echo -ne "$DISK_QUOTA\t$BANDWIDTH\t$NS\t$SHELL\t$BACKUPS\t" + echo -ne "$CONTACT\t$CRON_REPORTS\t$RKEY\t$SUSPENDED\t" + echo -ne "$SUSPENDED_USERS\t$SUSPENDED_WEB\t$SUSPENDED_DNS\t" + echo -ne "$SUSPENDED_MAIL\t$SUSPENDED_DB\t$SUSPENDED_CRON\t" + echo -ne "$IP_AVAIL\t$IP_OWNED\t$U_USERS\t$U_DISK\t$U_DISK_DIRS\t" + echo -ne "$U_DISK_WEB\t$U_DISK_MAIL\t$U_DISK_DB\t$U_BANDWIDTH\t" + echo -ne "$U_WEB_DOMAINS\t$U_WEB_SSL\t$U_WEB_ALIASES\t" + echo -ne "$U_DNS_DOMAINS\t$U_DNS_RECORDS\t$U_MAIL_DOMAINS\t" + echo -ne "$U_MAIL_DKIM\t$U_MAIL_ACCOUNTS\t$U_DATABASES\t" + echo -e "$U_CRON_JOBS\t$U_BACKUPS\t$LANGUAGE\t$TIME\t$DATE\t" + done < <(grep '@' /etc/passwd |cut -f1 -d:) +} + +# CSV list function +csv_list() { + echo -n "USER,FNAME,LNAME,PACKAGE,WEB_TEMPLATE,BACKEND_TEMPLATE," + echo -n "PROXY_TEMPLATE,DNS_TEMPLATE,WEB_DOMAINS,WEB_ALIASES," + echo -n "DNS_DOMAINS,DNS_RECORDS,MAIL_DOMAINS,MAIL_ACCOUNTS," + echo -n "DATABASES,CRON_JOBS,DISK_QUOTA,BANDWIDTH,NS,HOME,SHELL," + echo -n "BACKUPS,CONTACT,CRON_REPORTS,RKEY,SUSPENDED,SUSPENDED_USERS," + echo -n "SUSPENDED_WEB,SUSPENDED_DNS,SUSPENDED_MAIL,SUSPENDED_DB," + echo -n "SUSPENDED_CRON,IP_AVAIL,IP_OWNED,U_USERS,U_DISK,U_DISK_DIRS," + echo -n "U_DISK_WEB,U_DISK_MAIL,U_DISK_DB,U_BANDWIDTH,U_WEB_DOMAINS," + echo -n "U_WEB_SSL,U_WEB_ALIASES,U_DNS_DOMAINS,U_DNS_RECORDS," + echo -n "U_MAIL_DOMAINS,U_MAIL_DKIM,U_MAIL_ACCOUNTS,U_DATABASES" + echo "U_CRON_JOBS,U_BACKUPS,LANGUAGE,TIME,DATE" + while read USER; do + source $VESTA/data/users/$USER/user.conf + echo -n "$USER,\"$FNAME\",\"$LNAME\",$PACKAGE,$WEB_TEMPLATE," + echo -n "$BACKEND_TEMPLATE,$PROXY_TEMPLATE,$DNS_TEMPLATE," + echo -n "$WEB_DOMAINS,$WEB_ALIASES,$DNS_DOMAINS,$DNS_RECORDS," + echo -n "$MAIL_DOMAINS,$MAIL_ACCOUNTS,$DATABASES,$CRON_JOBS," + echo -n "$DISK_QUOTA,$BANDWIDTH,\"$NS\",$HOME,$SHELL,$BACKUPS," + echo -n "$CONTACT,$CRON_REPORTS,\"$RKEY\",$SUSPENDED," + echo -n "$SUSPENDED_USERS,$SUSPENDED_WEB,$SUSPENDED_DNS," + echo -n "$SUSPENDED_MAIL,$SUSPENDED_DB,$SUSPENDED_CRON,$IP_AVAIL," + echo -n "$IP_OWNED,$U_USERS,$U_DISK,$U_DISK_DIRS,$U_DISK_WEB," + echo -n "$U_DISK_MAIL,$U_DISK_DB,$U_BANDWIDTH,$U_WEB_DOMAINS," + echo -n "$U_WEB_SSL,$U_WEB_ALIASES,$U_DNS_DOMAINS,$U_DNS_RECORDS," + echo -n "$U_MAIL_DOMAINS,$U_MAIL_DKIM,$U_MAIL_ACCOUNTS,$U_DATABASES," + echo "$U_CRON_JOBS,$U_BACKUPS,$LANGUAGE,$TIME,$DATE" + done < <(grep '@' /etc/passwd |cut -f1 -d:) +} + +# Raw list function +raw_list() { + while read USER; do + echo $VESTA/data/users/$USER/user.conf + cat $VESTA/data/users/$USER/user.conf + done < <(grep '@' /etc/passwd |cut -f1 -d:) } @@ -72,27 +161,12 @@ shell_list_users() { # Action # #----------------------------------------------------------# -# Defining fileds to select -fields="\$USER \$FNAME \$LNAME \$PACKAGE \$WEB_TEMPLATE \$BACKEND_TEMPLATE" -fields="$fields \$PROXY_TEMPLATE \$DNS_TEMPLATE \$WEB_DOMAINS \$WEB_ALIASES" -fields="$fields \$DNS_DOMAINS \$DNS_RECORDS \$MAIL_DOMAINS \$MAIL_ACCOUNTS" -fields="$fields \$DATABASES \$CRON_JOBS \$DISK_QUOTA \$BANDWIDTH \$NS \$SHELL" -fields="$fields \$BACKUPS \$CONTACT \$CRON_REPORTS \$RKEY \$SUSPENDED" -fields="$fields \$SUSPENDED_USERS \$SUSPENDED_WEB \$SUSPENDED_DNS" -fields="$fields \$SUSPENDED_MAIL \$SUSPENDED_DB \$SUSPENDED_CRON \$IP_AVAIL" -fields="$fields \$IP_OWNED \$U_USERS \$U_DISK \$U_DISK_DIRS \$U_DISK_WEB" -fields="$fields \$U_DISK_MAIL \$U_DISK_DB \$U_BANDWIDTH \$U_WEB_DOMAINS" -fields="$fields \$U_WEB_SSL \$U_WEB_ALIASES \$U_DNS_DOMAINS \$U_DNS_RECORDS" -fields="$fields \$U_MAIL_DOMAINS \$U_MAIL_DKIM \$U_MAIL_ACCOUNTS" -fields="$fields \$U_DATABASES \$U_CRON_JOBS \$U_BACKUPS \$LANGUAGE" -fields="$fields \$TIME \$DATE" - -# Listing domains -case $format in - json) json_list_users ;; - plain) nohead=1; shell_list_users ;; - shell) fields='$USER $PACKAGE $U_DISK $U_BANDWIDTH $SUSPENDED $DATE'; - shell_list_users | column -t ;; +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-users-stats b/bin/v-list-users-stats index 61358ef2..2a267964 100755 --- a/bin/v-list-users-stats +++ b/bin/v-list-users-stats @@ -15,6 +15,100 @@ format=${1-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep DATE $VESTA/data/users/admin/overall_stats.log |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$DATE'": { + "TIME": "'$TIME'", + "PACKAGE": "'$PACKAGE'", + "IP_OWNED": "'$IP_OWNED'", + "DISK_QUOTA": "'$DISK_QUOTA'", + "U_DISK": "'$U_DISK'", + "U_DISK_DIRS": "'$U_DISK_DIRS'", + "U_DISK_WEB": "'$U_DISK_WEB'", + "U_DISK_MAIL": "'$U_DISK_MAIL'", + "U_DISK_DB": "'$U_DISK_DB'", + "BANDWIDTH": "'$BANDWIDTH'", + "U_BANDWIDTH": "'$U_BANDWIDTH'", + "U_WEB_DOMAINS": "'$U_WEB_DOMAINS'", + "U_WEB_SSL": "'$U_WEB_SSL'", + "U_WEB_ALIASES": "'$U_WEB_ALIASES'", + "U_DNS_DOMAINS": "'$U_DNS_DOMAINS'", + "U_DNS_RECORDS": "'$U_DNS_RECORDS'", + "U_MAIL_DOMAINS": "'$U_MAIL_DOMAINS'", + "U_MAIL_DKIM": "'$U_MAIL_DKIM'", + "U_MAIL_ACCOUNTS": "'$U_MAIL_ACCOUNTS'", + "U_DATABASES": "'$U_DATABASES'", + "U_CRON_JOBS": "'$U_CRON_JOBS'", + "U_BACKUPS": "'$U_BACKUPS'", + "U_USERS": "'$U_USERS'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $VESTA/data/users/admin/overall_stats.log) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "DATE USER WEB DNS MAIL DB BACKUPS IP DISK BW" + echo "---- ---- --- --- ---- -- ------- -- ---- --" + while read str; do + eval $str + if [ -z "$U_USERS" ]; then + U_USERS=1 + fi + echo -n "$DATE $U_USERS $U_WEB_DOMAINS $U_DNS_DOMAINS " + echo -n "$U_MAIL_DOMAINS $U_DATABASES $U_BACKUPS $IP_OWNED " + echo "$U_DISK $U_BANDWIDTH" + done < <(cat $VESTA/data/users/admin/overall_stats.log) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -ne "$DATE\t$TIME\t$PACKAGE\t$IP_OWNED\t$DISK_QUOTA\t$U_DISK\t" + echo -ne "$U_DISK_DIRS\t$U_DISK_WEB\t$U_DISK_MAIL\t$U_DISK_DB\t" + echo -ne "$BANDWIDTH\t$U_BANDWIDTH\t$U_WEB_DOMAINS\t$U_WEB_SSL\t" + echo -ne "$U_WEB_ALIASES\t$U_DNS_DOMAINS\t$U_DNS_RECORDS\t" + echo -ne "$U_MAIL_DOMAINS\t$U_MAIL_DKIM\t$U_MAIL_ACCOUNTS\t" + echo -e "$U_DATABASES\t$U_CRON_JOBS\t$U_BACKUPS\t$U_USERS" + done < <(cat $VESTA/data/users/admin/overall_stats.log) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo -n "DATE,TIME,PACKAGE,IP_OWNED,DISK_QUOTA,U_DISK," + echo -n "U_DISK_DIRS,U_DISK_WEB,U_DISK_MAIL,U_DISK_DB," + echo -n "BANDWIDTH,U_BANDWIDTH,U_WEB_DOMAINS,U_WEB_SSL," + echo -n "U_WEB_ALIASES,U_DNS_DOMAINS,U_DNS_RECORDS," + echo -n "U_MAIL_DOMAINS,U_MAIL_DKIM,U_MAIL_ACCOUNTS," + echo "U_DATABASES,U_CRON_JOBS,U_BACKUPS,U_USERS" + + while read str; do + eval $str + echo -n "$DATE,$TIME,$PACKAGE,$IP_OWNED,$DISK_QUOTA,$U_DISK," + echo -n "$U_DISK_DIRS,$U_DISK_WEB,$U_DISK_MAIL,$U_DISK_DB," + echo -n "$BANDWIDTH,$U_BANDWIDTH,$U_WEB_DOMAINS,$U_WEB_SSL," + echo -n "$U_WEB_ALIASES,$U_DNS_DOMAINS,$U_DNS_RECORDS," + echo -n "$U_MAIL_DOMAINS,$U_MAIL_DKIM,$U_MAIL_ACCOUNTS," + echo "$U_DATABASES,$U_CRON_JOBS,$U_BACKUPS,$U_USERS" + done < <(cat $VESTA/data/users/admin/overall_stats.log) +} + #----------------------------------------------------------# # Verifications # @@ -33,21 +127,12 @@ if [ ! -e "$conf" ]; then touch $conf fi -# Defining fileds to select -fields="\$DATE \$TIME \$PACKAGE \$IP_OWNED \$DISK_QUOTA \$U_DISK \$U_DISK_DIRS" -fields="$fields \$U_DISK_WEB \$U_DISK_MAIL \$U_DISK_DB \$BANDWIDTH" -fields="$fields \$U_BANDWIDTH \$U_WEB_DOMAINS \$U_WEB_SSL \$U_WEB_ALIASES" -fields="$fields \$U_DNS_DOMAINS \$U_DNS_RECORDS \$U_MAIL_DOMAINS \$U_MAIL_DKIM" -fields="$fields \$U_MAIL_ACCOUNTS \$U_DATABASES \$U_CRON_JOBS \$U_BACKUPS" - -# Listing domains -case $format in +# Listing data +case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$DATE $U_DISK $U_BANDWIDTH $U_WEB_DOMAINS $U_DATABASES'; - fields="$fields \$U_DATABASES" - shell_list | column -t ;; - *) check_args '1' '0' '[FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-web-domain b/bin/v-list-web-domain index 13f1fd71..a3e162ab 100755 --- a/bin/v-list-web-domain +++ b/bin/v-list-web-domain @@ -1,9 +1,8 @@ #!/bin/bash -# info: list web domain +# info: list web domain parameters # options: USER DOMAIN [FORMAT] # -# The function of obtaining the list of domain parameters. This call, just as -# all v_list_* calls, supports 3 formats - json, shell and plain. +# The function to obtain web domain parameters. #----------------------------------------------------------# @@ -18,43 +17,87 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_domain() { - i=1 - fileds_count=$(echo "$fields" | wc -w) - line=$(grep "DOMAIN='$domain'" $conf) +# JSON list function +json_list() { echo '{' - eval $line - for field in $fields; do - eval value=$field - if [ "$i" -eq 1 ]; then - echo -e "\t\"$value\": {" - else - if [ "$fileds_count" -eq "$i" ]; then - echo -e "\t\t\"${field//$/}\": \"$value\"" - else - echo -e "\t\t\"${field//$/}\": \"$value\"," - fi - fi - (( ++i)) - done - if [ -n "$value" ]; then - echo -e ' }' - fi - echo -e "}" + echo ' "'$DOMAIN'": { + "IP": "'$IP'", + "IP6": "'$IP6'", + "U_DISK": "'$U_DISK'", + "U_BANDWIDTH": "'$U_BANDWIDTH'", + "TPL": "'$TPL'", + "ALIAS": "'$ALIAS'", + "STATS": "'$STATS'", + "STATS_USER": "'$STATS_USER'", + "SSL": "'$SSL'", + "SSL_HOME": "'$SSL_HOME'", + "FTP_USER": "'$FTP_USER'", + "FTP_PATH": "'$FTP_PATH'", + "AUTH_USER": "'$AUTH_USER'", + "BACKEND": "'$BACKEND'", + "PROXY": "'$PROXY'", + "PROXY_EXT": "'$PROXY_EXT'", + "DOCUMENT_ROOT": "'$HOMEDIR/$user/web/$domain/public_html'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + echo '}' } -# Shell function -shell_list_domain() { - line=$(grep "DOMAIN='$domain'" $conf) - eval $line - for field in $fields; do - eval key="$field" - if [ -z "$key" ]; then - key='NULL' - fi - echo "${field//$/}: $key " - done +# SHELL list function +shell_list() { + source $VESTA/conf/vesta.conf + echo "DOMAIN: $DOMAIN" + echo "ALIAS: ${ALIAS//,/ }" + echo "IP: $IP" + if [ ! -z "$IP6" ]; then + echo "IP6: $IP6" + fi + if [ ! -z "$SSL" ] && [ "$SSL" != 'no' ]; then + echo "SSL: $SSL / $SSL_HOME" + fi + echo "TEMPLATE: $TPL" + if [ ! -z "$WEB_BACKEND" ]; then + echo "BACKEND: $BACKEND" + fi + if [ ! -z "$PROXY_SYSTEM" ]; then + echo "PROXY: $PROXY" + echo "PROXY EXT: ${PROXY_EXT//,/ }" + fi + if [ ! -z "$STATS" ]; then + echo "STATS: $STATS" + fi + if [ ! -z "$FTP_USER" ]; then + echo "FTP_USER: ${FTP_USER//,/, }" + fi + if [ ! -z "$AUTH_USER" ]; then + echo "HTTP_AUTH: $AUTH_USER" + fi + echo "DISK: $U_DISK" + echo "BW: $U_BANDWIDTH" + echo "SUSPENDED: $SUSPENDED" + echo "TIME: $TIME" + echo "DATE: $DATE" +} + +# PLAIN list function +plain_list() { + echo -ne "$DOMAIN\t$IP\t$IP6\t$U_DISK\t$U_BANDWIDTH\t$TPL\t" + echo -ne "$ALIAS\t$STATS\t$STATS_USER\t$SSL\t$SSL_HOME\t" + echo -ne "$FTP_USER\t$FTP_PATH\t$AUTH_USER\t$BACKEND\t$PROXY\t" + echo -e "$PROXY_EXT\t$SUSPENDED\t$TIME\t$DATE" +} + +# CSV list function +csv_list() { + echo -n "DOMAIN,IP,IP6,U_DISK,U_BANDWIDTH,TPL,ALIAS,STATS,STATS_USER,SSL," + echo -n "SSL_HOME,FTP_USER,FTP_PATH,AUTH_USER,BACKEND,PROXY,PROXY_EXT," + echo "SUSPENDED,TIME,DATE" + echo -n "$DOMAIN,$IP,$IP6,$U_DISK,$U_BANDWIDTH,$TPL,\"$ALIAS\",$STATS" + echo -n "\"$STATS_USER\",$SSL,$SSL_HOME,\"$FTP_USER\",\"$FTP_PATH\"," + echo -n "\"$AUTH_USER\",$BACKEND,$PROXY,\"$PROXY_EXT\",$SUSPENDED,$TIME," + echo "$DATE" } @@ -71,23 +114,15 @@ is_object_valid 'web' 'DOMAIN' "$domain" # Action # #----------------------------------------------------------# -# Defining config -conf=$USER_DATA/web.conf +# Parsing domain +eval $(grep "DOMAIN='$domain'" $USER_DATA/web.conf) -# Defining fileds to select -fields='$DOMAIN $IP $IP6 $U_DISK $U_BANDWIDTH $TPL $ALIAS $STATS $STATS_USER - $SSL $SSL_HOME $FTP_USER $FTP_PATH $BACKEND $PROXY $PROXY_EXT $AUTH_USER - $DOCUMENT_ROOT $SUSPENDED $TIME $DATE' - -# Defining document root -DOCUMENT_ROOT="$HOMEDIR/$user/web/$domain/public_html" - -# Listing domains -case $format in - json) json_list_domain ;; - plain) nohead=1; shell_list_domain ;; - shell) shell_list_domain |column -t;; - *) check_args '2' '0' 'USER DOMAIN [FORMAT]' +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-web-domain-accesslog b/bin/v-list-web-domain-accesslog index 2d5a6918..24362596 100755 --- a/bin/v-list-web-domain-accesslog +++ b/bin/v-list-web-domain-accesslog @@ -19,14 +19,14 @@ format=${4-shell} source $VESTA/func/main.sh source $VESTA/conf/vesta.conf - -# Json function -json_list_log() { +# JSON list function +json_list() { i=1 + objects=$(echo "$lines" |wc -l) echo '[' for str in $lines; do str=$(echo "$str" |sed -e 's/"/\\"/g') - if [ "$i" -lt "$counter" ]; then + if [ "$i" -lt "$objects" ]; then echo -e "\t\"$str\"," else echo -e "\t\"$str\"" @@ -36,17 +36,29 @@ json_list_log() { echo "]" } -# Shell function -shell_list_log() { +# SHELL list function +shell_list() { echo "$lines" } +# PLAIN list function +plain_list() { + echo "$lines" +} + +# CSV list function +csv_list() { + echo "LOG" + echo "$lines" +} + + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [LINES] [FORMAT]' -validate_format 'user' 'domain' 'ttl' +is_format_valid 'user' 'domain' 'ttl' is_object_valid 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" @@ -63,14 +75,14 @@ else fi lines=$($read_cmd /var/log/$WEB_SYSTEM/domains/$domain.log) -counter=$(echo "$lines" |wc -l) IFS=$'\n' -# Listing logs +# Listing data case $format in - json) json_list_log ;; - plain) shell_list_log ;; - shell) shell_list_log ;; + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-web-domain-errorlog b/bin/v-list-web-domain-errorlog index f1d92d8e..3e23ecfa 100755 --- a/bin/v-list-web-domain-errorlog +++ b/bin/v-list-web-domain-errorlog @@ -19,14 +19,14 @@ format=${4-shell} source $VESTA/func/main.sh source $VESTA/conf/vesta.conf - -# Json function -json_list_log() { +# JSON list function +json_list() { i=1 + objects=$(echo "$lines" |wc -l) echo '[' for str in $lines; do str=$(echo "$str" |sed -e 's/"/\\"/g') - if [ "$i" -lt "$counter" ]; then + if [ "$i" -lt "$objects" ]; then echo -e "\t\"$str\"," else echo -e "\t\"$str\"" @@ -36,17 +36,29 @@ json_list_log() { echo "]" } -# Shell function -shell_list_log() { +# SHELL list function +shell_list() { echo "$lines" } +# PLAIN list function +plain_list() { + echo "$lines" +} + +# CSV list function +csv_list() { + echo "LOG" + echo "$lines" +} + + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [LINES] [FORMAT]' -validate_format 'user' 'domain' 'ttl' +is_format_valid 'user' 'domain' 'ttl' is_object_valid 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" @@ -63,14 +75,14 @@ else fi lines=$($read_cmd /var/log/$WEB_SYSTEM/domains/$domain.error.log) -counter=$(echo "$lines" |wc -l) IFS=$'\n' -# Listing logs +# Listing data case $format in - json) json_list_log ;; - plain) shell_list_log ;; - shell) shell_list_log ;; + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-web-domain-ssl b/bin/v-list-web-domain-ssl index 4d8b9ab8..c91a7cca 100755 --- a/bin/v-list-web-domain-ssl +++ b/bin/v-list-web-domain-ssl @@ -17,19 +17,25 @@ format=${3-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_ssl() { - i='1' # iterator +# JSON list function +json_list() { echo '{' echo -e "\t\"$domain\": {" echo " \"CRT\": \"$crt\"," echo " \"KEY\": \"$key\"," - echo " \"CA\": \"$ca\"" + echo " \"CA\": \"$ca\"," + echo " \"SUBJECT\": \"$subj\"," + echo " \"ALIASES\": \"$alt_dns\"," + echo " \"NOT_BEFORE\": \"$before\"," + echo " \"NOT_AFTER\": \"$after\"," + echo " \"SIGNATURE\": \"$signature\"," + echo " \"PUB_KEY\": \"$pub_key\"," + echo " \"ISSUER\": \"$issuer\"" echo -e "\t}\n}" } -# Shell function -shell_list_ssl() { +# SHELL list function +shell_list() { if [ ! -z "$crt" ]; then echo -e "$crt" fi @@ -39,6 +45,50 @@ shell_list_ssl() { if [ ! -z "$ca" ]; then echo -e "\n$ca" fi + if [ ! -z "$crt" ]; then + echo + echo + echo "SUBJECT: $subj" + if [ ! -z "$alt_dns" ]; then + echo "ALIASES: ${alt_dns//,/ }" + fi + echo "VALID FROM: $before" + echo "VALID TIL: $after" + echo "SIGNATURE: $signature" + echo "PUB_KEY: $pub_key" + echo "ISSUER: $issuer" + fi +} + +# PLAIN list function +plain_list() { + if [ ! -z "$crt" ]; then + echo -e "$crt" + fi + if [ ! -z "$key" ]; then + echo -e "\n$key" + fi + if [ ! -z "$ca" ]; then + echo -e "\n$ca" + fi + if [ ! -z "$crt" ]; then + echo "$subj" + echo "${alt_dns//,/ }" + echo "$before" + echo "$after" + echo "$signature" + echo "$pub_key" + echo "$issuer" + fi + +} + +# CSV list function +csv_list() { + echo -n "CRT,KEY,CA,SUBJECT,ALIASES,NOT_BEFORE,NOT_AFTER,SIGNATURE," + echo "PUB_KEY,ISSUER" + echo -n "\"$crt\",\"$key\",\"$ca\",\"$subj\",\"${alt_dns//,/ }\"," + echo "\"$before\",\"$after\",\"$signature\",\"$pub_key\",\"$issuer\"" } @@ -50,27 +100,42 @@ check_args '2' "$#" 'USER DOMAIN [FORMAT]' is_object_valid 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" + #----------------------------------------------------------# # Action # #----------------------------------------------------------# + +# Parsing domain SSL certificate if [ -e "$USER_DATA/ssl/$domain.crt" ]; then - crt=$(cat $USER_DATA/ssl/$domain.crt | sed ':a;N;$!ba;s/\n/\\n/g' ) + crt=$(cat $USER_DATA/ssl/$domain.crt |sed ':a;N;$!ba;s/\n/\\n/g') + + info=$(openssl x509 -text -in $USER_DATA/ssl/$domain.crt) + subj=$(echo "$info" |grep Subject: |cut -f 2 -d =) + before=$(echo "$info" |grep Before: |sed -e "s/.*Before: //") + after=$(echo "$info" |grep "After :" |sed -e "s/.*After : //") + signature=$(echo "$info" |grep "Algorithm:" |head -n1 ) + signature=$(echo "$signature"| sed -e "s/.*Algorithm: //") + pub_key=$(echo "$info" |grep Public-Key: |cut -f2 -d \( | tr -d \)) + issuer=$(echo "$info" |grep Issuer: |sed -e "s/.*Issuer: //") + alt_dns=$(echo "$info" |grep DNS |sed -e 's/DNS:/\n/g' |tr -d ',') + alt_dns=$(echo "$alt_dns" |tr -d ' ' |sed -e "/^$/d") + alt_dns=$(echo "$alt_dns" |sed -e ':a;N;$!ba;s/\n/,/g') fi if [ -e "$USER_DATA/ssl/$domain.key" ]; then - key=$(cat $USER_DATA/ssl/$domain.key | sed ':a;N;$!ba;s/\n/\\n/g' ) + key=$(cat $USER_DATA/ssl/$domain.key |sed ':a;N;$!ba;s/\n/\\n/g') fi if [ -e "$USER_DATA/ssl/$domain.ca" ]; then - ca=$(cat $USER_DATA/ssl/$domain.ca | sed ':a;N;$!ba;s/\n/\\n/g' ) + ca=$(cat $USER_DATA/ssl/$domain.ca |sed ':a;N;$!ba;s/\n/\\n/g') fi -# Listing domains +# Listing data case $format in - json) json_list_ssl ;; - plain) nohead=1; shell_list_ssl ;; - shell) shell_list_ssl ;; - *) check_args '1' '0' '[FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-web-domains b/bin/v-list-web-domains index a5cb9113..48186fee 100755 --- a/bin/v-list-web-domains +++ b/bin/v-list-web-domains @@ -2,7 +2,7 @@ # info: list web domains # options: USER [FORMAT] # -# The function of obtaining the list of all user domains. +# The function to obtain the list of all user web domains. #----------------------------------------------------------# @@ -16,13 +16,89 @@ format=${2-shell} # Includes source $VESTA/func/main.sh +# JSON list function +json_list() { + IFS=$'\n' + i=1 + objects=$(grep DOMAIN $USER_DATA/web.conf |wc -l) + echo "{" + while read str; do + eval $str + echo -n ' "'$DOMAIN'": { + "IP": "'$IP'", + "IP6": "'$IP6'", + "U_DISK": "'$U_DISK'", + "U_BANDWIDTH": "'$U_BANDWIDTH'", + "TPL": "'$TPL'", + "ALIAS": "'$ALIAS'", + "STATS": "'$STATS'", + "STATS_USER": "'$STATS_USER'", + "SSL": "'$SSL'", + "SSL_HOME": "'$SSL_HOME'", + "FTP_USER": "'$FTP_USER'", + "FTP_PATH": "'$FTP_PATH'", + "AUTH_USER": "'$AUTH_USER'", + "BACKEND": "'$BACKEND'", + "PROXY": "'$PROXY'", + "PROXY_EXT": "'$PROXY_EXT'", + "SUSPENDED": "'$SUSPENDED'", + "TIME": "'$TIME'", + "DATE": "'$DATE'" + }' + if [ "$i" -lt "$objects" ]; then + echo ',' + else + echo + fi + ((i++)) + done < <(cat $USER_DATA/web.conf) + echo '}' +} + +# SHELL list function +shell_list() { + IFS=$'\n' + echo "DOMAIN IP TPL SSL DISK BW SPND DATE" + echo "------ -- --- --- ---- -- ---- ----" + while read str; do + eval $str + echo "$DOMAIN $IP $TPL $SSL $U_DISK $U_BANDWIDTH $SUSPENDED $DATE" + done < <(cat $USER_DATA/web.conf) +} + +# PLAIN list function +plain_list() { + IFS=$'\n' + while read str; do + eval $str + echo -ne "$DOMAIN\t$IP\t$IP6\t$U_DISK\t$U_BANDWIDTH\t$TPL\t" + echo -ne "$ALIAS\t$STATS\t$STATS_USER\t$SSL\t$SSL_HOME\t" + echo -ne "$FTP_USER\t$FTP_PATH\t$AUTH_USER\t$BACKEND\t$PROXY\t" + echo -e "$PROXY_EXT\t$SUSPENDED\t$TIME\t$DATE" + done < <(cat $USER_DATA/web.conf) +} + +# CSV list function +csv_list() { + IFS=$'\n' + echo -n "DOMAIN,IP,IP6,U_DISK,U_BANDWIDTH,TPL,ALIAS,STATS,STATS_USER," + echo -n "SSL,SSL_HOME,FTP_USER,FTP_PATH,AUTH_USER,BACKEND,PROXY," + echo "PROXY_EXT,SUSPENDED,TIME,DATE" + while read str; do + eval $str + echo -n "$DOMAIN,$IP,$IP6,$U_DISK,$U_BANDWIDTH,$TPL," + echo -n "\"$ALIAS\",$STATS,\"$STATS_USER\",$SSL,$SSL_HOME," + echo -n "\"$FTP_USER\",\"$FTP_PATH\",\"$AUTH_USER\",$BACKEND,$PROXY," + echo "\"$PROXY_EXT\",$SUSPENDED,$TIME,$DATE" + done < <(cat $USER_DATA/web.conf) +} + #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' is_object_valid 'user' 'USER' "$user" @@ -30,21 +106,12 @@ is_object_valid 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -# Defining config -conf=$USER_DATA/web.conf - -# Defining fileds to select -fields="\$DOMAIN \$IP \$IP6 \$U_DISK \$U_BANDWIDTH \$TPL \$ALIAS \$STATS" -fields="$fields \$STATS_USER \$SSL \$SSL_HOME \$FTP_USER \$FTP_PATH \$AUTH_USER" -fields="$fields \$BACKEND \$PROXY \$PROXY_EXT \$SUSPENDED \$TIME \$DATE" - -# Listing domains -case $format in +# Listing data +case $format in json) json_list ;; - plain) nohead=1; shell_list ;; - shell) fields='$DOMAIN $IP $U_DISK $U_BANDWIDTH $TPL $DATE'; - shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list |column -t ;; esac diff --git a/bin/v-list-web-domains-alias b/bin/v-list-web-domains-alias deleted file mode 100755 index 572cc56a..00000000 --- a/bin/v-list-web-domains-alias +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# info: list web domains and alias key -# options: USER [FORMAT] -# -# The function for obtaining the list of aliases of all user's domains. This -# call was arranged for filling in the lack of information by applying -# v-list-web-domains call in the shell format. - - -#----------------------------------------------------------# -# Variable&Function # -#----------------------------------------------------------# - -# Argument definition -user=$1 -format=${2-shell} - -# Includes -source $VESTA/func/main.sh - - -#----------------------------------------------------------# -# Verifications # -#----------------------------------------------------------# - -check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' -is_object_valid 'user' 'USER' "$user" - - -#----------------------------------------------------------# -# Action # -#----------------------------------------------------------# - -# Defining config -conf=$USER_DATA/web.conf - -# Defining fileds to select -fields="\$DOMAIN \$ALIAS" - -# Listing domains -case $format in - json) json_list ;; - plain) nohead=1; shell_list ;; - shell) shell_list;; - *) check_args '1' '0' 'USER [FORMAT]' -esac - - -#----------------------------------------------------------# -# Vesta # -#----------------------------------------------------------# - -exit diff --git a/bin/v-list-web-domains-proxy b/bin/v-list-web-domains-proxy deleted file mode 100755 index 6e814486..00000000 --- a/bin/v-list-web-domains-proxy +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# info: list web domains and proxy key -# options: USER [FORMAT] -# -# The function for obtaining the list of domains with proxy parameter -# displayed. This call was arranged for filling in the lack of information by -# applying v-list-web-domains call in the shell format. - - -#----------------------------------------------------------# -# Variable&Function # -#----------------------------------------------------------# - -# Argument definition -user=$1 -format=${2-shell} - -# Includes -source $VESTA/func/main.sh - - -#----------------------------------------------------------# -# Verifications # -#----------------------------------------------------------# - -check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' -is_object_valid 'user' 'USER' "$user" - - -#----------------------------------------------------------# -# Action # -#----------------------------------------------------------# - -# Defining config -conf=$USER_DATA/web.conf - -# Defining fileds to select -fields="\$DOMAIN \$PROXY \$PROXY_EXT" - -# Listing domains -case $format in - json) json_list ;; - plain) nohead=1; shell_list ;; - shell) shell_list | column -t ;; - *) check_args '1' '0' 'USER [FORMAT]' -esac - - -#----------------------------------------------------------# -# Vesta # -#----------------------------------------------------------# - -exit diff --git a/bin/v-list-web-domains-ssl b/bin/v-list-web-domains-ssl deleted file mode 100755 index 84c58db7..00000000 --- a/bin/v-list-web-domains-ssl +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# info: list web domains and alias key -# options: USER [FORMAT] -# -# The function for obtaining the list of domains with SSL parameter displayed. -# This call was arranged for filling in the lack of information by applying -# v-list-web-domains call in the shell format. - - -#----------------------------------------------------------# -# Variable&Function # -#----------------------------------------------------------# - -# Argument definition -user=$1 -format=${2-shell} - -# Includes -source $VESTA/func/main.sh - - -#----------------------------------------------------------# -# Verifications # -#----------------------------------------------------------# - -check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' -is_object_valid 'user' 'USER' "$user" - - -#----------------------------------------------------------# -# Action # -#----------------------------------------------------------# - -# Defining config -conf="$USER_DATA/web.conf" - -# Defining fileds to select -fields="\$DOMAIN \$IP \$TPL \$SSL \$SSL_HOME \$SUSPENDED" - -# Listing domains -case $format in - json) json_list ;; - plain) nohead=1; shell_list ;; - shell) shell_list | column -t ;; - *) check_args '1' "0" 'USER [FORMAT]' -esac - - -#----------------------------------------------------------# -# Vesta # -#----------------------------------------------------------# - -exit diff --git a/bin/v-list-web-domains-stats b/bin/v-list-web-domains-stats deleted file mode 100755 index 64e01d53..00000000 --- a/bin/v-list-web-domains-stats +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# info: list web domains and stats key -# options: USER [FORMAT] -# -# The function for obtaining the list of domains with statistics parameter -# displayed, including authentication settings. This call was arranged for -# filling in the lack of information by applying v-list-web-domains call in -# the shell format. - - -#----------------------------------------------------------# -# Variable&Function # -#----------------------------------------------------------# - -# Argument definition -user=$1 -format=${2-shell} - -# Includes -source $VESTA/func/main.sh - - -#----------------------------------------------------------# -# Verifications # -#----------------------------------------------------------# - -check_args '1' "$#" 'USER [FORMAT]' -validate_format 'user' -is_object_valid 'user' 'USER' "$user" - - -#----------------------------------------------------------# -# Action # -#----------------------------------------------------------# - -# Defining config -conf=$USER_DATA/web.conf - -# Defining fileds to select -fields="\$DOMAIN \$STATS \$STATS_AUTH \$SUSPENDED \$TIME \$DATE" - -# Listing domains -case $format in - json) json_list ;; - plain) nohead=1; shell_list ;; - shell) shell_list | column -t ;; - *) check_args '1' "0" 'USER [FORMAT]' -esac - - -#----------------------------------------------------------# -# Vesta # -#----------------------------------------------------------# - -exit diff --git a/bin/v-list-web-stats b/bin/v-list-web-stats index e77889ce..b48419d6 100755 --- a/bin/v-list-web-stats +++ b/bin/v-list-web-stats @@ -16,32 +16,43 @@ format=${1-shell} source $VESTA/func/main.sh source $VESTA/conf/vesta.conf -# Json function -json_list_st() { - stats=$(echo "${STATS_SYSTEM//,/ } none") - st_counter=$(echo "$stats" | wc -w) +# JSON list function +json_list() { + objects=$(echo "$stats" | wc -w) i=1 echo '[' - for st in $stats; do - if [ "$i" -lt "$st_counter" ]; then - echo -e "\t\"$st\"," + for str in $stats; do + if [ "$i" -lt "$objects" ]; then + echo -e "\t\"$str\"," else - echo -e "\t\"$st\"" + echo -e "\t\"$str\"" fi (( ++i)) done echo "]" } -# Shell function -shell_list_st() { - stats=$(echo "none ${STATS_SYSTEM//,/ }") - if [ -z "$nohead" ]; then - echo "STATS" - echo "----------" - fi - for st in $stats; do - echo "$st" +# SHELL list function +shell_list() { + echo "PARSER" + echo "------" + for parser in $stats; do + echo "$parser" + done +} + +# PLAIN list function +plain_list() { + for parser in $stats; do + echo "$parser" + done +} + +# CSV list function +csv_list() { + echo "PARSER" + for parser in $stats; do + echo "$parser" done } @@ -50,12 +61,15 @@ shell_list_st() { # Action # #----------------------------------------------------------# -# Listing domains -case $format in - json) json_list_st ;; - plain) nohead=1; shell_list_st ;; - shell) shell_list_st ;; - *) check_args '1' '0' '[FORMAT]' ;; +# Parsing stats system +stats=$(echo "none ${STATS_SYSTEM//,/ }") + +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-web-templates b/bin/v-list-web-templates index fb4219be..ec02c710 100755 --- a/bin/v-list-web-templates +++ b/bin/v-list-web-templates @@ -16,15 +16,13 @@ format=${1-shell} source $VESTA/func/main.sh source $VESTA/conf/vesta.conf -# Json function -json_list_wtpl() { - templates=$(ls -v $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/) - templates=$(echo "$templates" | grep '\.tpl' | sed 's/\.tpl$//') - t_counter=$(echo "$templates" | wc -w) +# JSON list function +json_list() { + objects=$(echo "$templates" |wc -w) i=1 echo '[' for template in $templates; do - if [ "$i" -lt "$t_counter" ]; then + if [ "$i" -lt "$objects" ]; then echo -e "\t\"$template\"," else echo -e "\t\"$template\"" @@ -34,31 +32,45 @@ json_list_wtpl() { echo "]" } -# Shell function -shell_list_wtpl() { - templates=$(ls -v $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/) - templates=$(echo "$templates" | grep '\.tpl' | sed 's/\.tpl$//') - if [ -z "$nohead" ]; then - echo "Templates" - echo "----------" - fi +# SHELL list function +shell_list() { + echo "TEMPLATE" + echo "--------" + for template in $templates; do + echo "$template" + done +} + +# PLAIN list function +plain_list() { + for template in $templates; do + echo "$template" + done +} + +# CSV list function +csv_list() { + echo "TEMPLATE" for template in $templates; do echo "$template" done } - #----------------------------------------------------------# # Action # #----------------------------------------------------------# -# Listing domains +# Parsing templates +templates=$(ls -v $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/) +templates=$(echo "$templates" |grep '\.tpl' |sed 's/\.tpl$//') + +# Listing data case $format in - json) json_list_wtpl ;; - plain) nohead=1; shell_list_wtpl ;; - shell) shell_list_wtpl ;; - *) check_args '1' '0' '[FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-web-templates-backend b/bin/v-list-web-templates-backend index 4d520e7b..5536b7e8 100755 --- a/bin/v-list-web-templates-backend +++ b/bin/v-list-web-templates-backend @@ -16,13 +16,13 @@ format=${1-shell} source $VESTA/func/main.sh source $VESTA/conf/vesta.conf -# Json function -json_list_wtpl() { - t_counter=$(echo "$templates" | wc -w) +# JSON list function +json_list() { i=1 + objects=$(echo "$templates" |wc -w) echo '[' for template in $templates; do - if [ "$i" -lt "$t_counter" ]; then + if [ "$i" -lt "$objects" ]; then echo -e "\t\"$template\"," else echo -e "\t\"$template\"" @@ -30,14 +30,27 @@ json_list_wtpl() { (( ++i)) done echo "]" - } +} -# Shell function -shell_list_wtpl() { - if [ -z "$nohead" ]; then - echo "Templates" - echo "----------" - fi +# SHELL list function +shell_list() { + echo "TEMPLATE" + echo "--------" + for template in $templates; do + echo "$template" + done +} + +# PLAIN list function +plain_list() { + for template in $templates; do + echo "$template" + done +} + +# CSV list function +csv_list() { + echo "TEMPLATE" for template in $templates; do echo "$template" done @@ -48,21 +61,20 @@ shell_list_wtpl() { # Action # #----------------------------------------------------------# -# Proxy templates -if [ -z "$WEB_BACKEND" ]; then - exit +# Parsing backend templates +if [ ! -z "$WEB_BACKEND" ]; then + templates=$(ls -t $WEBTPL/$WEB_BACKEND |\ + cut -f1 -d . |\ + grep -v proxy_ip |\ + sort -u ) fi -templates=$(ls -t $WEBTPL/$WEB_BACKEND |\ - cut -f1 -d . |\ - grep -v proxy_ip |\ - sort -u ) -# Listing domains +# Listing data case $format in - json) json_list_wtpl ;; - plain) nohead=1; shell_list_wtpl ;; - shell) shell_list_wtpl ;; - *) check_args '1' '0' '[FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-list-web-templates-proxy b/bin/v-list-web-templates-proxy index 42673592..d1d60422 100755 --- a/bin/v-list-web-templates-proxy +++ b/bin/v-list-web-templates-proxy @@ -16,13 +16,13 @@ format=${1-shell} source $VESTA/func/main.sh source $VESTA/conf/vesta.conf -# Json function -json_list_wtpl() { - t_counter=$(echo "$templates" | wc -w) +# JSON list function +json_list() { + objects=$(echo "$templates" |wc -w) i=1 echo '[' for template in $templates; do - if [ "$i" -lt "$t_counter" ]; then + if [ "$i" -lt "$objects" ]; then echo -e "\t\"$template\"," else echo -e "\t\"$template\"" @@ -30,14 +30,27 @@ json_list_wtpl() { (( ++i)) done echo "]" - } +} -# Shell function -shell_list_wtpl() { - if [ -z "$nohead" ]; then - echo "Templates" - echo "----------" - fi +# SHELL list function +shell_list() { + echo "TEMPLATE" + echo "--------" + for template in $templates; do + echo "$template" + done +} + +# PLAIN list function +plain_list() { + for template in $templates; do + echo "$template" + done +} + +# CSV list function +csv_list() { + echo "TEMPLATE" for template in $templates; do echo "$template" done @@ -48,21 +61,20 @@ shell_list_wtpl() { # Action # #----------------------------------------------------------# -# Proxy templates -if [ -z "$PROXY_SYSTEM" ]; then - exit +# Parsing proxy templates +if [ ! -z "$PROXY_SYSTEM" ]; then + templates=$(ls -t $WEBTPL/$PROXY_SYSTEM |\ + cut -f1 -d . |\ + grep -v proxy_ip |\ + sort -u ) fi -templates=$(ls -t $WEBTPL/$PROXY_SYSTEM |\ - cut -f1 -d . |\ - grep -v proxy_ip |\ - sort -u ) -# Listing domains +# Listing data case $format in - json) json_list_wtpl ;; - plain) nohead=1; shell_list_wtpl ;; - shell) shell_list_wtpl ;; - *) check_args '1' '0' '[FORMAT]' + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac diff --git a/bin/v-rebuild-cron-jobs b/bin/v-rebuild-cron-jobs index 0d75000e..5acc830d 100755 --- a/bin/v-rebuild-cron-jobs +++ b/bin/v-rebuild-cron-jobs @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART]' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -47,6 +47,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-rebuild-databases b/bin/v-rebuild-databases index 4d50a09d..0b8f4a2d 100755 --- a/bin/v-rebuild-databases +++ b/bin/v-rebuild-databases @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -67,6 +67,6 @@ update_user_value "$user" '$U_DISK_DB' "$U_DISK_DB" #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-rebuild-dns-domain b/bin/v-rebuild-dns-domain index 3e123992..2aa34f6f 100755 --- a/bin/v-rebuild-dns-domain +++ b/bin/v-rebuild-dns-domain @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [RESTART] [UPDATE_SERIAL]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -88,6 +88,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-rebuild-dns-domains b/bin/v-rebuild-dns-domains index e3303de6..4bb537ab 100755 --- a/bin/v-rebuild-dns-domains +++ b/bin/v-rebuild-dns-domains @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART] [UPDATE_SERIAL]' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -89,6 +89,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-rebuild-mail-domains b/bin/v-rebuild-mail-domains index 8e101a94..82b7fa14 100755 --- a/bin/v-rebuild-mail-domains +++ b/bin/v-rebuild-mail-domains @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -70,6 +70,6 @@ update_user_value "$user" '$U_DISK_MAIL' "$U_DISK_MAIL" recalc_user_disk_usage # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-rebuild-user b/bin/v-rebuild-user index 52385694..6a2b4d03 100755 --- a/bin/v-rebuild-user +++ b/bin/v-rebuild-user @@ -27,7 +27,7 @@ export PATH=$PATH:/usr/sbin #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -50,6 +50,6 @@ rebuild_user_conf #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-rebuild-web-domains b/bin/v-rebuild-web-domains index c0fe2a1f..f3d35dd8 100755 --- a/bin/v-rebuild-web-domains +++ b/bin/v-rebuild-web-domains @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART]' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -36,128 +36,43 @@ is_object_unsuspended 'user' 'USER' "$user" # Action # #----------------------------------------------------------# -user_domains=0 -user_ssl=0 -user_aliases=0 -suspended_web=0 -conf=$USER_DATA/web.conf -fields='$DOMAIN' -nohead=1 -domain_counter=0 +# Deleting old configs +sed -i "/.*\/$user\//d" /etc/$WEB_SYSTEM/conf.d/vesta.conf +rm -f $HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf +rm -f $HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf +if [ ! -z "$PROXY_SYSTEM" ]; then + sed -i "/.*\/$user\//d" /etc/$PROXY_SYSTEM/conf.d/vesta.conf + rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf + rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf +fi +if [ ! -z "$WEB_BACKEND" ]; then + if [ "$WEB_BACKEND_POOL" = 'user' ]; then + prepare_web_backend + rm -f $pool/$backend_type.conf + else + for domain in $($BIN/v-list-web-domains $user plain |cut -f 1); do + prepare_web_backend + rm -f $pool/$backend_type.conf + done + fi +fi -# Adding log directory -mkdir -p /var/log/$WEB_SYSTEM/domains -chmod 771 /var/log/$WEB_SYSTEM/domains - -# Clean up old config -rm -f $HOMEDIR/$user/conf/tmp_*.conf - - -# Starting loop -for domain in $(shell_list); do - template=$(get_object_value 'web' 'DOMAIN' "$domain" '$BACKEND') +# Starting rebuild loop for each web domain +for domain in $($BIN/v-list-web-domains $user plain |cut -f 1); do if [ ! -z "$WEB_BACKEND" ]; then + template=$(get_object_value 'web' 'DOMAIN' "$domain" '$BACKEND') $BIN/v-add-web-domain-backend $user $domain $template fi - - ((++ domain_counter)) rebuild_web_domain_conf done -# Touch vesta configs -web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf" -touch $web_conf -if [ ! -z "$PROXY_SYSTEM" ]; then - proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf" - touch $proxy_conf -fi - -# Checking if there is at least 1 domain -if [ "$domain_counter" -lt 1 ]; then - # Deleting web configs - rm -f $HOMEDIR/$user/conf/web/* - sed -i "/.*\/$user\/.*$WEB_SYSTEM.conf/d" $web_conf - if [ ! -z "$PROXY_SYSTEM" ]; then - sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $proxy_conf - fi -else - # Clean web configs - sed -i "/.*\/$user\/.*.conf/d" $web_conf - if [ ! -z "$PROXY_SYSTEM" ]; then - sed -i "/.*\/$user\/.*.conf/d" $proxy_conf - fi - - # Renaming tmp config - tmp_conf="$HOMEDIR/$user/conf/web/tmp_$WEB_SYSTEM.conf" - conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" - mv $tmp_conf $conf - - # Checking include - web_include=$(grep "$conf" $web_conf ) - if [ -z "$web_include" ] && [ "$WEB_SYSTEM" != 'nginx' ]; then - echo "Include $conf" >> $web_conf - fi - if [ -z "$web_include" ] && [ "$WEB_SYSTEM" = 'nginx' ]; then - echo "include $conf;" >> $web_conf - fi - - # Checking SSL - if [ "$ssl_change" = 'yes' ]; then - tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - mv $tmp_conf $conf - ssl_include=$(grep "$conf" $web_conf ) - if [ -z "$ssl_include" ] && [ "$WEB_SYSTEM" != 'nginx' ]; then - echo "Include $conf" >> $web_conf - fi - if [ -z "$ssl_include" ] && [ "$WEB_SYSTEM" = 'nginx' ]; then - echo "include $conf;" >> $web_conf - fi - fi - - # Checking proxy - if [ ! -z "$PROXY_SYSTEM" ]; then - if [ "$proxy_change" = 'yes' ]; then - tmp_conf="$HOMEDIR/$user/conf/web/tmp_$PROXY_SYSTEM.conf" - conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - mv $tmp_conf $conf - proxy_include=$(grep "$conf" $proxy_conf ) - if [ -z "$proxy_include" ]; then - echo "include $conf;" >> $proxy_conf - fi - else - conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $proxy_conf - rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf - fi - - # Checking SSL proxy - if [ "$proxy_change" = 'yes' ] && [ "$ssl_change" = 'yes' ]; then - tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - mv $tmp_conf $conf - proxy_include=$(grep "$conf" $proxy_conf ) - if [ -z "$proxy_include" ]; then - echo "include $conf;" >> $proxy_conf - fi - else - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - sed -i "/.*\/$user\/.*s$PROXY_SYSTEM.conf/d" $proxy_conf - rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf - fi - fi -fi - #----------------------------------------------------------# # Vesta # #----------------------------------------------------------# -# Updating counters -update_user_value "$user" '$SUSPENDED_WEB' "$suspended_web" -update_user_value "$user" '$U_WEB_DOMAINS' "$user_domains" -update_user_value "$user" '$U_WEB_SSL' "$user_ssl" -update_user_value "$user" '$U_WEB_ALIASES' "$user_aliases" +# Updating user counters +$BIN/v-update-user-counters $user # Restarting web server if [ "$restart" != 'no' ]; then @@ -171,6 +86,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-restart-cron b/bin/v-restart-cron index 232e359c..305f2db2 100755 --- a/bin/v-restart-cron +++ b/bin/v-restart-cron @@ -12,16 +12,16 @@ # Includes source $VESTA/func/main.sh source $VESTA/conf/vesta.conf +PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin" send_email_report() { - send_mail="$VESTA/web/inc/mail-wrapper.php" email=$(grep CONTACT $VESTA/data/users/admin/user.conf) email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $CRON_SYSTEM restart failed" service $CRON_SYSTEM configtest >> $tmpfile 2>&1 service $CRON_SYSTEM restart >> $tmpfile 2>&1 - cat $tmpfile | $send_mail -s "$subj" $email + cat $tmpfile |$SENDMAIL -s "$subj" $email rm -f $tmpfile } @@ -50,7 +50,7 @@ if [ $? -ne 0 ]; then service $CRON_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then send_email_report - exit $E_RESTART + check_result $E_RESTART "$CRON_SYSTEM restart failed" fi fi diff --git a/bin/v-restart-dns b/bin/v-restart-dns index 9945f32e..fad2f704 100755 --- a/bin/v-restart-dns +++ b/bin/v-restart-dns @@ -12,6 +12,7 @@ # Includes source $VESTA/func/main.sh source $VESTA/conf/vesta.conf +PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin" send_email_report() { if [ -e '/etc/named.conf' ]; then @@ -19,15 +20,13 @@ send_email_report() { else dns_conf='/etc/bind/named.conf' fi - - send_mail="$VESTA/web/inc/mail-wrapper.php" email=$(grep CONTACT $VESTA/data/users/admin/user.conf) email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $DNS_SYSTEM restart failed" /usr/sbin/named-checkconf $dns_conf >> $tmpfile 2>&1 service $DNS_SYSTEM restart >> $tmpfile 2>&1 - cat $tmpfile | $send_mail -s "$subj" $email + cat $tmpfile |$SENDMAIL -s "$subj" $email rm -f $tmpfile } @@ -56,8 +55,7 @@ if [ $? -ne 0 ]; then service $DNS_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then send_email_report - echo "Error: $DNS_SYSTEM restart failed" - exit $E_RESTART + check_result $E_RESTART "$DNS_SYSTEM restart failed" fi fi diff --git a/bin/v-restart-ftp b/bin/v-restart-ftp index ab0c78ab..f554011c 100755 --- a/bin/v-restart-ftp +++ b/bin/v-restart-ftp @@ -12,16 +12,16 @@ # Includes source $VESTA/func/main.sh source $VESTA/conf/vesta.conf +PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin" send_email_report() { - send_mail="$VESTA/web/inc/mail-wrapper.php" email=$(grep CONTACT $VESTA/data/users/admin/user.conf) email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $FTP_SYSTEM restart failed" service $FTP_SYSTEM configtest >> $tmpfile 2>&1 service $FTP_SYSTEM restart >> $tmpfile 2>&1 - cat $tmpfile | $send_mail -s "$subj" $email + cat $tmpfile |$SENDMAIL -s "$subj" $email rm -f $tmpfile } @@ -48,8 +48,7 @@ fi service $FTP_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then send_email_report - echo "Error: $FTP_SYSTEM restart failed" - exit $E_RESTART + check_result $E_RESTART "$FTP_SYSTEM restart failed" fi # Update restart queue diff --git a/bin/v-restart-mail b/bin/v-restart-mail index fc8f339f..7080260e 100755 --- a/bin/v-restart-mail +++ b/bin/v-restart-mail @@ -12,16 +12,16 @@ # Includes source $VESTA/func/main.sh source $VESTA/conf/vesta.conf +PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin" send_email_report() { - send_mail="$VESTA/web/inc/mail-wrapper.php" email=$(grep CONTACT $VESTA/data/users/admin/user.conf) email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $MAIL_SYSTEM restart failed" service $MAIL_SYSTEM configtest >> $tmpfile 2>&1 service $MAIL_SYSTEM restart >> $tmpfile 2>&1 - cat $tmpfile | $send_mail -s "$subj" $email + cat $tmpfile |$SENDMAIL -s "$subj" $email rm -f $tmpfile } @@ -48,8 +48,7 @@ fi service $MAIL_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then send_email_report - echo "Error: $MAIL_SYSTEM restart failed" - exit $E_RESTART + check_result $E_RESTART "$MAIL_SYSTEM restart failed" fi # Update restart queue diff --git a/bin/v-restart-proxy b/bin/v-restart-proxy index 31fcddc7..e050eb1c 100755 --- a/bin/v-restart-proxy +++ b/bin/v-restart-proxy @@ -12,16 +12,16 @@ # Includes source $VESTA/func/main.sh source $VESTA/conf/vesta.conf +PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin" send_email_report() { - send_mail="$VESTA/web/inc/mail-wrapper.php" email=$(grep CONTACT $VESTA/data/users/admin/user.conf) email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $PROXY_SYSTEM restart failed" service $PROXY_SYSTEM configtest >> $tmpfile 2>&1 service $PROXY_SYSTEM restart >> $tmpfile 2>&1 - cat $tmpfile | $send_mail -s "$subj" $email + cat $tmpfile |$SENDMAIL -s "$subj" $email rm -f $tmpfile } @@ -48,8 +48,7 @@ fi service $PROXY_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then send_email_report - echo "Error: $PROXY_SYSTEM restart failed" - exit $E_RESTART + check_result $E_RESTART "$PROXY_SYSTEM restart failed" fi # Update restart queue diff --git a/bin/v-restart-service b/bin/v-restart-service index d539c1a3..e46339f9 100755 --- a/bin/v-restart-service +++ b/bin/v-restart-service @@ -14,6 +14,7 @@ service=$1 # Includes source $VESTA/func/main.sh +PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin" #----------------------------------------------------------# @@ -30,13 +31,13 @@ check_args '1' "$#" 'SERVICE' if [ "$service" != "iptables" ]; then service $service restart >/dev/null 2>&1 if [ $? -ne 0 ]; then - exit $E_RESTART + check_result $E_RESTART "$service restart failed" fi else $BIN/v-stop-firewall $BIN/v-update-firewall if [ $? -ne 0 ]; then - exit $E_RESTART + check_result $E_RESTART "$service restart failed" fi fi diff --git a/bin/v-restart-web b/bin/v-restart-web index 78c1e7a5..a7ecf644 100755 --- a/bin/v-restart-web +++ b/bin/v-restart-web @@ -12,16 +12,16 @@ # Includes source $VESTA/func/main.sh source $VESTA/conf/vesta.conf +PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin" send_email_report() { - send_mail="$VESTA/web/inc/mail-wrapper.php" email=$(grep CONTACT $VESTA/data/users/admin/user.conf) email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $WEB_SYSTEM restart failed" service $WEB_SYSTEM configtest >> $tmpfile 2>&1 service $WEB_SYSTEM restart >> $tmpfile 2>&1 - cat $tmpfile | $send_mail -s "$subj" $email + cat $tmpfile |$SENDMAIL -s "$subj" $email rm -f $tmpfile } @@ -62,8 +62,7 @@ if [ "$rc" -ne 0 ]; then service $WEB_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then send_email_report - echo "Error: $WEB_SYSTEM restart failed" - exit $E_RESTART + check_result $E_RESTART "$WEB_SYSTEM restart failed" fi fi diff --git a/bin/v-restart-web-backend b/bin/v-restart-web-backend index b2e747ef..50cd940f 100755 --- a/bin/v-restart-web-backend +++ b/bin/v-restart-web-backend @@ -12,16 +12,16 @@ # Includes source $VESTA/func/main.sh source $VESTA/conf/vesta.conf +PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin" send_email_report() { - send_mail="$VESTA/web/inc/mail-wrapper.php" email=$(grep CONTACT $VESTA/data/users/admin/user.conf) email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $WEB_BACKEND restart failed" service $WEB_BACKEND configtest >> $tmpfile 2>&1 service $WEB_BACKEND restart >> $tmpfile 2>&1 - cat $tmpfile | $send_mail -s "$subj" $email + cat $tmpfile |$SENDMAIL -s "$subj" $email rm -f $tmpfile } @@ -48,8 +48,7 @@ fi service $WEB_BACKEND restart >/dev/null 2>&1 if [ $? -ne 0 ]; then send_email_report - echo "Error: $WEB_BACKEND restart failed" - exit $E_RESTART + check_result $E_RESTART "$WEB_BACKEND restart failed" fi # Update restart queue diff --git a/bin/v-restore-user b/bin/v-restore-user index a1daaa34..4ea77af9 100755 --- a/bin/v-restore-user +++ b/bin/v-restore-user @@ -25,7 +25,7 @@ notify=${9-no} # Define backup dir if [ -z "$BACKUP" ]; then - BACKUP=/home/backup/ + BACKUP=/backup fi # Includes @@ -38,10 +38,15 @@ source $VESTA/conf/vesta.conf # Check backup function is_backup_valid() { - if [ ! -e "$BACKUP/$backup" ]; then - echo "Error: backup doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + if [ ! -e "$1" ]; then + check_result $E_NOTEXIST "backup $1 doesn't exist" + fi +} + +# Check backup ownership function +is_backup_available() { + if ! [[ $2 =~ ^$1.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar$ ]]; then + check_result $E_FORBIDEN "permission denied" fi } @@ -52,171 +57,146 @@ is_backup_valid() { args_usage='USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]' check_args '2' "$#" "$args_usage" -validate_format 'user' 'backup' -is_backup_valid -is_backup_available +is_format_valid 'user' 'backup' +is_backup_valid "$BACKUP/$backup" +is_backup_available "$user" "$backup" #----------------------------------------------------------# # Action # #----------------------------------------------------------# -# Define email wrapper -send_mail="$VESTA/web/inc/mail-wrapper.php" - -# Check user +# Checking user existance on the server check_user=$(is_object_valid 'user' 'USER' "$user") if [ -z "$check_user" ]; then is_object_unsuspended 'user' 'USER' "$user" - - if [ "$notify" != 'no' ]; then - subj="$user → restore failed" - email=$(get_user_value '$CONTACT') - else - subj="$user → restore failed" - email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f2 -d \') - fi -else - # Set flag for user creation - create_user="yes" - - # Set notification email and subject subj="$user → restore failed" + email=$(get_user_value '$CONTACT') +else + create_user="yes" email=$(grep CONTACT $VESTA/data/users/admin/user.conf | cut -f2 -d \') fi -# Check disk usage + +# Checking avaiable disk space disk_usage=$(df $BACKUP |tail -n1 |tr ' ' '\n' |grep % |cut -f 1 -d %) if [ "$disk_usage" -ge "$BACKUP_DISK_LIMIT" ]; then - rm -rf $tmpdir - echo "Not enough disk space to run restore" | $send_mail -s "$subj" $email - echo "Error: Not enough disk space" + echo "Error: Not enough disk space" |$SENDMAIL -s "$subj" $email $notify sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_DISK" "$EVENT" - exit $E_DISK + check_result $E_DISK "Not enough disk space" fi -# Check load average -la=$(cat /proc/loadavg | cut -f 1 -d ' ' | cut -f 1 -d '.') +# Checking load average +la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.') i=0 while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do - echo "$(date "+%F %T") Load Average $la" - echo + echo -e "$(date "+%F %T") Load Average $la" sleep 60 if [ "$i" -ge "15" ]; then - echo "LoadAverage $i is above threshold" |$send_mail -s "$subj" $email - echo "Error: LA is too high" + la_error="LoadAverage $la is above threshold" + echo "Error: $la_error" |$SENDMAIL -s "$subj" $email $notify sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_LA" "$EVENT" - exit $E_LA + check_result $E_LA "$la_error" fi + la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.') (( ++i)) done # Creating temporary directory tmpdir=$(mktemp -p $BACKUP -d) if [ "$?" -ne 0 ]; then - echo "Can't create tmp dir $tmpdir" | $send_mail -s "$subj" $email - echo "Error: can't create tmp dir" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + echo "Can't create tmp dir $tmpdir" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_NOTEXIST" "can't create tmp dir" fi -# User +# Restoring user account if [ "$create_user" = 'yes' ]; then - echo "-- USER --" - msg="$msg\n-- USER --" + echo "-- USER --" |tee $tmpdir/restore.log + echo -e "$(date "+%F %T") $user" |tee -a $tmpdir/restore.log - echo -e "$(date "+%F %T") $user" - msg="$msg\n$(date "+%F %T") $user" - - # unpack user container + # Unpacking user container tar xf $BACKUP/$backup -C $tmpdir ./vesta if [ "$?" -ne 0 ]; then - echo "Error: can't unpack user contaner" - echo "Can't unpack user contaner" | $send_mail -s "$subj" $email rm -rf $tmpdir - exit $E_PARSING + echo "Can't unpack user contaner" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "can't unpack user contaner" fi - # Restore cron records + # Restoring user.conf mkdir $USER_DATA cp $tmpdir/vesta/user.conf $USER_DATA/ + cp -r $tmpdir/vesta/ssl $USER_DATA/ >/dev/null 2>&1 + cp $tmpdir/vesta/backup-excludes.conf $USER_DATA/ >/dev/null 2>&1 - # Rebuild cron + # Rebuilding user rebuild_user_conf - - echo - msg="$msg\n" fi -# WEB -if [ "$web" != 'no' ]; then - echo "-- WEB --" - msg="$msg\n-- WEB --" +# Unpacking pam container +tar xf $BACKUP/$backup -C $tmpdir ./pam +if [ "$?" -ne 0 ]; then + rm -rf $tmpdir + echo "Can't unpack PAM contaner" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "can't unpack PAM contaner" +fi +old_user=$(cut -f 1 -d : $tmpdir/pam/passwd) +old_uid=$(cut -f 3 -d : $tmpdir/pam/passwd) +new_uid=$(grep "^$user:" /etc/passwd |cut -f 3 -d :) - # Unpack pam container - tar xf $BACKUP/$backup -C $tmpdir ./pam - if [ "$?" -ne 0 ]; then - echo "Error: can't unpack PAM contaner" - echo "Can't unpack PAM contaner" | $send_mail -s "$subj" $email - rm -rf $tmpdir - exit $E_PARSING + +# Restoring web domains +if [ "$web" != 'no' ] && [ ! -z "$WEB_SYSTEM" ]; then + echo -e "\n-- WEB --" |tee -a $tmpdir/restore.log + + # Creating web domain restore list + backup_domains=$(tar -tf $BACKUP/$backup |grep "^./web") + backup_domains=$(echo "$backup_domains" |grep domain_data.tar.gz) + backup_domains=$(echo "$backup_domains" |cut -f 3 -d /) + if [ -z "$web" ] || [ "$web" = '*' ]; then + domains="$backup_domains" + else + echo "$web" |tr ',' '\n' > $tmpdir/selected.txt + domains=$(echo "$backup_domains" |egrep -f $tmpdir/selected.txt) fi - # Get user id - old_uid=$(cut -f 3 -d : $tmpdir/pam/passwd) - new_uid=$(grep "^$user:" /etc/passwd | cut -f 3 -d :) + # Restoring web domain + for domain in $domains; do + echo -e "$(date "+%F %T") $domain" |tee -a $tmpdir/restore.log - # Create domain list - domain_list=$(tar -tf $BACKUP/$backup | grep "^./web" |\ - grep domain_data.tar.gz | cut -f 3 -d '/') - if [ ! -z "$web" ]; then - dom_include_list=$(mktemp) - for domain_include in ${web//,/ }; do - echo "^$domain_include$" >> $dom_include_list - done - domain_list=$(echo "$domain_list" | egrep -f $dom_include_list ) - rm -f $dom_include_list - fi - - for domain in $domain_list; do - echo -e "$(date "+%F %T") $domain" - msg="$msg\n$(date "+%F %T") $domain" - - # unpack domain container - tar xf $BACKUP/$backup -C $tmpdir ./web/$domain - if [ "$?" -ne 0 ]; then - echo "Error: can't unpack $domain web contaner" - echo "Can't unpack $domain web contaner" |\ - $send_mail -s "$subj" $email - rm -rf $tmpdir - exit $E_PARSING - fi - - # Restore domain config + # Checking domain existance check_config=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf) if [ -z "$check_config" ]; then - - # Parse domain config - eval $(cat $tmpdir/web/$domain/vesta/web.conf) - - # Check if domain new check_new=$(is_domain_new 'web' $domain) if [ ! -z "$check_new" ]; then - echo "Error: web domain $domain belongs to another user" - echo "Web domain $domain belongs to another user" |\ - $send_mail -s "$subj" $email rm -rf $tmpdir - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + error="$domain belongs to another user" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" fi + fi - # Check if domain alias is new + # Unpacking domain container + tar xf $BACKUP/$backup -C $tmpdir ./web/$domain + if [ "$?" -ne 0 ]; then + rm -rf $tmpdir + error="Can't unpack $domain web container" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" + fi + + # Restoring web.conf + if [ -z "$check_config" ]; then + eval $(cat $tmpdir/web/$domain/vesta/web.conf) + + # Deleting conflicting aliases for dom_alias in ${ALIAS//,/ }; do check_new=$(is_domain_new 'web' $dom_alias) if [ ! -z "$check_new" ]; then - # Delete conflicting alias ALIAS=$(echo "$ALIAS" |\ sed "s/,/\n/g"|\ sed "s/^$dom_alias$//g"|\ @@ -225,73 +205,54 @@ if [ "$web" != 'no' ]; then fi done - # Check ip address - check_ip=$(is_ip_valid $IP) - if [ -z "$check_ip" ]; then - check_ip=$(is_ip_avalable $IP) - fi + # Checking ip address + check_ip=$(is_ip_valid $IP $user) if [ ! -z "$check_ip" ]; then - IP=$(get_user_ip $user) - if [ -z "$IP" ]; then - echo "Error: no avaiable IP address" - echo "No available IP address" |\ - $send_mail -s "$subj" $email - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi - echo "$IP" > $tmpdir/ip_mapping.$domain + local_ip='' + get_user_ip $user + old_ip=$IP + IP=$ip fi - # Check web template - check_tpl=$(is_web_template_valid) - if [ ! -e "$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" ]; then - TPL="default" - if [ ! -e "$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" ]; then - echo "Error: no avaiable web template" - echo "No available web template" |\ - $send_mail -s "$subj" $email - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi + # Checking web template + check_tpl=$(is_web_template_valid $TPL) + if [ ! -z "$check_tpl" ]; then + TPL='default' fi - # Check proxy template - if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - if [ ! -e "$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" ]; then - PROXY="default" - if [ ! -e "$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" ]; then - echo "Error: no avaiable proxy template" - echo "No available proxy tpl" |\ - $send_mail -s "$subj" $email - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi - fi + # Checking proxy template + check_proxy_tpl=$(is_proxy_template_valid $PROXY) + if [ ! -z "$check_proxy_tpl" ]; then + PROXY='default' fi - # Convert ftp user + # Checking backend template + check_backend_tpl=$(is_backend_template_valid $BACKEND) + if [ ! -z "$check_proxy_tpl" ]; then + BACKEND='default' + fi + + # Converting ftp users if [ ! -z "$FTP_USER" ]; then - FTP_USER=$(echo "$FTP_USER" | cut -f 2,3,4,5,6,7 -d '_') + FTP_USER=$(echo "$FTP_USER" |sed -e "s/${old_user}_//") FTP_USER="${user}_${FTP_USER}" fi - # Convert stats user + # Converting stats users if [ ! -z "$STATS_USER" ]; then - STATS_USER=$(echo "$STATS_USER" | cut -f 2,3,4,5,6,7 -d '_') + STATS_USER=$(echo "$STATS_USER" |sed -e "s/${old_user}_//") STATS_USER="${user}_${STATS_USER}" fi - # Set default backend template - if [ ! -z "$WEB_BACKEND" ]; then - if [ ! -z "$BACKEND" ]; then - if [ ! -e "$WEBTPL/$WEB_BACKEND/$BACKEND.tpl" ]; then - BACKEND='default' - fi - else - BACKEND='default' - fi + # Copying ssl certificates + if [ "$SSL" = 'yes' ]; then + for crt in $(ls $tmpdir/web/$domain/conf |grep ssl); do + crt=$(echo "$crt" |sed "s/ssl.//") + cp -f $tmpdir/web/$domain/conf/ssl.$crt $USER_DATA/ssl/$crt + done fi + # Concatenating web.conf keys str="DOMAIN='$domain' IP='$IP' IP6='$IP6' ALIAS='$ALIAS'" str="$str TPL='$TPL' SSL='$SSL' SSL_HOME='$SSL_HOME'" str="$str FTP_USER='$FTP_USER' FTP_MD5='$FTP_MD5'" @@ -302,537 +263,360 @@ if [ "$web" != 'no' ]; then str="$str TIME='$(date +%T)' DATE='$(date +%F)'" echo $str >> $USER_DATA/web.conf - # Copy ssl certificate - if [ "$SSL" = 'yes' ]; then - for crt in $(ls $tmpdir/web/$domain/conf |grep ssl); do - crt=$(echo "$crt" |sed "s/ssl.//") - cp -f $tmpdir/web/$domain/conf/ssl.$crt $USER_DATA/ssl/$crt - done - fi - - # Rebuild backend + # Rebuilding backend if [ ! -z "$WEB_BACKEND" ]; then $BIN/v-add-web-domain-backend $user $domain $BACKEND fi - # Rebuild web config + # Rebuilding vhost rebuild_web_domain_conf - - # Adding vhost - web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf" - tmp_conf="$HOMEDIR/$user/conf/web/tmp_$WEB_SYSTEM.conf" - conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" - cat $tmp_conf >> $conf - rm -f $tmp_conf - web_include=$(grep "$conf" $web_conf) - if [ -z "$web_include" ] && [ "$WEB_SYSTEM" != 'nginx' ]; then - echo "Include $conf" >> $web_conf - fi - if [ -z "$web_include" ] && [ "$WEB_SYSTEM" = 'nginx' ]; then - echo "include $conf;" >> $web_conf - fi - - # Adding SSL vhost - if [ "$SSL" = 'yes' ]; then - tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - cat $tmp_conf >> $conf - rm -f $tmp_conf - fi - ssl_include=$(grep "$conf" $web_conf) - if [ -z "$ssl_include" ] && [ "$WEB_SYSTEM" != 'nginx' ]; then - echo "Include $conf" >> $web_conf - fi - if [ -z "$ssl_include" ] && [ "$WEB_SYSTEM" = 'nginx' ]; then - echo "include $conf;" >> $web_conf - fi - - # Proxy - if [ ! -z "$PROXY_SYSTEM" ]; then - # Adding proxy vhost - proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf" - if [ ! -z "$PROXY" ]; then - tmp_conf="$HOMEDIR/$user/conf/web/tmp_$PROXY_SYSTEM.conf" - conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - cat $tmp_conf >> $conf - rm -f $tmp_conf - fi - proxy_include=$(grep "$conf" $proxy_conf) - if [ -z "$proxy_include" ]; then - echo "include $conf;" >> $proxy_conf - fi - - # Adding SSL proxy vhost - if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ]; then - tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - cat $tmp_conf >> $conf - rm -f $tmp_conf - proxy_include=$(grep "$conf" $proxy_conf) - if [ -z "$proxy_include" ]; then - echo "include $conf;" >> $proxy_conf - fi - fi - fi fi - # Restore data + # Restoring web domain data tar -xzpf $tmpdir/web/$domain/domain_data.tar.gz \ -C $HOMEDIR/$user/web/$domain/ if [ "$?" -ne 0 ]; then - echo "Error: can't unpack $domain data tarball" - echo "Can't can't unpack $domain data tarball" |\ - $send_mail -s "$subj" $email rm -rf $tmpdir - exit $E_PARSING + error="can't unpack $domain data tarball" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" fi - # Fix for tar < 1.24 + # Applying Fix for tar < 1.24 find $HOMEDIR/$user/web/$domain -type d \ -exec chown -h $user:$user {} \; - # ReChown files if uid differs + # Re-chowning files if uid differs if [ "$old_uid" -ne "$new_uid" ]; then find $HOMEDIR/$user/web/$domain/ -user $old_uid \ -exec chown -h $user:$user {} \; fi - done - # Add user to traff queue + # Adding user to traff queue sed -i "/ $user /d" $VESTA/data/queue/traffic.pipe echo "$BIN/v-update-web-domains-traff $user" >>\ $VESTA/data/queue/traffic.pipe - # Restart WEB + # Restarting web server $BIN/v-restart-web - if [ $? -ne 0 ]; then - exit $E_RESTART - fi - - # Restart Proxy + check_result $? "Web restart failed" if [ ! -z "$PROXY_SYSTEM" ]; then $BIN/v-restart-proxy - if [ $? -ne 0 ]; then - exit $E_RESTART - fi + check_result $? "Proxy restart failed" fi - - echo - msg="$msg\n" fi -# DNS -if [ "$dns" != 'no' ]; then - echo "-- DNS --" - msg="$msg\n-- DNS --" +# Restoring dns domains +if [ "$dns" != 'no' ] && [ ! -z "$DNS_SYSTEM" ]; then + echo -e "\n-- DNS --" |tee -a $tmpdir/restore.log - # Create domain list - domain_list=$(tar -tf $BACKUP/$backup | grep "^./dns" |\ - grep dns.conf | cut -f 3 -d '/') - if [ ! -z "$dns" ]; then - dom_include_list=$(mktemp) - for domain_include in ${dns//,/ }; do - echo "^$domain_include$" >> $dom_include_list - done - domain_list=$(echo "$domain_list" | egrep -f $dom_include_list ) - rm -f $dom_include_list + # Creating dns domain restore list + backup_domains=$(tar -tf $BACKUP/$backup |grep "^./dns") + backup_domains=$(echo "$backup_domains" |grep "dns.conf$") + backup_domains=$(echo "$backup_domains" |cut -f 3 -d /) + if [ -z "$dns" ] || [ "$dns" = '*' ]; then + domains="$backup_domains" + else + echo "$dns" |tr ',' '\n' > $tmpdir/selected.txt + domains=$(echo "$backup_domains" |egrep -f $tmpdir/selected.txt) fi - for domain in $domain_list; do - echo -e "$(date "+%F %T") $domain" - msg="$msg\n$(date "+%F %T") $domain" + # Restoring dns domain + for domain in $domains; do + echo -e "$(date "+%F %T") $domain" |tee -a $tmpdir/restore.log - # unpack domain container - tar xf $BACKUP/$backup -C $tmpdir ./dns/$domain - if [ "$?" -ne 0 ]; then - echo "Error: can't unpack $domain dns contaner" - echo "Can't unpack $domain dns contaner" |\ - $send_mail -s "$subj" $email - rm -rf $tmpdir - exit $E_PARSING - fi - - # Restore domain config + # Checking domain existance check_config=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf) if [ -z "$check_config" ]; then - - # Parse domain config - eval $(cat $tmpdir/dns/$domain/vesta/dns.conf) - - # Check if domain new check_new=$(is_domain_new 'dns' $domain) if [ ! -z "$check_new" ]; then - echo "Error: dns domain $domain belongs to another user" - echo "DNS domain $domain belongs to another user" |\ - $send_mail -s "$subj" $email rm -rf $tmpdir - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + error="$domain belongs to another user" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" + fi + fi + + # Unpacking domain container + tar xf $BACKUP/$backup -C $tmpdir ./dns/$domain + if [ "$?" -ne 0 ]; then + rm -rf $tmpdir + error="Can't unpack $domain dns container" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" + fi + + # Restoring dns.conf + if [ -z "$check_config" ]; then + eval $(cat $tmpdir/dns/$domain/vesta/dns.conf) + + # Checking ip address + check_ip=$(is_ip_valid $IP $user) + if [ ! -z "$check_ip" ]; then + local_ip='' + get_user_ip $user + old_ip=$IP + IP=$ip fi - # Check ip address - if [ -e "$tmpdir/ip_mapping.$domain" ]; then - OLD=$IP - IP=$(cat $tmpdir/ip_mapping.$domain) - sed -i "s/$OLD/$IP/g" $tmpdir/dns/$domain/vesta/$domain.conf - else - check_ip=$(is_ip_valid $IP) - if [ ! -z "$check_ip" ]; then - if [ -z "$IP" ]; then - IP=$(get_user_ip $user) - fi - fi - fi - if [ -z "$IP" ]; then - echo "Error: no avaiable IP address" - echo "No available IP address" | $send_mail -s "$subj" $email - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi - - # Check dns template - check_tpl=$(is_dns_template_valid) + # Checking dns template + check_tpl=$(is_dns_template_valid $TPL) if [ ! -z "$check_tpl" ]; then - templates=$(ls -t $VESTA/data/templates/dns/ |\ - grep '\.tpl' |\ - cut -f 1 -d '.') - if [ ! -z "$(echo $templates |grep default)" ]; then - TPL=$(echo "$templates" |grep default |head -n1) - else - TPL=$("$templates" |head -n1) - fi - - if [ -z "$TPL" ]; then - echo "Error: no avaiable dns template" - echo "No available dns template" |\ - $send_mail -s "$subj" $email - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi + TPL='default' fi + # Concatenating dns.conf keys str="DOMAIN='$domain' IP='$IP' TPL='$TPL' TTL='$TTL' EXP='$EXP'" str="$str SOA='$SOA' RECORDS='$RECORDS' SUSPENDED='no'" str="$str TIME='$(date +%T)' DATE='$(date +%F)'" echo $str >> $USER_DATA/dns.conf fi - # Restore dns records + # Restoring dns records cp -f $tmpdir/dns/$domain/vesta/$domain.conf $USER_DATA/dns/ - # Rebuild dns config + # Rebuilding dns domain rebuild_dns_domain_conf done - # Restart DNS + # Restarting DNS $BIN/v-restart-dns - if [ $? -ne 0 ]; then - exit $E_RESTART - fi - - echo - msg="$msg\n" + check_result $? "DNS restart failed" fi -# MAIL -if [ "$mail" != 'no' ]; then - echo "-- MAIL --" - msg="$msg\n-- MAIL --" +# Restoring mail domains +if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then + echo -e "\n-- MAIL --" |tee -a $tmpdir/restore.log - # Unpack pam container - tar xf $BACKUP/$backup -C $tmpdir ./pam - if [ "$?" -ne 0 ]; then - echo "Error: can't unpack PAM contaner" - echo "Can't unpack PAM contaner" | $send_mail -s "$subj" $email - rm -rf $tmpdir - exit $E_PARSING + # Creating mail domain restore list + backup_domains=$(tar -tf $BACKUP/$backup |grep "^./mail") + backup_domains=$(echo "$backup_domains" |grep "mail.conf$") + backup_domains=$(echo "$backup_domains" |cut -f 3 -d /) + if [ -z "$mail" ] || [ "$mail" = '*' ]; then + domains="$backup_domains" + else + echo "$mail" |tr ',' '\n' > $tmpdir/selected.txt + domains=$(echo "$backup_domains" |egrep -f $tmpdir/selected.txt) fi - # Get user id - old_uid=$(cut -f 3 -d : $tmpdir/pam/passwd) - new_uid=$(grep "^$user:" /etc/passwd | cut -f 3 -d :) - - # Create domain list - domain_list=$(tar -tf $BACKUP/$backup | grep "^./mail" |\ - grep mail.conf | cut -f 3 -d '/') - if [ ! -z "$mail" ]; then - dom_include_list=$(mktemp) - for domain_include in ${mail//,/ }; do - echo "^$domain_include$" >> $dom_include_list - done - domain_list=$(echo "$domain_list" | egrep -f $dom_include_list ) - rm -f $dom_include_list - fi - - for domain in $domain_list; do - echo -e "$(date "+%F %T") $domain" - msg="$msg\n$(date "+%F %T") $domain" - - # unpack domain container - tar xf $BACKUP/$backup -C $tmpdir ./mail/$domain - if [ "$?" -ne 0 ]; then - echo "Error: can't unpack $domain mail contaner" - echo "Can't can't unpack $domain mail contaner" |\ - $send_mail -s "$subj" $email - rm -rf $tmpdir - exit $E_PARSING - fi - - # Restore domain config - domain_idn=$(idn -t --quiet -a "$domain") + # Restoring dns domain + for domain in $domains; do + echo -e "$(date "+%F %T") $domain" |tee -a $tmpdir/restore.log + # Checking domain existance check_config=$(grep "DOMAIN='$domain'" $USER_DATA/mail.conf) if [ -z "$check_config" ]; then - - # Parse domain config - eval $(cat $tmpdir/mail/$domain/vesta/mail.conf) - - # Check if domain new check_new=$(is_domain_new 'mail' $domain) if [ ! -z "$check_new" ]; then - echo "Error: mail domain $domain belongs to another user" - echo "Mail domain $domain belongs to another user" |\ - $send_mail -s "$subj" $email rm -rf $tmpdir - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + error="$domain belongs to another user" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" fi - - str="DOMAIN='$domain' ANTIVIRUS='$ANTIVIRUS' ANTISPAM='$ANTISPAM'" - str="$str DKIM='$DKIM' ACCOUNTS='$ACCOUNTS' U_DISK='$U_DISK'" - str="$str CATCHALL='$CATCHALL' SUSPENDED='no'" - str="$str TIME='$(date +%T)' DATE='$(date +%F)'" - echo $str >> $USER_DATA/mail.conf fi - # Restore DKIM + # Unpacking domain container + tar xf $BACKUP/$backup -C $tmpdir ./mail/$domain + if [ "$?" -ne 0 ]; then + rm -rf $tmpdir + error="Can't unpack $domain mail container" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" + fi + + # Restoring mail.conf + if [ -z "$check_config" ]; then + cat $tmpdir/mail/$domain/vesta/mail.conf >> $USER_DATA/mail.conf + fi + + # Restoring DKIM if [ -e "$tmpdir/mail/$domain/vesta/$domain.pem" ]; then cp -f $tmpdir/mail/$domain/vesta/$domain.pem $USER_DATA/mail/ cp -f $tmpdir/mail/$domain/vesta/$domain.pub $USER_DATA/mail/ fi - # Restore email accounts + # Restoring email accounts cp -f $tmpdir/mail/$domain/vesta/$domain.conf $USER_DATA/mail/ - # Rebuild mail config + # Rebuilding mail config rebuild_mail_domain_conf - # Restore emails + # Restoring emails if [ -e "$tmpdir/mail/$domain/accounts.tar.gz" ]; then tar -xzpf $tmpdir/mail/$domain/accounts.tar.gz \ -C $HOMEDIR/$user/mail/$domain_idn/ if [ "$?" -ne 0 ]; then - echo "Error: can't unpack $domain mail account tarball" - echo "Can't unpack $domain mail account tarball" |\ - $send_mail -s "$subj" $email rm -rf $tmpdir - exit $E_PARSING + error="Can't unpack $domain mail account container" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" fi - # ReChown files if uid differs + # Re-chowning files if uid differs if [ "$old_uid" -ne "$new_uid" ]; then find $HOMEDIR/$user/mail/$domain_idn -user $old_uid \ -exec chown -h $user:mail {} \; fi - fi done - echo - msg="$msg\n" fi -# DB -if [ "$db" != 'no' ]; then - echo "-- DB --" - msg="$msg\n-- DB --" +# Restoring databases +if [ "$db" != 'no' ] && [ ! -z "$DB_SYSTEM" ]; then + echo -e "\n-- DB --" |tee -a $tmpdir/restore.log - # Create domain list - db_list=$(tar -tf $BACKUP/$backup | grep "^./db" |\ - grep db.conf | cut -f 3 -d '/' |sort -u) - if [ ! -z "$db" ]; then - db_include_list=$(mktemp) - for db_include in ${db//,/ }; do - echo "^$db_include$" >> $db_include_list - done - db_list=$(echo "$db_list" | egrep -f $db_include_list ) - rm -f $db_include_list + # Creating database restore list + backup_databases=$(tar -tf $BACKUP/$backup |grep "^./db") + backup_databases=$(echo "$backup_databases" |grep db.conf) + backup_databases=$(echo "$backup_databases" |cut -f 3 -d / |sort -u) + if [ -z "$db" ] || [ "$db" = '*' ]; then + databases="$backup_databases" + else + echo "$db" |tr ',' '\n' > $tmpdir/selected.txt + databases=$(echo "$backup_databases" |egrep -f $tmpdir/selected.txt) fi - for db in $db_list; do + # Restoring database + for database in $databases; do + echo -e "$(date "+%F %T") $database" |tee -a $tmpdir/restore.log - # unpack db container - tar xf $BACKUP/$backup -C $tmpdir ./db/$db + # Checking database existance + check_config=$(grep "DB='$db'" $USER_DATA/db.conf) + + # Unpacking database container + tar xf $BACKUP/$backup -C $tmpdir ./db/$database if [ "$?" -ne 0 ]; then - echo "Error: can't unpack $db database contaner" - echo "Can't unpack $db database contaner" |\ - $send_mail -s "$subj" $email rm -rf $tmpdir - exit $E_PARSING + error="Can't unpack $database database container" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" fi - # Restore domain config - check_config=$(grep "DB='$db'" $USER_DATA/db.conf) + # Restore database config if [ -z "$check_config" ]; then - - # Parse database config - eval $(cat $tmpdir/db/$db/vesta/db.conf) - - # Convert database & database user - DB=$(echo "$DB" | cut -f 2,3,4,5,6,7 -d '_') + eval $(cat $tmpdir/db/$database/vesta/db.conf) + DB=$(echo "$DB" |sed -e "s/${old_user}_//") DB="${user}_${DB}" - DBUSER=$(echo "$DBUSER" | cut -f 2,3,4,5,6,7 -d '_') + DBUSER=$(echo "$DBUSER" |sed -e "s/${old_user}_//") DBUSER="${user}_${DBUSER}" - str="DB='$DB' DBUSER='$DBUSER' MD5='$MD5' HOST='$HOST'" str="$str TYPE='$TYPE' CHARSET='$CHARSET' U_DISK='$U_DISK'" str="$str SUSPENDED='no' TIME='$(date +%T)' DATE='$(date +%F)'" echo $str >> $USER_DATA/db.conf else - eval $(grep "DB='$db'" $USER_DATA/db.conf) + eval $(grep "DB='$database'" $USER_DATA/db.conf) fi - echo -e "$(date "+%F %T") $DB" - msg="$msg\n$(date "+%F %T") $DB" + # Unziping database dump + gzip -d $tmpdir/db/$database/$database.*.sql.gz - # Unzip database dump - gzip -d $tmpdir/db/$db/$db.*.sql.gz - - # Get database values - get_database_values - - # Rebuild db + # Importing database dump + database_dump="$tmpdir/db/$database/$database.$TYPE.sql" case $TYPE in mysql) rebuild_mysql_database; - import_mysql_database $tmpdir/db/$db/$db.$TYPE.sql ;; + import_mysql_database $database_dump ;; pgsql) rebuild_pgsql_database; - import_pgsql_database $tmpdir/db/$db/$db.$TYPE.sql ;; + import_pgsql_database $database_dump ;; esac done - echo - msg="$msg\n" fi -# Cron -if [ "$cron" != 'no' ]; then - echo "-- CRON --" - msg="$msg\n-- CRON --" +# Restoring cron jobs +if [ "$cron" != 'no' ] && [ ! -z "CRON_SYSTEM" ]; then + echo -e "\n-- CRON --" |tee -a $tmpdir/restore.log - # unpack cron container + # Unpacking cron container tar xf $BACKUP/$backup -C $tmpdir ./cron if [ "$?" -ne 0 ]; then - echo "Error: can't unpack cron contaner" - echo "Can't unpack cron contaner" | $send_mail -s "$subj" $email rm -rf $tmpdir - exit $E_PARSING + error="Can't unpack cron container" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" fi - cron_record=$(wc -l $tmpdir/cron/cron.conf |cut -f 1 -d' ') - if [ "$cron_record" -eq 1 ]; then - echo -e "$(date "+%F %T") $cron_record record" - msg="$msg\n$(date "+%F %T") $cron_record record" + jobs=$(wc -l $tmpdir/cron/cron.conf |cut -f 1 -d' ') + if [ "$jobs" -eq 1 ]; then + echo -e "$(date "+%F %T") $jobs cron job" |tee -a $tmpdir/restore.log else - echo -e "$(date "+%F %T") $cron_record records" - msg="$msg\n$(date "+%F %T") $cron_record records" + echo -e "$(date "+%F %T") $jobs cron jobs"|tee -a $tmpdir/restore.log fi - # Restore cron records + # Restoring cron jobs cp $tmpdir/cron/cron.conf $USER_DATA/cron.conf - # Rebuild cron + # Rebuilding cron jobs sync_cron_jobs - # Restart cron + # Restarting cron $BIN/v-restart-cron - if [ $? -ne 0 ]; then - exit $E_RESTART - fi - - echo - msg="$msg\n" + check_result $? "CRON restart failed" fi -# Restore user directories +# Restoring user files and directories if [ "$udir" != 'no' ]; then - echo "-- USER DIR --" - msg="$msg\n-- USER DIR --" + echo -e "\n-- USER FILES --" |tee -a $tmpdir/restore.log - # unpack user dir container + # Unpacking user dir container if [ ! -z "$(tar -tf $BACKUP/$backup |grep './user_dir')" ]; then - # Unpack pam container - tar xf $BACKUP/$backup -C $tmpdir ./pam - if [ "$?" -ne 0 ]; then - echo "Error: can't unpack PAM contaner" - echo "Can't unpack PAM contaner" | $send_mail -s "$subj" $email - rm -rf $tmpdir - exit $E_PARSING + # Creating user dir restore list + backup_dirs=$(tar -tf $BACKUP/$backup |grep "^./user_dir") + backup_dirs=$(echo "$backup_dirs" |grep tar.gz) + backup_dirs=$(echo "$backup_dirs" |cut -f 3 -d /) + backup_dirs=$(echo "$backup_dirs" |sed "s/.tar.gz//") + if [ -z "$udir" ] || [ "$udir" = '*' ]; then + user_dirs="$backup_dirs" + else + echo "$udir" |tr ',' '\n' > $tmpdir/selected.txt + user_dirs=$(echo "$backup_dirs" |egrep -f $tmpdir/selected.txt) fi - # Get user id - old_uid=$(cut -f 3 -d : $tmpdir/pam/passwd) - new_uid=$(grep "^$user:" /etc/passwd | cut -f 3 -d :) - - # Create user dir list - udir_list=$(tar -tf $BACKUP/$backup | grep "^./user_dir" |\ - grep tar.gz | cut -f 3 -d '/' | sed "s/.tar.gz//") - - if [ ! -z "$udir" ]; then - udir_include_list=$(mktemp) - for udir_include in ${udir//,/ }; do - echo "^$udir_include$" >> $udir_include_list - done - udir_list=$(echo "$udir_list" | egrep -f $udir_include_list ) - rm -f $udir_include_list - fi - - for user_dir in $udir_list; do - echo -e "$(date "+%F %T") $user_dir" - msg="$msg\n$(date "+%F %T") $user_dir" - - # unpack user_dir container + for user_dir in $user_dirs; do + echo -e "$(date "+%F %T") $user_dir" |tee -a $tmpdir/restore.log tar xf $BACKUP/$backup -C $tmpdir ./user_dir/$user_dir.tar.gz if [ "$?" -ne 0 ]; then - echo "Error: can't unpack $user_dir user dir contaner" - echo "Can't unpack $user_dir user dir contaner" |\ - $send_mail -s "$subj" $email - rm -rf $tmpdir - exit $E_PARSING + error="can't unpack $user_dir user dir contaner" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" fi tar xzf $tmpdir/user_dir/$user_dir.tar.gz -C $HOMEDIR/$user if [ "$?" -ne 0 ]; then - echo "Error: can't unpack $user_dir user dir contaner" - echo "Can't unpack $user_dir user dir contaner" |\ - $send_mail -s "$subj" $email - rm -rf $tmpdir - exit $E_PARSING + error="can't unpack $user_dir user dir contaner" + echo "$error" |$SENDMAIL -s "$subj" $email $notify + sed -i "/ $user /d" $VESTA/data/queue/backup.pipe + check_result "$E_PARSING" "$error" fi - # ReChown files if uid differs + # Re-chowning files if uid differs if [ "$old_uid" -ne "$new_uid" ]; then find $HOMEDIR/$user/$user_dir -user $old_uid \ -exec chown -h $user:$user {} \; fi done fi - echo - msg="$msg\n" fi -# Remove temporary data +# Sending mail notification +subj="$user → restore has been completed" +cat $tmpdir/restore.log |$SENDMAIL -s "$subj" $email $notify + +# Deleting temporary data rm -rf $tmpdir -# Clean restore queue +# Cleaning restore queue sed -i "/v-restore-user $user /d" $VESTA/data/queue/backup.pipe -# Send notification -if [ "$notify" != 'no' ]; then - subj="$user → restore has been completed" - email=$(get_user_value '$CONTACT') - echo -e "$msg" | $send_mail -s "$subj" $email -fi - #----------------------------------------------------------# # Vesta # @@ -844,6 +628,6 @@ $BIN/v-update-user-counters admin $BIN/v-update-sys-ip-counters # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-schedule-user-backup b/bin/v-schedule-user-backup index 404f012e..dcbcedb6 100755 --- a/bin/v-schedule-user-backup +++ b/bin/v-schedule-user-backup @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$BACKUP_SYSTEM" 'BACKUP_SYSTEM' is_object_valid 'user' 'USER' "$user" is_backup_enabled @@ -44,6 +44,6 @@ echo "$BIN/v-backup-user $user yes >> $log 2>&1" >>\ #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-schedule-user-restore b/bin/v-schedule-user-restore index e91f0cac..031b024e 100755 --- a/bin/v-schedule-user-restore +++ b/bin/v-schedule-user-restore @@ -29,7 +29,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR]' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$BACKUP_SYSTEM" 'BACKUP_SYSTEM' is_object_valid 'user' 'USER' "$user" is_backup_enabled @@ -52,6 +52,6 @@ echo "$BIN/v-restore-user $user $backup $options yes >> $log 2>&1" >>\ #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-search-domain-owner b/bin/v-search-domain-owner index 146a0b4c..5b88f495 100755 --- a/bin/v-search-domain-owner +++ b/bin/v-search-domain-owner @@ -50,6 +50,6 @@ echo $owner #----------------------------------------------------------# # Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-search-object b/bin/v-search-object index a15bc9ed..c642b3e6 100755 --- a/bin/v-search-object +++ b/bin/v-search-object @@ -71,7 +71,7 @@ shell_list_search() { #----------------------------------------------------------# check_args '1' "$#" 'OBJECT [FORMAT]' -validate_format 'object' +is_format_valid 'object' #----------------------------------------------------------# @@ -253,6 +253,6 @@ rm $conf #----------------------------------------------------------# # Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-search-user-object b/bin/v-search-user-object index 28ca2a1e..3e25372d 100755 --- a/bin/v-search-user-object +++ b/bin/v-search-user-object @@ -72,7 +72,7 @@ shell_list_search() { #----------------------------------------------------------# check_args '2' "$#" 'USER OBJECT [FORMAT]' -validate_format 'user' 'object' +is_format_valid 'user' 'object' is_object_valid 'user' 'USER' "$user" @@ -253,6 +253,6 @@ rm $conf #----------------------------------------------------------# # Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-sign-letsencrypt-csr b/bin/v-sign-letsencrypt-csr new file mode 100755 index 00000000..c0d4eceb --- /dev/null +++ b/bin/v-sign-letsencrypt-csr @@ -0,0 +1,112 @@ +#!/bin/bash +# info: sing letsencrypt csr +# options: USER DOMAIN CSR_DIR [FORMAT] +# +# The function signs certificate request using LetsEncript API + + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + +# Argument definition +user=$1 +domain=$(idn -t --quiet -u "$2" ) +domain=$(echo $domain | tr '[:upper:]' '[:lower:]') +csr="$3/$domain.csr" +format=$4 + +# Includes +source $VESTA/func/main.sh +source $VESTA/conf/vesta.conf + +# encode base64 +encode_base64() { + cat |base64 |tr '+/' '-_' |tr -d '\r\n=' +} + + +#----------------------------------------------------------# +# Verifications # +#----------------------------------------------------------# + +check_args '3' "$#" 'USER DOMAIN CSR' +is_format_valid 'user' 'domain' +is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' +is_object_valid 'user' 'USER' "$user" +is_object_unsuspended 'user' 'USER' "$user" +if [ ! -e "$USER_DATA/ssl/le.conf" ]; then + check_result $E_NOTEXIST "LetsEncrypt key doesn't exist" +fi +check_domain=$(grep -w "$domain'" $USER_DATA/web.conf) +if [ -z "$check_domain" ]; then + check_result $E_NOTEXIST "domain $domain doesn't exist" +fi +if [ ! -e "$csr" ]; then + check_result $E_NOTEXIST "$csr doesn't exist" +fi + + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +source $USER_DATA/ssl/le.conf +api='https://acme-v01.api.letsencrypt.org' +r_domain=$(echo "$check_domain" |cut -f 2 -d \') +key="$USER_DATA/ssl/user.key" +exponent="$EXPONENT" +modulus="$MODULUS" +thumb="$THUMB" + +# Defining JWK header +header='{"e":"'$exponent'","kty":"RSA","n":"'"$modulus"'"}' +header='{"alg":"RS256","jwk":'"$header"'}' + +# Requesting nonce +nonce=$(curl -s -I "$api/directory" |grep Nonce |cut -f2 -d \ |tr -d '\r\n') +protected=$(echo -n '{"nonce":"'"$nonce"'"}' |encode_base64) + +# Defining ACME query (request challenge) +csr=$(openssl req -in $csr -outform DER |encode_base64) +query='{"resource":"new-cert","csr":"'$csr'"}' +payload=$(echo -n "$query" |encode_base64) +signature=$(printf "%s" "$protected.$payload" |\ + openssl dgst -sha256 -binary -sign "$key" |encode_base64) +data='{"header":'"$header"',"protected":"'"$protected"'",' +data=$data'"payload":"'"$payload"'","signature":"'"$signature"'"}' + +# Sending request to LetsEncrypt API +answer=$(mktemp) +curl -s -d "$data" "$api/acme/new-cert" -o $answer +if [ ! -z "$(grep Error $answer)" ]; then + detail="$(cat $answer |tr ',' '\n' |grep detail |cut -f 4 -d \")" + detail=$(echo "$detail" |awk -F "::" '{print $2}') + rm $answer + check_result $E_LIMIT "$detail" +fi + +# Printing certificate +crt=$(cat "$answer" |openssl base64 -e) +rm $answer +if [ "$format" != 'json' ]; then + echo "-----BEGIN CERTIFICATE-----" + echo "$crt" + echo "-----END CERTIFICATE-----" +else + echo -e "{\n\t\"$domain\": {\n\t\t\"CRT\":\"" + echo -n '-----BEGIN CERTIFICATE-----\n' + echo -n "$crt" |sed ':a;N;$!ba;s/\n/\\n/g' + echo -n '-----END CERTIFICATE-----' + echo -e "\"\n\t\t}\n\t}" +fi + + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +# Logging +log_event "$OK" "$ARGUMENTS" + +exit diff --git a/bin/v-suspend-cron-job b/bin/v-suspend-cron-job index 78e75da6..499c0772 100755 --- a/bin/v-suspend-cron-job +++ b/bin/v-suspend-cron-job @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER JOB [RESTART]' -validate_format 'user' 'job' +is_format_valid 'user' 'job' is_object_valid 'user' 'USER' "$user" is_object_valid 'cron' 'JOB' "$job" is_object_unsuspended 'cron' 'JOB' "$job" @@ -53,6 +53,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-cron-jobs b/bin/v-suspend-cron-jobs index f53facf4..935347ad 100755 --- a/bin/v-suspend-cron-jobs +++ b/bin/v-suspend-cron-jobs @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -48,6 +48,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-database b/bin/v-suspend-database index e8348873..ac736ea1 100755 --- a/bin/v-suspend-database +++ b/bin/v-suspend-database @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DATABASE' -validate_format 'user' 'database' +is_format_valid 'user' 'database' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -55,6 +55,6 @@ update_object_value 'db' 'DB' "$database" '$SUSPENDED' 'yes' increase_user_value "$user" '$SUSPENDED_DB' # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-database-host b/bin/v-suspend-database-host index 03cdd9de..daf39adc 100755 --- a/bin/v-suspend-database-host +++ b/bin/v-suspend-database-host @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'TYPE HOST' -validate_format 'type' 'host' +is_format_valid 'type' 'host' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid "../../conf/$type" 'HOST' "$host" is_object_unsuspended "../../conf/$type" 'HOST' "$host" @@ -42,6 +42,6 @@ update_object_value "../../conf/$type" 'HOST' "$host" '$SUSPENDED' 'yes' #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-databases b/bin/v-suspend-databases index d1a7104c..6c15b014 100755 --- a/bin/v-suspend-databases +++ b/bin/v-suspend-databases @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -42,6 +42,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-dns-domain b/bin/v-suspend-dns-domain index be32feb5..ebe45e3a 100755 --- a/bin/v-suspend-dns-domain +++ b/bin/v-suspend-dns-domain @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [RESTART]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -47,6 +47,6 @@ sed -i "s/SUSPENDED='no'/SUSPENDED='yes'/g" $USER_DATA/dns/$domain.conf increase_user_value "$user" '$SUSPENDED_DNS' # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-dns-domains b/bin/v-suspend-dns-domains index d561495b..c38e4336 100755 --- a/bin/v-suspend-dns-domains +++ b/bin/v-suspend-dns-domains @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART]' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -43,6 +43,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-dns-record b/bin/v-suspend-dns-record index 0a68f8ce..0e9afa37 100755 --- a/bin/v-suspend-dns-record +++ b/bin/v-suspend-dns-record @@ -11,11 +11,15 @@ # Argument definition user=$1 -domain=$(idn -t --quiet -u "$2" ) -domain_idn=$(idn -t --quiet -a "$domain") +domain="$2" id=$3 restart="$4" +domain_idn="$domain" +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +fi + # Includes source $VESTA/func/main.sh source $VESTA/func/domain.sh @@ -27,7 +31,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ID [RESTART]' -validate_format 'user' 'domain' 'id' +is_format_valid 'user' 'domain' 'id' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -64,6 +68,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-domain b/bin/v-suspend-domain index fabbb2de..6f017534 100755 --- a/bin/v-suspend-domain +++ b/bin/v-suspend-domain @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -66,7 +66,7 @@ fi # Checking domain search result if [ -z "$domain_found" ]; then echo "Error: domain $domain doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi diff --git a/bin/v-suspend-firewall-rule b/bin/v-suspend-firewall-rule index dffeba71..67f14cec 100755 --- a/bin/v-suspend-firewall-rule +++ b/bin/v-suspend-firewall-rule @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'RULE' -validate_format 'rule' +is_format_valid 'rule' is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' is_object_valid '../../data/firewall/rules' 'RULE' "$rule" is_object_unsuspended '../../data/firewall/rules' 'RULE' "$rule" @@ -44,6 +44,6 @@ $BIN/v-update-firewall #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-mail-account b/bin/v-suspend-mail-account index 7ea2bc6a..ba11c8e0 100755 --- a/bin/v-suspend-mail-account +++ b/bin/v-suspend-mail-account @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ACCOUNT' -validate_format 'user' 'domain' 'account' +is_format_valid 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -57,6 +57,6 @@ fi update_object_value "mail/$domain" 'ACCOUNT' "$account" '$SUSPENDED' 'yes' # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-mail-accounts b/bin/v-suspend-mail-accounts index d8cae620..a62069cf 100755 --- a/bin/v-suspend-mail-accounts +++ b/bin/v-suspend-mail-accounts @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -48,6 +48,6 @@ done #----------------------------------------------------------# # No Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-mail-domain b/bin/v-suspend-mail-domain index 93a1328c..afdc1f3d 100755 --- a/bin/v-suspend-mail-domain +++ b/bin/v-suspend-mail-domain @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -54,6 +54,6 @@ sed -i "s/SUSPENDED='no'/SUSPENDED='yes'/g" $USER_DATA/mail/$domain.conf increase_user_value "$user" '$SUSPENDED_MAIL' # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-mail-domains b/bin/v-suspend-mail-domains index 61e2dda8..333228ee 100755 --- a/bin/v-suspend-mail-domains +++ b/bin/v-suspend-mail-domains @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -43,6 +43,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-remote-dns-host b/bin/v-suspend-remote-dns-host index c44e6573..f83b6172 100755 --- a/bin/v-suspend-remote-dns-host +++ b/bin/v-suspend-remote-dns-host @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'HOST' -validate_format 'host' +is_format_valid 'host' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid "../../conf/dns-cluster" 'HOST' "$host" is_object_unsuspended "../../conf/dns-cluster" 'HOST' "$host" @@ -41,6 +41,6 @@ update_object_value "../../conf/dns-cluster" 'HOST' "$host" '$SUSPENDED' 'yes' #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-user b/bin/v-suspend-user index aba883ac..6d049056 100755 --- a/bin/v-suspend-user +++ b/bin/v-suspend-user @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" if [ "$user" = 'admin' ]; then @@ -90,6 +90,6 @@ update_user_value "$user" '$SUSPENDED' 'yes' increase_user_value 'admin' '$SUSPENDED_USERS' # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-web-domain b/bin/v-suspend-web-domain index a7fb6ba0..c3179604 100755 --- a/bin/v-suspend-web-domain +++ b/bin/v-suspend-web-domain @@ -29,7 +29,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [RESTART]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" @@ -42,44 +42,31 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain" # Parsing domain values get_domain_values 'web' -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" -conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" SUSPENDED='yes' -ip=$(get_real_ip $IP) +local_ip=$(get_real_ip $IP) # Preparing domain values for the template substitution -upd_web_domain_values +prepare_web_domain_values -# Recreating vhost -del_web_config -add_web_config - -# Check SSL +# Rebuilding vhost +del_web_config "$WEB_SYSTEM" "$TPL.tpl" +add_web_config "$WEB_SYSTEM" "$TPL.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - del_web_config - add_web_config + del_web_config "$WEB_SYSTEM" "$TPL.stpl" + add_web_config "$WEB_SYSTEM" "$TPL.stpl" fi -# Checking proxy +# Rebuilding proxy configuration if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" - conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - del_web_config - add_web_config - - # Checking proxy SSL + del_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - del_web_config - add_web_config + del_web_config "$PROXY_SYSTEM" "$PROXY.stpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi fi - #----------------------------------------------------------# # Vesta # #----------------------------------------------------------# @@ -100,6 +87,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-suspend-web-domains b/bin/v-suspend-web-domains index 0f4c3116..be480390 100755 --- a/bin/v-suspend-web-domains +++ b/bin/v-suspend-web-domains @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART]' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -54,6 +54,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-cron-job b/bin/v-unsuspend-cron-job index b2fa0f79..108ddf90 100755 --- a/bin/v-unsuspend-cron-job +++ b/bin/v-unsuspend-cron-job @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER JOB [RESTART]' -validate_format 'user' 'job' 'restart' +is_format_valid 'user' 'job' 'restart' is_object_valid 'user' 'USER' "$user" is_object_valid 'cron' 'JOB' "$job" is_object_suspended 'cron' 'JOB' "$job" @@ -53,6 +53,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-cron-jobs b/bin/v-unsuspend-cron-jobs index f7b5e876..bc4cfc4e 100755 --- a/bin/v-unsuspend-cron-jobs +++ b/bin/v-unsuspend-cron-jobs @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART]' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -48,6 +48,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-database b/bin/v-unsuspend-database index ea58389c..89892cb7 100755 --- a/bin/v-unsuspend-database +++ b/bin/v-unsuspend-database @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DATABASE' -validate_format 'user' 'database' +is_format_valid 'user' 'database' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_valid 'db' 'DB' "$database" @@ -54,6 +54,6 @@ update_object_value 'db' 'DB' "$database" '$SUSPENDED' 'no' decrease_user_value "$user" '$SUSPENDED_DB' # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-database-host b/bin/v-unsuspend-database-host index e9e7b80d..928776a5 100755 --- a/bin/v-unsuspend-database-host +++ b/bin/v-unsuspend-database-host @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'TYPE HOST' -validate_format 'type' 'host' +is_format_valid 'type' 'host' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid "../../conf/$type" 'HOST' "$host" is_object_suspended "../../conf/$type" 'HOST' "$host" @@ -42,6 +42,6 @@ update_object_value "../../conf/$type" 'HOST' "$host" '$SUSPENDED' 'no' #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-databases b/bin/v-unsuspend-databases index 52d153af..30525c86 100755 --- a/bin/v-unsuspend-databases +++ b/bin/v-unsuspend-databases @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -43,6 +43,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-dns-domain b/bin/v-unsuspend-dns-domain index e7c41284..49a54091 100755 --- a/bin/v-unsuspend-dns-domain +++ b/bin/v-unsuspend-dns-domain @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -48,6 +48,6 @@ decrease_user_value "$user" '$SUSPENDED_DNS' sed -i "s/SUSPENDED='yes'/SUSPENDED='no'/g" $USER_DATA/dns/$domain.conf # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-dns-domains b/bin/v-unsuspend-dns-domains index 083dc3d3..eb27ba2e 100755 --- a/bin/v-unsuspend-dns-domains +++ b/bin/v-unsuspend-dns-domains @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART]' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -43,6 +43,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-dns-record b/bin/v-unsuspend-dns-record index 963e9676..35b2d7b4 100755 --- a/bin/v-unsuspend-dns-record +++ b/bin/v-unsuspend-dns-record @@ -11,11 +11,15 @@ # Argument definition user=$1 -domain=$(idn -t --quiet -u "$2" ) -domain_idn=$(idn -t --quiet -a "$domain") +domain=$2 id=$3 restart="$4" +domain_idn="$domain" +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +fi + # Includes source $VESTA/func/main.sh source $VESTA/func/domain.sh @@ -27,7 +31,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ID [RESTART]' -validate_format 'user' 'domain' 'id' +is_format_valid 'user' 'domain' 'id' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -63,6 +67,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-domain b/bin/v-unsuspend-domain index 32920c31..294b485c 100755 --- a/bin/v-unsuspend-domain +++ b/bin/v-unsuspend-domain @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_object_valid 'user' 'USER' "$user" @@ -65,7 +65,7 @@ fi # Checking domain search result if [ -z "$domain_found" ]; then echo "Error: domain $domain doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi diff --git a/bin/v-unsuspend-firewall-rule b/bin/v-unsuspend-firewall-rule index f2d27a48..be6320d4 100755 --- a/bin/v-unsuspend-firewall-rule +++ b/bin/v-unsuspend-firewall-rule @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'RULE' -validate_format 'rule' +is_format_valid 'rule' is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' is_object_valid '../../data/firewall/rules' 'RULE' "$rule" is_object_suspended '../../data/firewall/rules' 'RULE' "$rule" @@ -44,6 +44,6 @@ $BIN/v-update-firewall #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-mail-account b/bin/v-unsuspend-mail-account index 98936101..0137f865 100755 --- a/bin/v-unsuspend-mail-account +++ b/bin/v-unsuspend-mail-account @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '3' "$#" 'USER DOMAIN ACCOUNT' -validate_format 'user' 'domain' 'account' +is_format_valid 'user' 'domain' 'account' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -58,6 +58,6 @@ fi update_object_value "mail/$domain" 'ACCOUNT' "$account" '$SUSPENDED' 'no' # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-mail-accounts b/bin/v-unsuspend-mail-accounts index d78165f6..5ad6285d 100755 --- a/bin/v-unsuspend-mail-accounts +++ b/bin/v-unsuspend-mail-accounts @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -48,6 +48,6 @@ done #----------------------------------------------------------# # No Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-mail-domain b/bin/v-unsuspend-mail-domain index 8cf65fa9..ad9df12e 100755 --- a/bin/v-unsuspend-mail-domain +++ b/bin/v-unsuspend-mail-domain @@ -26,7 +26,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" @@ -53,6 +53,6 @@ sed -i "s/SUSPENDED='yes'/SUSPENDED='no'/g" $USER_DATA/mail/$domain.conf decrease_user_value "$user" '$SUSPENDED_MAIL' # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-mail-domains b/bin/v-unsuspend-mail-domains index 30d70a9a..6e319c94 100755 --- a/bin/v-unsuspend-mail-domains +++ b/bin/v-unsuspend-mail-domains @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -43,6 +43,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-remote-dns-host b/bin/v-unsuspend-remote-dns-host index 4e002365..8e3308bf 100755 --- a/bin/v-unsuspend-remote-dns-host +++ b/bin/v-unsuspend-remote-dns-host @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'HOST' -validate_format 'host' +is_format_valid 'host' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid "../../conf/dns-cluster" 'HOST' "$host" is_object_suspended "../../conf/dns-cluster" 'HOST' "$host" @@ -41,6 +41,6 @@ update_object_value "../../conf/dns-cluster" 'HOST' "$host" '$SUSPENDED' 'no' #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-user b/bin/v-unsuspend-user index cfba10ab..1d3feecd 100755 --- a/bin/v-unsuspend-user +++ b/bin/v-unsuspend-user @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" if [ "$user" = 'admin' ]; then exit @@ -89,6 +89,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-web-domain b/bin/v-unsuspend-web-domain index 61071f0f..3b21248e 100755 --- a/bin/v-unsuspend-web-domain +++ b/bin/v-unsuspend-web-domain @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN [RESTART]' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" @@ -40,39 +40,27 @@ is_object_suspended 'web' 'DOMAIN' "$domain" # Parsing domain values get_domain_values 'web' -tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" -conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" SUSPENDED='no' -ip=$(get_real_ip $IP) +local_ip=$(get_real_ip $IP) # Preparing domain values for the template substitution -upd_web_domain_values +prepare_web_domain_values -# Recreating vhost -del_web_config -add_web_config - -# Checking SSL +# Rebuilding vhost +del_web_config "$WEB_SYSTEM" "$TPL.tpl" +add_web_config "$WEB_SYSTEM" "$TPL.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" - del_web_config - add_web_config + del_web_config "$WEB_SYSTEM" "$TPL.stpl" + add_web_config "$WEB_SYSTEM" "$TPL.stpl" fi -# Checking proxy +# Rebuilding proxy configuration if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" - conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" - del_web_config - add_web_config - - # Checking proxy SSL + del_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.tpl" if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" - del_web_config - add_web_config + del_web_config "$PROXY_SYSTEM" "$PROXY.stpl" + add_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi fi @@ -97,6 +85,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-unsuspend-web-domains b/bin/v-unsuspend-web-domains index a07ca86a..b9f4d1e4 100755 --- a/bin/v-unsuspend-web-domains +++ b/bin/v-unsuspend-web-domains @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER [RESTART]' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -55,6 +55,6 @@ if [ "$restart" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-database-disk b/bin/v-update-database-disk index 77768c1d..5365177a 100755 --- a/bin/v-update-database-disk +++ b/bin/v-update-database-disk @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DATABASE' -validate_format 'user' 'database' +is_format_valid 'user' 'database' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -55,6 +55,6 @@ update_object_value 'db' 'DB' "$database" '$U_DISK' "$usage" recalc_user_disk_usage # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-databases-disk b/bin/v-update-databases-disk index 066dde38..fd2c3474 100755 --- a/bin/v-update-databases-disk +++ b/bin/v-update-databases-disk @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -42,6 +42,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-dns-templates b/bin/v-update-dns-templates index a5f4a14b..31361d00 100755 --- a/bin/v-update-dns-templates +++ b/bin/v-update-dns-templates @@ -25,10 +25,10 @@ source $VESTA/conf/vesta.conf tmpdir=$(mktemp -d --dry-run) mkdir $tmpdir cd $tmpdir -wget http://c.vestacp.com/$VERSION/rhel/templates.tar.gz -q +wget http://c.vestacp.com/rhel/7/templates.tar.gz -q if [ "$?" -ne 0 ]; then echo "Error: can't download template.tar.gz" - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" rm -rf $tmpdir exit $E_CONNECT fi diff --git a/bin/v-update-firewall b/bin/v-update-firewall index 04a15a5f..7babd84d 100755 --- a/bin/v-update-firewall +++ b/bin/v-update-firewall @@ -64,6 +64,19 @@ tmp=$(mktemp) echo "$iptables -P INPUT ACCEPT" >> $tmp echo "$iptables -F INPUT" >> $tmp +# Enabling stateful support +if [ "$conntrack" != 'no' ]; then + str="$iptables -A INPUT -m state" + str="$str --state ESTABLISHED,RELATED -j ACCEPT" + echo "$str" >> $tmp +fi + +# Handling local traffic +for ip in $(ls $VESTA/data/ips); do + echo "$iptables -A INPUT -s $ip -j ACCEPT" >> $tmp +done +echo "$iptables -A INPUT -s 127.0.0.1 -j ACCEPT" >> $tmp + # Pasring iptables rules IFS=$'\n' for line in $(sort -r -n -k 2 -t \' $rules); do @@ -100,25 +113,6 @@ for line in $(sort -r -n -k 2 -t \' $rules); do fi done -# Handling local traffic -for ip in $(ls $VESTA/data/ips); do - echo "$iptables -A INPUT -s $ip -j ACCEPT" >> $tmp -done -echo "$iptables -A INPUT -s 127.0.0.1 -j ACCEPT" >> $tmp -IFS=$'\n' -for p_rule in $(cat $ports); do - eval $p_rule - rule="$iptables -A INPUT -p $PROTOCOL" - echo "$rule --sport $PORT -j ACCEPT" >> $tmp -done - -# Enabling stateful support -if [ "$conntrack" != 'no' ]; then - str="$iptables -A INPUT -p tcp -m state" - str="$str --state ESTABLISHED,RELATED -j ACCEPT" - echo "$str" >> $tmp -fi - # Switching chain policy to DROP echo "$iptables -P INPUT DROP" >> $tmp diff --git a/bin/v-update-letsencrypt-ssl b/bin/v-update-letsencrypt-ssl new file mode 100755 index 00000000..39052097 --- /dev/null +++ b/bin/v-update-letsencrypt-ssl @@ -0,0 +1,66 @@ +#!/bin/bash +# info: update letsencrypt ssl certificates +# options: NONE +# +# The function for renew letsencrypt expired ssl certificate for all users + + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + +# Importing system enviroment as we run this script +# mostly by cron wich not read it by itself +source /etc/profile + +# Includes +source $VESTA/func/main.sh +source $VESTA/conf/vesta.conf + + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +# Defining user list +users=$(ls $VESTA/data/users/*/ssl/le.conf |cut -f 7 -d /) + +# Checking users +for user in $users; do + # Checking user certificates + for crt in $(ls $VESTA/data/users/$user/ssl/*.crt 2>/dev/null); do + # Checking certificate issuer + crt_data=$(openssl x509 -text -in $crt) + issuer=$(echo "$crt_data" |grep Issuer: |grep Encrypt) + if [ ! -z "$issuer" ]; then + expire=$(echo "$crt_data" |grep "Not After") + expire=$(echo "$expire" |cut -f 2,3,4 -d :) + expire=$(date -d "$expire" +%s) + now=$(date +%s) + expire=$((expire - now)) + expire=$((expire / 86400)) + domain=$(basename $crt |sed -e "s/.crt$//") + if [[ "$expire" -lt 31 ]]; then + aliases=$(echo "$crt_data" |grep DNS:) + aliases=$(echo "$aliases" |sed -e "s/DNS://g" -e "s/,//") + aliases=$(echo "$aliases" |tr ' ' '\n' |sed "/^$/d") + aliases=$(echo "$aliases" |grep -v "^$domain$") + if [ ! -z "$aliases" ]; then + aliases=$(echo "$aliases" |sed -e ':a;N;$!ba;s/\n/,/g') + $BIN/v-add-letsencrypt-domain $user $domain $aliases + else + $BIN/v-add-letsencrypt-domain $user $domain + fi + fi + fi + done +done + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +# No Logging +#log_event "$OK" "$EVENT" + +exit diff --git a/bin/v-update-mail-domain-disk b/bin/v-update-mail-domain-disk index c5bf5ba5..68d58a61 100755 --- a/bin/v-update-mail-domain-disk +++ b/bin/v-update-mail-domain-disk @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -62,6 +62,6 @@ update_object_value 'mail' 'DOMAIN' "$domain" '$U_DISK' "$dom_diks" recalc_user_disk_usage # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-mail-domains-disk b/bin/v-update-mail-domains-disk index 58ad8f04..ca93627f 100755 --- a/bin/v-update-mail-domains-disk +++ b/bin/v-update-mail-domains-disk @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM' is_object_valid 'user' 'USER' "$user" if [ -z "$MAIL_SYSTEM" ] || [ "$MAIL_SYSTEM" = 'remote' ]; then @@ -60,6 +60,6 @@ done recalc_user_disk_usage # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-sys-ip b/bin/v-update-sys-ip index f995c1af..b783b177 100755 --- a/bin/v-update-sys-ip +++ b/bin/v-update-sys-ip @@ -27,7 +27,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '0' "$#" '[USER] [IP_STATUS]' -validate_format 'user' 'ip_status' +is_format_valid 'user' 'ip_status' is_object_valid 'user' 'USER' "$user" "$user" diff --git a/bin/v-update-sys-ip-counters b/bin/v-update-sys-ip-counters index dc8c561c..54711f92 100755 --- a/bin/v-update-sys-ip-counters +++ b/bin/v-update-sys-ip-counters @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf check_args '0' "$#" 'IP' if [ ! -z "$ip" ]; then - validate_format 'ip' + is_format_valid 'ip' is_ip_valid fi @@ -60,6 +60,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-sys-queue b/bin/v-update-sys-queue index 56842b48..77da8ee4 100755 --- a/bin/v-update-sys-queue +++ b/bin/v-update-sys-queue @@ -63,6 +63,6 @@ esac #----------------------------------------------------------# # No Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-sys-rrd b/bin/v-update-sys-rrd index f8633aa7..77412eaf 100755 --- a/bin/v-update-sys-rrd +++ b/bin/v-update-sys-rrd @@ -138,6 +138,6 @@ done #----------------------------------------------------------# # No Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-sys-rrd-mysql b/bin/v-update-sys-rrd-mysql index c045057f..0d870e44 100755 --- a/bin/v-update-sys-rrd-mysql +++ b/bin/v-update-sys-rrd-mysql @@ -78,7 +78,7 @@ for host in $hosts; do # Checking empty vars if [ -z $HOST ] || [ -z $USER ] || [ -z $PASSWORD ]; then echo "Error: config is broken" - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi diff --git a/bin/v-update-sys-rrd-net b/bin/v-update-sys-rrd-net index 542c00cf..e9c642e4 100755 --- a/bin/v-update-sys-rrd-net +++ b/bin/v-update-sys-rrd-net @@ -40,6 +40,9 @@ ndev=$(cat /proc/net/dev) ifaces=$(echo "$ndev" |grep : |cut -f 1 -d : | sed "s/ //g") # Parsing excludes +if [ -z "$RRD_IFACE_EXCLUDE" ]; then + RRD_IFACE_EXCLUDE='lo' +fi for exclude in $(echo ${RRD_IFACE_EXCLUDE//,/ }); do ifaces=$(echo "$ifaces" |grep -vw "$exclude" ) done diff --git a/bin/v-update-sys-rrd-pgsql b/bin/v-update-sys-rrd-pgsql index 3eeb16ab..9c8e3cb7 100755 --- a/bin/v-update-sys-rrd-pgsql +++ b/bin/v-update-sys-rrd-pgsql @@ -80,7 +80,7 @@ for host in $hosts; do # Checking empty vars if [ -z $HOST ] || [ -z $USER ] || [ -z $PASSWORD ]; then echo "Error: config is broken" - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi diff --git a/bin/v-update-sys-vesta b/bin/v-update-sys-vesta index a03470e9..a42e4d71 100755 --- a/bin/v-update-sys-vesta +++ b/bin/v-update-sys-vesta @@ -59,6 +59,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-user-backup-exclusions b/bin/v-update-user-backup-exclusions index ed90e9d9..eefad8c3 100755 --- a/bin/v-update-user-backup-exclusions +++ b/bin/v-update-user-backup-exclusions @@ -19,19 +19,14 @@ source $VESTA/conf/vesta.conf is_file_available() { if [ ! -e "$vfile" ]; then - echo "Error: file $vfile doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + check_result $E_NOTEXIST "file $vfile doesn't exist" fi } is_file_valid() { - exclude="[!$#&;()\]" - vcontent=$(cat $vfile) - if [[ "$vcontent" =~ $exclude ]]; then - echo "Error: invalid characters in the exlusion list" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID + exclude="[!|#|$|^|&|(|)|{|}|<|>|?|\|\"|;|%|\`]" + if [[ "$(cat $vfile)" =~ $exclude ]]; then + check_result $E_INVALID "invalid characters in the exlusion list" fi } @@ -41,7 +36,7 @@ is_file_valid() { #----------------------------------------------------------# check_args '2' "$#" 'USER FILE' -validate_format 'user' 'vfile' +is_format_valid 'user' 'vfile' is_object_valid 'user' 'USER' "$user" is_file_available is_file_valid @@ -78,6 +73,6 @@ chmod 660 $USER_DATA/backup-excludes.conf # Logging log_history "updated exlusion list" -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-user-backups b/bin/v-update-user-backups deleted file mode 100755 index 6dfe3299..00000000 --- a/bin/v-update-user-backups +++ /dev/null @@ -1,278 +0,0 @@ -#!/bin/bash -# info: update user backups -# options: USER -# -# The function rescan backup directory and updates backup database. - - -#----------------------------------------------------------# -# Variable&Function # -#----------------------------------------------------------# - -# Includes -source $VESTA/func/main.sh -source $VESTA/conf/vesta.conf - -# Argument definition -user=$1 -type="${2-$BACKUP_SYSTEM}" - -# Defining tar parser function -get_backup_info() { - backup=$1 - backup_type="$2" - - backup_name=$(basename $backup ) - backup_date=$(echo $backup_name |cut -f 2 -d '.' ) - backup_time=$(stat --printf=%y $backup |cut -f 2 -d ' ' |cut -f 1 -d '.') - backup_size=$(du -sm $backup |cut -f 1 ) - backup_data=$(tar -tf $backup) - - vst_data=$(echo "$backup_data" |grep "^./vesta/" |grep -v "^./vesta/$") - if [ -z "$vst_data" ]; then - vst='' - else - vst='yes' - fi - - pam_data=$(echo "$backup_data" |grep "^./pam/" |grep -v "^./pam/$") - if [ -z "$pam_data" ]; then - pam='' - else - pam='yes' - fi - - web_data=$(echo "$backup_data" |grep "^./web/" |grep -v "^./web/$" |sort) - if [ -z "$web_data" ]; then - web='' - else - i=1 - for domain in $web_data; do - domain="$(basename $domain |sed 's/.tar.gz$//')" - if [ "$i" -eq 1 ]; then - web="$domain" - i=2 - else - web="$web,$domain" - fi - done - fi - - dns_data=$(echo "$backup_data" |grep "^./dns/" |grep ".db$" |sort) - if [ -z "$dns_data" ]; then - dns='' - else - i=1 - for domain in $dns_data; do - domain="$(basename $domain |sed 's/.db$//')" - if [ "$i" -eq 1 ]; then - dns="$domain" - i=2 - else - dns="$dns,$domain" - fi - done - fi - - mail_data=$(echo "$backup_data"|grep "^./mail/"|grep -v "^./mail/$"|sort) - if [ -z "$mail_data" ]; then - ml='' - else - i=1 - for domain in $mail_data; do - domain="$(basename $domain |sed 's/.tar.gz$//')" - if [ "$i" -eq 1 ]; then - ml="$domain" - i=2 - else - ml="$ml,$domain" - fi - done - fi - - db_data=$(echo "$backup_data"|grep "^./db/"|grep ".sql.gz$"|sort) - if [ -z "$db_data" ]; then - db='' - else - i=1 - for dbase in $db_data; do - dbase=$(basename $dbase |sed "s/.\(my\|pg\)sql.sql.gz$//") - if [ "$i" -eq 1 ]; then - db="$dbase" - i=2 - else - db="$db,$dbase" - fi - done - fi - - ssl_data=$(echo "$backup_data"|grep "^./ssl/"|grep ".crt$"|sort) - if [ -z "$ssl_data" ]; then - ssl='' - else - i=1 - for certificate in $ssl_data; do - certificate=$(basename $certificate |sed "s/.crt$//") - if [ "$i" -eq 1 ]; then - ssl="$certificate" - i=2 - else - ssl="$ssl,$certificate" - fi - done - fi - - cron_data=$(echo "$backup_data" |grep "^./cron/" |grep -v "^./cron/$") - if [ -z "$cron_data" ]; then - cron='' - else - cron='yes' - fi - - echo -n "DATE='$backup_date' TIME='$backup_time' RUNTIME='0'" - echo -n " SIZE='$backup_size' TYPE='$backup_type' VESTA='$vst' PAM='$pam'" - echo " WEB='$web' DNS='$dns' MAIL='$ml' DB='$db' SSL='$ssl' CRON='$cron'" -} - -# Defining ftp command function -ftpc() { - ftp -n $HOST $PORT <> $tmp_file - done -fi - -# Checking ftp -if [ "$type" = 'ftp' ]; then - tmpdir=$(mktemp -p $BACKUP -d) - ftmpdir=$(basename $tmpdir) - init_ftp_variables - check_ftp_connection - backups=$(ftpc ls|awk '{print $9}'|grep "^$user.") - - for backup in $backups; do - cd $tmpdir - if [ ! -z "$(ftpc "get $backup")" ]; then - echo "Error: FTP transfer error" - log_event "$E_FTP" "$EVENT" - exit $E_FTP - fi - get_backup_info $tmpdir/$backup $type >> $tmp_file - rm -f $tmpdir/$backup - done - rm -rf $tmpdir -fi - -# Checking both local and ftp -if [ "$type" = 'ftp,local' ] || [ "$type" = 'local,ftp' ]; then - - tmpdir=$(mktemp -p $BACKUP -d) - ftmpdir=$(basename $tmpdir) - init_ftp_variables - check_ftp_connection - ftp_backups=$(ftpc ls|awk '{print $9}'|grep "^$user.") - local_backups=$(ls $BACKUP/ |grep "^$user." |sort) - backups=$(echo -e "$local_backups\n$ftp_backups" |\ - sort |uniq -c | awk '{print $1" "$2}') - - for backup in $(echo "$backups"|grep "^1 "|cut -f 2 -d ' '); do - check_ftp=$(echo $ftp_backups|grep -w $backup) - if [ ! -z "$check_ftp" ]; then - cd $tmpdir - if [ ! -z "$(ftpc "get $backup")" ]; then - echo "Error: FTP transfer error" - log_event "$E_FTP" "$EVENT" - exit $E_FTP - fi - get_backup_info $tmpdir/$backup ftp >> $tmp_file - rm -f $tmpdir/$backup - else - get_backup_info $BACKUP/$backup local >> $tmp_file - fi - done - - for backup in $(echo "$backups"|grep "^2 "|cut -f 2 -d ' '); do - get_backup_info $BACKUP/$backup $type >> $tmp_file - done - rm -rf $tmpdir -fi - -# Checking if there was any output -if [ -e "$tmp_file" ]; then - cat $tmp_file | sort > $USER_DATA/backup.conf - rm $tmp_file -else - rm $USER_DATA/backup.conf - touch $USER_DATA/backup.conf -fi - - -#----------------------------------------------------------# -# Vesta # -#----------------------------------------------------------# - -# Logging -log_event "$OK" "$EVENT" - -exit diff --git a/bin/v-update-user-counters b/bin/v-update-user-counters index 9fc1ac5e..5fcdd671 100755 --- a/bin/v-update-user-counters +++ b/bin/v-update-user-counters @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf check_args '0' "$#" 'USER' if [ ! -z "$user" ]; then - validate_format 'user' + is_format_valid 'user' is_object_valid 'user' 'USER' "$user" fi @@ -211,6 +211,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-user-disk b/bin/v-update-user-disk index a37f9a38..a99eaf37 100755 --- a/bin/v-update-user-disk +++ b/bin/v-update-user-disk @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -60,6 +60,6 @@ update_user_value "$user" '$U_DISK_DIRS' "$disk_usage" recalc_user_disk_usage # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-user-package b/bin/v-update-user-package index 511c8dbf..fa9e5ce0 100755 --- a/bin/v-update-user-package +++ b/bin/v-update-user-package @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'PACKAGE' -validate_format 'package' +is_format_valid 'package' is_package_valid @@ -42,6 +42,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-user-quota b/bin/v-update-user-quota index 9de5f28c..b0f376a2 100755 --- a/bin/v-update-user-quota +++ b/bin/v-update-user-quota @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" @@ -52,6 +52,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-user-stats b/bin/v-update-user-stats index 7dc46744..f6b5ff56 100755 --- a/bin/v-update-user-stats +++ b/bin/v-update-user-stats @@ -28,7 +28,7 @@ source $VESTA/conf/vesta.conf check_args '0' "$#" 'USER' if [ ! -z "$user" ]; then - validate_format 'user' + is_format_valid 'user' is_object_valid 'user' 'USER' "$user" fi @@ -39,7 +39,7 @@ fi # Creating user_list if [ -z "$user" ]; then - user_list=$(ls $VESTA/data/users) + user_list=$(grep '@' /etc/passwd |cut -f1 -d:) else user_list="$user" fi @@ -63,6 +63,7 @@ TOTAL_U_MAIL_ACCOUNTS=0 TOTAL_U_DATABASES=0 TOTAL_U_CRON_JOBS=0 TOTAL_U_BACKUPS=0 +TOTAL_USERS=0 # Updating user stats for user in $user_list; do @@ -72,16 +73,17 @@ for user in $user_list; do DATE=$(date -d "$next_month -1day" +%F) # Compiling report string - s="DATE='$DATE' TIME='$TIME' PACKAGE='$PACKAGE' IP_OWNED='$IP_OWNED'" - s="$s DISK_QUOTA='$DISK_QUOTA' U_DISK='$U_DISK' U_DISK_DIRS='$U_DISK_DIRS'" - s="$s U_DISK_WEB='$U_DISK_WEB' U_DISK_MAIL='$U_DISK_MAIL'" - s="$s U_DISK_DB='$U_DISK_DB' BANDWIDTH='$BANDWIDTH'" - s="$s U_BANDWIDTH='$U_BANDWIDTH' U_WEB_DOMAINS='$U_WEB_DOMAINS'" - s="$s U_WEB_SSL='$U_WEB_SSL' U_WEB_ALIASES='$U_WEB_ALIASES'" - s="$s U_DNS_DOMAINS='$U_DNS_DOMAINS' U_DNS_RECORDS='$U_DNS_RECORDS'" - s="$s U_MAIL_DOMAINS='$U_MAIL_DOMAINS' U_MAIL_DKIM='$U_MAIL_DKIM'" - s="$s U_MAIL_ACCOUNTS='$U_MAIL_ACCOUNTS' U_DATABASES='$U_DATABASES'" - s="$s U_CRON_JOBS='$U_CRON_JOBS' U_BACKUPS='$U_BACKUPS'" + s="DATE='$DATE' TIME='$TIME' PACKAGE='$PACKAGE' IP_OWNED='$IP_OWNED'" + s="$s DISK_QUOTA='$DISK_QUOTA' U_DISK='$U_DISK'" + s="$s U_DISK_DIRS='$U_DISK_DIRS' U_DISK_WEB='$U_DISK_WEB'" + s="$s U_DISK_MAIL='$U_DISK_MAIL' U_DISK_DB='$U_DISK_DB'" + s="$s BANDWIDTH='$BANDWIDTH' U_BANDWIDTH='$U_BANDWIDTH'" + s="$s U_WEB_DOMAINS='$U_WEB_DOMAINS' U_WEB_SSL='$U_WEB_SSL'" + s="$s U_WEB_ALIASES='$U_WEB_ALIASES' U_DNS_DOMAINS='$U_DNS_DOMAINS'" + s="$s U_DNS_RECORDS='$U_DNS_RECORDS' U_MAIL_DOMAINS='$U_MAIL_DOMAINS'" + s="$s U_MAIL_DKIM='$U_MAIL_DKIM' U_MAIL_ACCOUNTS='$U_MAIL_ACCOUNTS'" + s="$s U_DATABASES='$U_DATABASES' U_CRON_JOBS='$U_CRON_JOBS'" + s="$s U_BACKUPS='$U_BACKUPS'" # Updating user stats log stats="$USER_DATA/stats.log" @@ -121,24 +123,27 @@ for user in $user_list; do TOTAL_U_DATABASES=$((TOTAL_U_DATABASES + U_DATABASES)) TOTAL_U_CRON_JOBS=$((TOTAL_U_CRON_JOBS + U_CRON_JOBS)) TOTAL_U_BACKUPS=$((TOTAL_U_BACKUPS + U_BACKUPS)) + TOTAL_USERS=$((TOTAL_USERS + 1)) done # Updating overall stats stats="$VESTA/data/users/admin/overall_stats.log" -s="DATE='$DATE' TIME='$TIME' PACKAGE='default' IP_OWNED='$TOTAL_IP_OWNED'" +s="DATE='$DATE' TIME='$TIME' PACKAGE='default' IP_OWNED='$TOTAL_IP_OWNED'" s="$s DISK_QUOTA='0' U_DISK='$TOTAL_U_DISK' U_DISK_DIRS='$TOTAL_U_DISK_DIRS'" -s="$s U_DISK_WEB='$TOTAL_U_DISK_WEB' U_DISK_MAIL='$TOTAL_U_DISK_MAIL'" +s="$s U_DISK_WEB='$TOTAL_U_DISK_WEB' U_DISK_MAIL='$TOTAL_U_DISK_MAIL'" s="$s U_DISK_DB='$TOTAL_U_DISK_DB' BANDWIDTH='0'" s="$s U_BANDWIDTH='$TOTAL_U_BANDWIDTH' U_WEB_DOMAINS='$TOTAL_U_WEB_DOMAINS'" s="$s U_WEB_SSL='$TOTAL_U_WEB_SSL' U_WEB_ALIASES='$TOTAL_U_WEB_ALIASES'" s="$s U_DNS_DOMAINS='$TOTAL_U_DNS_DOMAINS'" s="$s U_DNS_RECORDS='$TOTAL_U_DNS_RECORDS'" -s="$s U_MAIL_DOMAINS='$TOTAL_U_MAIL_DOMAINS' U_MAIL_DKIM='$TOTAL_U_MAIL_DKIM'" +s="$s U_MAIL_DOMAINS='$TOTAL_U_MAIL_DOMAINS'" +s="$s U_MAIL_DKIM='$TOTAL_U_MAIL_DKIM'" s="$s U_MAIL_ACCOUNTS='$TOTAL_U_MAIL_ACCOUNTS'" -s="$s U_DATABASES='$TOTAL_U_DATABASES'" +s="$s U_DATABASES='$TOTAL_U_DATABASES'" s="$s U_CRON_JOBS='$TOTAL_U_CRON_JOBS' U_BACKUPS='$TOTAL_U_BACKUPS'" +s="$s U_USERS='$TOTAL_USERS'" if [ -e "$stats" ]; then # Checking dublicates @@ -164,6 +169,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-web-domain-disk b/bin/v-update-web-domain-disk index 67dcaa8a..5317b3f0 100755 --- a/bin/v-update-web-domain-disk +++ b/bin/v-update-web-domain-disk @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -55,6 +55,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$U_DISK' "$disk_usage" recalc_user_disk_usage # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-web-domain-stat b/bin/v-update-web-domain-stat index a89664fb..56dfc93a 100755 --- a/bin/v-update-web-domain-stat +++ b/bin/v-update-web-domain-stat @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -43,9 +43,7 @@ get_domain_values 'web' # Checking config config="$HOMEDIR/$user/conf/web/$STATS.$domain.conf" if [ ! -e "$config" ]; then - echo "Error: Parsing error" - log_event "$E_PARSING" "$EVENT" - exit $E_PARSING + check_result $E_NOTEXISTS "$config doesn't exist" fi # Checking statistics directory @@ -146,6 +144,6 @@ chown -R $user:$(groups $user| cut -f 3 -d ' ') $dir #----------------------------------------------------------# # No Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-web-domain-traff b/bin/v-update-web-domain-traff index d78e9938..fda546cc 100755 --- a/bin/v-update-web-domain-traff +++ b/bin/v-update-web-domain-traff @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -validate_format 'user' 'domain' +is_format_valid 'user' 'domain' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -79,6 +79,6 @@ bandwidth=$((U_BANDWIDTH + mb)) update_object_value 'web' 'DOMAIN' "$domain" '$U_BANDWIDTH' "$bandwidth" # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-web-domains-disk b/bin/v-update-web-domains-disk index ae538997..5951f289 100755 --- a/bin/v-update-web-domains-disk +++ b/bin/v-update-web-domains-disk @@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" @@ -49,6 +49,6 @@ done recalc_user_disk_usage # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-web-domains-stat b/bin/v-update-web-domains-stat index 1ef2abd8..acd24f16 100755 --- a/bin/v-update-web-domains-stat +++ b/bin/v-update-web-domains-stat @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" @@ -47,6 +47,6 @@ done #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-web-domains-traff b/bin/v-update-web-domains-traff index dfeacf78..ebecf1de 100755 --- a/bin/v-update-web-domains-traff +++ b/bin/v-update-web-domains-traff @@ -23,7 +23,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '1' "$#" 'USER' -validate_format 'user' +is_format_valid 'user' is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' is_object_valid 'user' 'USER' "$user" "$user" @@ -74,6 +74,6 @@ done recalc_user_bandwidth_usage # No Logging -#log_event "$OK" "$EVENT" +#log_event "$OK" "$ARGUMENTS" exit diff --git a/func/db.sh b/func/db.sh index 270313f6..c7514eea 100644 --- a/func/db.sh +++ b/func/db.sh @@ -4,7 +4,7 @@ mysql_connect() { eval $host_str if [ -z $HOST ] || [ -z $USER ] || [ -z $PASSWORD ]; then echo "Error: mysql config parsing failed" - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi @@ -30,10 +30,10 @@ mysql_connect() { if [ '0' -ne "$?" ]; then if [ "$notify" != 'no' ]; then echo -e "Can't connect to MySQL $HOST\n$(cat $err)" |\ - $send_mail -s "$subj" $email + $SENDMAIL -s "$subj" $email fi echo "Error: Connection to $HOST failed" - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi } @@ -49,10 +49,10 @@ mysql_dump() { rm -rf $tmpdir if [ "$notify" != 'no' ]; then echo -e "Can't dump database $database\n$(cat $err)" |\ - $send_mail -s "$subj" $email + $SENDMAIL -s "$subj" $email fi echo "Error: dump $database failed" - log_event "$E_DB" "$EVENT" + log_event "$E_DB" "$ARGUMENTS" exit $E_DB fi } @@ -64,7 +64,7 @@ psql_connect() { export PGPASSWORD="$PASSWORD" if [ -z $HOST ] || [ -z $USER ] || [ -z $PASSWORD ] || [ -z $TPL ]; then echo "Error: postgresql config parsing failed" - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi @@ -72,10 +72,10 @@ psql_connect() { if [ '0' -ne "$?" ]; then if [ "$notify" != 'no' ]; then echo -e "Can't connect to PostgreSQL $HOST\n$(cat /tmp/e.psql)" |\ - $send_mail -s "$subj" $email + $SENDMAIL -s "$subj" $email fi echo "Error: Connection to $HOST failed" - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi } @@ -90,10 +90,10 @@ psql_dump() { rm -rf $tmpdir if [ "$notify" != 'no' ]; then echo -e "Can't dump database $database\n$(cat /tmp/e.psql)" |\ - $send_mail -s "$subj" $email + $SENDMAIL -s "$subj" $email fi echo "Error: dump $database failed" - log_event "$E_DB" "$EVENT" + log_event "$E_DB" "$ARGUMENTS" exit $E_DB fi } @@ -137,7 +137,7 @@ is_charset_valid() { if [ -z "$(echo $CHARSETS | grep -wi $charset )" ]; then echo "Error: charset $charset not exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi } @@ -235,7 +235,7 @@ is_dbhost_new() { check_host=$(grep "HOST='$host'" $VESTA/conf/$type.conf) if [ ! -z "$check_host" ]; then echo "Error: db host exist" - log_event "$E_EXISTS" "$EVENT" + log_event "$E_EXISTS" "$ARGUMENTS" exit $E_EXISTS fi fi @@ -243,8 +243,7 @@ is_dbhost_new() { # Get database values get_database_values() { - db_str=$(grep "DB='$database'" $USER_DATA/db.conf) - eval $db_str + eval $(grep "DB='$database'" $USER_DATA/db.conf) } # Change MySQL database password @@ -345,7 +344,7 @@ is_dbhost_free() { eval $host_str if [ 0 -ne "$U_DB_BASES" ]; then echo "Error: host $HOST is used" - log_event "$E_INUSE" "$EVENT" + log_event "$E_INUSE" "$ARGUMENTS" exit $E_INUSE fi } diff --git a/func/domain.sh b/func/domain.sh index 6fdabc08..a163d259 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -1,216 +1,368 @@ +#----------------------------------------------------------# +# WEB # +#----------------------------------------------------------# + # Web template check is_web_template_valid() { - t="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.tpl" - s="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.stpl" - if [ ! -e $t ] || [ ! -e $s ]; then - echo "Error: web template $template not found" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + if [ ! -z "$WEB_SYSTEM" ]; then + tpl="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$1.tpl" + stpl="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$1.stpl" + if [ ! -e "$tpl" ] || [ ! -e "$stpl" ]; then + check_result $E_NOTEXIST "$1 web template doesn't exist" + fi fi } # Proxy template check is_proxy_template_valid() { - proxy=$1 - t="$WEBTPL/$PROXY_SYSTEM/$proxy.tpl" - s="$WEBTPL/$PROXY_SYSTEM/$proxy.stpl" - if [ ! -e $t ] || [ ! -e $s ]; then - echo "Error: proxy template $proxy not found" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + if [ ! -z "$PROXY_SYSTEM" ]; then + tpl="$WEBTPL/$PROXY_SYSTEM/$1.tpl" + stpl="$WEBTPL/$PROXY_SYSTEM/$1.stpl" + if [ ! -e "$tpl" ] || [ ! -e "$stpl" ]; then + check_result $E_NOTEXIST "$1 proxy template doesn't exist" + fi fi } # Backend template check -is_web_backend_template_valid() { - if [ ! -z "$1" ]; then - template=$1 - else - template=$(grep BACKEND_TEMPLATE $USER_DATA/user.conf) - fi - if [ -z "$template" ]; then - if [ -e "$WEBTPL/$WEB_BACKEND/default.tpl" ]; then - sed -i "s/^WEB_DOMAINS/BACKEND_TEMPLATE='default'\nWEB_DOMAINS/g" \ - $USER_DATA/user.conf - template='default' - else - echo "Error: backend template default not found" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi - else - template=$(echo "$template"|cut -f 2 -d \'|head -n1) - if [ ! -e "$WEBTPL/$WEB_BACKEND/$template.tpl" ]; then - echo "Error: backend template $template not found" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST +is_backend_template_valid() { + if [ ! -z "$WEB_BACKEND" ]; then + if [ ! -e "$WEBTPL/$WEB_BACKEND/$1.tpl" ]; then + check_result $E_NOTEXIST "$1 backend template doesn't exist" fi fi } -# Backend pool check -is_web_backend_pool_valid(){ +# Web domain existence check +is_web_domain_new() { + web=$(grep -F -H "DOMAIN='$1'" $VESTA/data/users/*/web.conf) + if [ ! -z "$web" ]; then + if [ "$type" == 'web' ]; then + check_result $E_EXISTS "Web domain $1 exist" + fi + web_user=$(echo "$web" |cut -f 7 -d /) + if [ "$web_user" != "$user" ]; then + check_result $E_EXISTS "Web domain $1 exist" + fi + fi +} + +# Web alias existence check +is_web_alias_new() { + web_alias=$(grep -wH "$1" $VESTA/data/users/*/web.conf) + if [ ! -z "$web_alias" ]; then + a1=$(echo "$web_alias" |grep -F "'$1'" |cut -f 7 -d /) + if [ ! -z "$a1" ] && [ "$2" == "web" ]; then + check_result $E_EXISTS "Web alias $1 exists" + fi + if [ ! -z "$a1" ] && [ "$a1" != "$user" ]; then + check_result $E_EXISTS "Web alias $1 exists" + fi + a2=$(echo "$web_alias" |grep -F "'$1," |cut -f 7 -d /) + if [ ! -z "$a2" ] && [ "$2" == "web" ]; then + check_result $E_EXISTS "Web alias $1 exists" + fi + if [ ! -z "$a2" ] && [ "$a2" != "$user" ]; then + check_result $E_EXISTS "Web alias $1 exists" + fi + a3=$(echo "$web_alias" |grep -F ",$1," |cut -f 7 -d /) + if [ ! -z "$a3" ] && [ "$2" == "web" ]; then + check_result $E_EXISTS "Web alias $1 exists" + fi + if [ ! -z "$a3" ] && [ "$a3" != "$user" ]; then + check_result $E_EXISTS "Web alias $1 exists" + fi + a4=$(echo "$web_alias" |grep -F ",$1'" |cut -f 7 -d /) + if [ ! -z "$a4" ] && [ "$2" == "web" ]; then + check_result $E_EXISTS "Web alias $1 exists" + fi + if [ ! -z "$a4" ] && [ "$a4" != "$user" ]; then + check_result $E_EXISTS "Web alias $1 exists" + fi + fi +} + +# Prepare web backend +prepare_web_backend() { if [ -d "/etc/php-fpm.d" ]; then pool="/etc/php-fpm.d" fi if [ -d "/etc/php5/fpm/pool.d" ]; then pool="/etc/php5/fpm/pool.d" fi - if [ -d "/etc/php-fpm-5.5.d" ]; then - pool="/etc/php-fpm-5.5.d" - fi if [ ! -e "$pool" ]; then - echo "Error: backend pool directory not found" - log_event "$E_NOTEXIST" "$EVENT" + pool=$(find /etc/php* -type d \( -name "pool.d" -o -name "*fpm.d" \)) + if [ ! -e "$pool" ]; then + check_result $E_NOTEXIST "php-fpm pool doesn't exist" + fi + fi + + backend_type="$domain" + if [ "$WEB_BACKEND_POOL" = 'user' ]; then + backend_type="$user" + fi + if [ -e "$pool/$backend_type.conf" ]; then + backend_lsnr=$(grep "listen =" $pool/$backend_type.conf) + backend_lsnr=$(echo "$backend_lsnr" |cut -f 2 -d = |sed "s/ //") + if [ ! -z "$(echo $backend_lsnr |grep /)" ]; then + backend_lsnr="unix:$backend_lsnr" + fi + fi +} + +# Prepare web aliases +prepare_web_aliases() { + i=1 + for tmp_alias in ${1//,/ }; do + tmp_alias_idn="$tmp_alias" + if [[ "$tmp_alias" = *[![:ascii:]]* ]]; then + tmp_alias_idn=$(idn -t --quiet -a $tmp_alias) + fi + if [[ $i -eq 1 ]]; then + aliases="$tmp_alias" + aliases_idn="$tmp_alias_idn" + alias_string="ServerAlias $tmp_alias_idn" + else + aliases="$aliases,$tmp_alias" + aliases_idn="$aliases_idn,$tmp_alias_idn" + if (( $i % 100 == 0 )); then + alias_string="$alias_string\n ServerAlias $tmp_alias_idn" + else + alias_string="$alias_string $tmp_alias_idn" + fi + fi + alias_number=$i + ((i++)) + done +} + +# Update web domain values +prepare_web_domain_values() { + if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) + else + domain_idn=$domain + fi + group="$user" + email="info@$domain" + docroot="$HOMEDIR/$user/web/$domain/public_html" + sdocroot="$docroot" + if [ "$SSL_HOME" = 'single' ]; then + sdocroot="$HOMEDIR/$user/web/$domain/public_shtml" ; + fi + + if [ ! -z "$WEB_BACKEND" ]; then + prepare_web_backend + fi + + server_alias='' + alias_string='' + aliases_idn='' + prepare_web_aliases $ALIAS + + ssl_crt="$HOMEDIR/$user/conf/web/ssl.$domain.crt" + ssl_key="$HOMEDIR/$user/conf/web/ssl.$domain.key" + ssl_pem="$HOMEDIR/$user/conf/web/ssl.$domain.pem" + ssl_ca="$HOMEDIR/$user/conf/web/ssl.$domain.ca" + if [ ! -e "$USER_DATA/ssl/$domain.ca" ]; then + ssl_ca_str='#' + fi + if [ "$SUSPENDED" = 'yes' ]; then + docroot="$VESTA/data/templates/web/suspend" + sdocroot="$VESTA/data/templates/web/suspend" + fi +} + +# Add web config +add_web_config() { + conf="$HOMEDIR/$user/conf/web/$1.conf" + if [[ "$2" =~ stpl$ ]]; then + conf="$HOMEDIR/$user/conf/web/s$1.conf" + fi + + cat $WEBTPL/$1/$WEB_BACKEND/$2 | \ + sed -e "s|%ip%|$local_ip|g" \ + -e "s|%domain%|$domain|g" \ + -e "s|%domain_idn%|$domain_idn|g" \ + -e "s|%alias%|${aliases//,/ }|g" \ + -e "s|%alias_idn%|${aliases_idn//,/ }|g" \ + -e "s|%alias_string%|$alias_string|g" \ + -e "s|%email%|info@$domain|g" \ + -e "s|%web_system%|$WEB_SYSTEM|g" \ + -e "s|%web_port%|$WEB_PORT|g" \ + -e "s|%web_ssl_port%|$WEB_SSL_PORT|g" \ + -e "s|%backend_lsnr%|$backend_lsnr|g" \ + -e "s|%rgroups%|$WEB_RGROUPS|g" \ + -e "s|%proxy_system%|$PROXY_SYSTEM|g" \ + -e "s|%proxy_port%|$PROXY_PORT|g" \ + -e "s|%proxy_ssl_port%|$PROXY_SSL_PORT|g" \ + -e "s/%proxy_extentions%/${PROXY_EXT//,/|}/g" \ + -e "s|%user%|$user|g" \ + -e "s|%group%|$user|g" \ + -e "s|%home%|$HOMEDIR|g" \ + -e "s|%docroot%|$docroot|g" \ + -e "s|%sdocroot%|$sdocroot|g" \ + -e "s|%ssl_crt%|$ssl_crt|g" \ + -e "s|%ssl_key%|$ssl_key|g" \ + -e "s|%ssl_pem%|$ssl_pem|g" \ + -e "s|%ssl_ca_str%|$ssl_ca_str|g" \ + -e "s|%ssl_ca%|$ssl_ca|g" \ + >> $conf + + chown root:$user $conf + chmod 640 $conf + + if [ -z "$(grep "$conf" /etc/$1/conf.d/vesta.conf)" ]; then + if [ "$1" != 'nginx' ]; then + echo "Include $conf" >> /etc/$1/conf.d/vesta.conf + else + echo "include $conf;" >> /etc/$1/conf.d/vesta.conf + fi + fi + + trigger="${2/.*pl/.sh}" + if [ -x "$WEBTPL/$1/$WEB_BACKEND/$trigger" ]; then + $WEBTPL/$1/$WEB_BACKEND/$trigger \ + $user $domain $ip $HOMEDIR $HOMEDIR/$user/web/$domain/public_html + fi +} + +# Get config top and bottom line number +get_web_config_lines() { + tpl_lines=$(egrep -ni "name %domain_idn%" $1 |grep -w %domain_idn%) + tpl_lines=$(echo "$tpl_lines" |cut -f 1 -d :) + tpl_last_line=$(wc -l $1 |cut -f 1 -d ' ') + if [ -z "$tpl_lines" ]; then + check_result $E_PARSING "can't parse template $1" + fi + + vhost_lines=$(grep -niF "name $domain_idn" $2) + vhost_lines=$(echo "$vhost_lines" |egrep "$domain_idn$|$domain_idn ") + vhost_lines=$(echo "$vhost_lines" |cut -f 1 -d :) + if [ -z "$vhost_lines" ]; then + check_result $E_PARSING "can't parse config $2" + fi + + top_line=$((vhost_lines + 1 - tpl_lines)) + bottom_line=$((top_line - 1 + tpl_last_line)) + multi=$(sed -n "$top_line,$bottom_line p" $2 |grep ServerAlias |wc -l) + if [ "$multi" -ge 2 ]; then + bottom_line=$((bottom_line + multi -1)) + fi +} + +# Replace web config +replace_web_config() { + conf="$HOMEDIR/$user/conf/web/$1.conf" + if [[ "$2" =~ stpl$ ]]; then + conf="$HOMEDIR/$user/conf/web/s$1.conf" + fi + get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf + sed -i "$top_line,$bottom_line s|$old|$new|g" $conf +} + +# Delete web configuartion +del_web_config() { + conf="$HOMEDIR/$user/conf/web/$1.conf" + if [[ "$2" =~ stpl$ ]]; then + conf="$HOMEDIR/$user/conf/web/s$1.conf" + fi + + get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf + sed -i "$top_line,$bottom_line d" $conf + + web_domains=$(grep DOMAIN $USER_DATA/web.conf |wc -l) + if [ "$web_domains" -eq '0' ]; then + sed -i "/.*\/$user\/.*$1.conf/d" /etc/$1/conf.d/vesta.conf + rm -f $conf + fi +} + +# SSL certificate verification +is_web_domain_cert_valid() { + if [ ! -e "$ssl_dir/$domain.crt" ]; then + echo "Error: $ssl_dir/$domain.crt not found" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi - backend="$domain" - if [ "$WEB_BACKEND_POOL" = 'user' ]; then - backend="$user" + if [ ! -e "$ssl_dir/$domain.key" ]; then + echo "Error: $ssl_dir/$domain.key not found" + log_event "$E_NOTEXIST" "$ARGUMENTS" + exit $E_NOTEXIST + fi + + crt_vrf=$(openssl verify $ssl_dir/$domain.crt 2>&1) + if [ ! -z "$(echo $crt_vrf | grep 'unable to load')" ]; then + echo "Error: SSL Certificate is not valid" + log_event "$E_INVALID" "$ARGUMENTS" + exit $E_INVALID + fi + + if [ ! -z "$(echo $crt_vrf | grep 'unable to get local issuer')" ]; then + if [ ! -e "$ssl_dir/$domain.ca" ]; then + echo "Error: Certificate Authority not found" + log_event "$E_NOTEXIST" "$ARGUMENTS" + exit $E_NOTEXIST + fi + fi + + if [ -e "$ssl_dir/$domain.ca" ]; then + s1=$(openssl x509 -text -in $ssl_dir/$domain.crt 2>/dev/null) + s1=$(echo "$s1" |grep Issuer |awk -F = '{print $6}' |head -n1) + s2=$(openssl x509 -text -in $ssl_dir/$domain.ca 2>/dev/null) + s2=$(echo "$s2" |grep Subject |awk -F = '{print $6}' |head -n1) + if [ "$s1" != "$s2" ]; then + echo "Error: SSL intermediate chain is not valid" + log_event "$E_NOTEXIST" "$ARGUMENTS" + exit $E_NOTEXIST + fi + fi + + key_vrf=$(grep 'PRIVATE KEY' $ssl_dir/$domain.key | wc -l) + if [ "$key_vrf" -ne 2 ]; then + echo "Error: SSL Key is not valid" + log_event "$E_INVALID" "$ARGUMENTS" + exit $E_INVALID + fi + + openssl s_server -quiet -cert $ssl_dir/$domain.crt \ + -key $ssl_dir/$domain.key >> /dev/null 2>&1 & + pid=$! + sleep 0.5 + disown &> /dev/null + kill $pid &> /dev/null + if [ "$?" -ne '0' ]; then + echo "Error: ssl certificate key pair is not valid" + log_event "$E_INVALID" "$ARGUMENTS" + exit $E_INVALID fi } + +#----------------------------------------------------------# +# DNS # +#----------------------------------------------------------# + # DNS template check is_dns_template_valid() { - t="$DNSTPL/$template.tpl" - if [ ! -e $t ]; then - echo "Error: dns template $template not found" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + if [ ! -e "$DNSTPL/$1.tpl" ]; then + check_result $E_NOTEXIST "$1 dns template doesn't exist" fi } -# Checking domain existance -is_domain_new() { - type="$1" - dom=${2-$domain} - object=${3-domain} - - # Check web domain - if [ ! -z "$WEB_SYSTEM" ]; then - web=$(grep -F -H "DOMAIN='$dom'" $VESTA/data/users/*/web.conf) - fi - if [ ! -z "$web" ] && [ "$type" == 'web' ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - if [ ! -z "$web" ]; then - web_user=$(echo "$web" |cut -f 7 -d /) - if [ "$web_user" != "$user" ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - fi - - # Check dns domain - if [ ! -z "$DNS_SYSTEM" ]; then - dns=$(grep -F -H "DOMAIN='$dom'" $VESTA/data/users/*/dns.conf) - fi - if [ ! -z "$dns" ] && [ "$type" == 'dns' ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi +# DNS domain existence check +is_dns_domain_new() { + dns=$(ls $VESTA/data/users/*/dns/$1.conf 2>/dev/null) if [ ! -z "$dns" ]; then + if [ "$2" == 'dns' ]; then + check_result $E_EXISTS "DNS domain $1 exists" + fi dns_user=$(echo "$dns" |cut -f 7 -d /) if [ "$dns_user" != "$user" ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + check_result $E_EXISTS "DNS domain $1 exists" fi fi - - # Check mail domain - if [ ! -z "$MAIL_SYSTEM" ]; then - mail=$(grep -F -H "DOMAIN='$dom'" $VESTA/data/users/*/mail.conf) - fi - if [ ! -z "$mail" ] && [ "$type" == 'mail' ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - if [ ! -z "$mail" ]; then - mail_user=$(echo "$mail" |cut -f 7 -d /) - if [ "$mail_user" != "$user" ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - fi - - # Check web aliases - if [ ! -z "$WEB_SYSTEM" ]; then - web_alias=$(grep -w $dom $VESTA/data/users/*/web.conf) - fi - if [ ! -z "$web_alias" ]; then - c1=$(grep -HF "'$dom'" $VESTA/data/users/*/web.conf | cut -f 7 -d /) - c2=$(grep -HF "'$dom," $VESTA/data/users/*/web.conf | cut -f 7 -d /) - c3=$(grep -HF ",$dom," $VESTA/data/users/*/web.conf | cut -f 7 -d /) - c4=$(grep -HF ",$dom'" $VESTA/data/users/*/web.conf | cut -f 7 -d /) - if [ ! -z "$c1" ] && [ "$type" == "web" ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - if [ ! -z "$c1" ] && [ "$c1" != "$user" ]; then - echo "Error: domain $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - - if [ ! -z "$c2" ] && [ "$type" == "web" ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - if [ ! -z "$c2" ] && [ "$c2" != "$user" ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - - if [ ! -z "$c3" ] && [ "$type" == "web" ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - if [ ! -z "$c3" ] && [ "$c3" != "$user" ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - - if [ ! -z "$c4" ] && [ "$type" == "web" ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - if [ ! -z "$c4" ] && [ "$c4" != "$user" ]; then - echo "Error: $object $dom exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - fi -} - -# Checking mail account existance -is_mail_new() { - check_acc=$(grep "ACCOUNT='$1'" $USER_DATA/mail/$domain.conf) - if [ ! -z "$check_acc" ]; then - echo "Error: mail account $1 exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi - check_als=$(awk -F "ALIAS='" '{print $2}' $USER_DATA/mail/$domain.conf ) - check_als=$(echo "$check_als" | cut -f 1 -d "'" | grep -w $1) - if [ ! -z "$check_als" ]; then - echo "Error: mail alias $1 exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS - fi } # Update domain zone @@ -289,238 +441,6 @@ sort_dns_records() { mv -f $conf.tmp $conf } -# Add web config -add_web_config() { - cat $tpl_file | \ - sed -e "s|%ip%|$ip|g" \ - -e "s|%web_system%|$WEB_SYSTEM|g" \ - -e "s|%web_port%|$WEB_PORT|g" \ - -e "s|%web_ssl_port%|$WEB_SSL_PORT|g" \ - -e "s|%backend_lsnr%|$backend_lsnr|g" \ - -e "s|%rgroups%|$WEB_RGROUPS|g" \ - -e "s|%proxy_system%|$PROXY_SYSTEM|g" \ - -e "s|%proxy_port%|$PROXY_PORT|g" \ - -e "s|%proxy_ssl_port%|$PROXY_SSL_PORT|g" \ - -e "s/%proxy_extentions%/${PROXY_EXT//,/|}/g" \ - -e "s|%domain_idn%|$domain_idn|g" \ - -e "s|%domain%|$domain|g" \ - -e "s|%user%|$user|g" \ - -e "s|%group%|$group|g" \ - -e "s|%home%|$HOMEDIR|g" \ - -e "s|%docroot%|$docroot|g" \ - -e "s|%sdocroot%|$sdocroot|g" \ - -e "s|%email%|$email|g" \ - -e "s|%alias_string%|$alias_string|g" \ - -e "s|%alias_idn%|${aliases_idn//,/ }|g" \ - -e "s|%alias%|${aliases//,/ }|g" \ - -e "s|%ssl_crt%|$ssl_crt|g" \ - -e "s|%ssl_key%|$ssl_key|g" \ - -e "s|%ssl_pem%|$ssl_pem|g" \ - -e "s|%ssl_ca_str%|$ssl_ca_str|g" \ - -e "s|%ssl_ca%|$ssl_ca|g" \ - >> $conf -} - -# Get config top and bottom line numbers -get_web_config_brds() { - - serv_line=$(egrep -ni "Name %domain_idn%($| )" $tpl_file |cut -f 1 -d :) - if [ -z "$serv_line" ]; then - log_event "$E_PARSING" "$EVENT" - return $E_PARSING - fi - - last_line=$(wc -l $tpl_file|cut -f 1 -d ' ') - bfr_line=$((serv_line - 1)) - aftr_line=$((last_line - serv_line - 1)) - - str=$(grep -niF "Name $domain_idn" $conf |egrep "$domain_idn$|$domain_idn ") - str=$(echo "$str" |cut -f 1 -d :) - top_line=$((str - serv_line + 1)) - bottom_line=$((top_line + last_line -1)) - multi=$(sed -n "$top_line,$bottom_line p" $conf |grep ServerAlias |wc -l) - if [ "$multi" -ge 2 ]; then - bottom_line=$((bottom_line + multi -1)) - fi -} - -# Replace web config -replace_web_config() { - get_web_config_brds || exit $? - clean_new=$(echo "$new" | sed \ - -e 's/\\/\\\\/g' \ - -e 's/&/\\&/g' \ - -e 's/\//\\\//g') - clean_old=$(echo "$old" | sed \ - -e 's/\\/\\\\/g' \ - -e 's/&/\\&/g' \ - -e 's/\//\\\//g') - - sed -i "$top_line,$bottom_line s/$clean_old/$clean_new/" $conf -} - -# Get domain variables -get_domain_values() { - for line in $(grep "DOMAIN='$domain'" $USER_DATA/$1.conf); do - eval $line - done -} - -# Get backend values -get_domain_backend_values() { - lsnr=$(grep "listen =" $pool/$backend.conf |cut -f 2 -d = |sed "s/ //") - backend_lsnr="$lsnr" - if [ ! -z "$(echo $lsnr |grep /)" ]; then - backend_lsnr="unix:$backend_lsnr" - fi -} - -# SSL certificate verification -is_web_domain_cert_valid() { - if [ ! -e "$ssl_dir/$domain.crt" ]; then - echo "Error: $ssl_dir/$domain.crt not found" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi - - if [ ! -e "$ssl_dir/$domain.key" ]; then - echo "Error: $ssl_dir/$domain.key not found" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi - - crt_vrf=$(openssl verify $ssl_dir/$domain.crt 2>&1) - if [ ! -z "$(echo $crt_vrf | grep 'unable to load')" ]; then - echo "Error: SSL Certificate is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi - - if [ ! -z "$(echo $crt_vrf | grep 'unable to get local issuer')" ]; then - if [ ! -e "$ssl_dir/$domain.ca" ]; then - echo "Error: Certificate Authority not found" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi - fi - - if [ -e "$ssl_dir/$domain.ca" ]; then - s1=$(openssl x509 -text -in $ssl_dir/$domain.crt 2>/dev/null) - s1=$(echo "$s1" |grep Issuer |awk -F = '{print $6}' |head -n1) - s2=$(openssl x509 -text -in $ssl_dir/$domain.ca 2>/dev/null) - s2=$(echo "$s2" |grep Subject |awk -F = '{print $6}' |head -n1) - if [ "$s1" != "$s2" ]; then - echo "Error: SSL intermediate chain is not valid" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi - fi - - key_vrf=$(grep 'PRIVATE KEY' $ssl_dir/$domain.key | wc -l) - if [ "$key_vrf" -ne 2 ]; then - echo "Error: SSL Key is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi - - openssl s_server -quiet -cert $ssl_dir/$domain.crt \ - -key $ssl_dir/$domain.key >> /dev/null 2>&1 & - pid=$! - sleep 0.5 - disown &> /dev/null - kill $pid &> /dev/null - if [ "$?" -ne '0' ]; then - echo "Error: ssl certificate key pair is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Delete web configuartion -del_web_config() { - get_web_config_brds || exit $? - sed -i "$top_line,$bottom_line d" $conf -} - -# Update web domain values -upd_web_domain_values() { - group="$user" - email="info@$domain" - docroot="$HOMEDIR/$user/web/$domain/public_html" - sdocroot=$docroot - if [ "$SSL_HOME" = 'single' ]; then - sdocroot="$HOMEDIR/$user/web/$domain/public_shtml" ; - fi - if [ ! -z "$WEB_BACKEND" ]; then - is_web_backend_pool_valid - get_domain_backend_values - fi - i=1 - j=1 - OLD_IFS="$IFS" - IFS=',' - server_alias='' - alias_string='' - aliases_idn='' - - for dalias in $ALIAS; do - dalias=$(idn -t --quiet -a $dalias) - check_8k="$server_alias $dalias" - if [ "${#check_8k}" -ge '8100' ]; then - if [ "$j" -eq 1 ]; then - alias_string="ServerAlias $server_alias" - else - alias_string="$alias_string\n ServerAlias $server_alias" - fi - j=2 - server_alias='' - fi - if [ "$i" -eq 1 ]; then - aliases_idn="$dalias" - server_alias="$dalias" - alias_string="ServerAlias $server_alias" - else - aliases_idn="$aliases_idn,$dalias" - server_alias="$server_alias $dalias" - fi - i=2 - done - - if [ $j -gt 1 ]; then - alias_string="$alias_string\n ServerAlias $server_alias" - else - alias_string="ServerAlias $server_alias" - fi - - IFS=$OLD_IFS - if [ "$ELOG" = 'no' ]; then - elog='#' - else - elog='' - fi - - if [ "$CGI" != 'yes' ]; then - cgi='#' - cgi_option='-ExecCGI' - else - cgi='' - cgi_option='+ExecCGI' - fi - - ssl_crt="$HOMEDIR/$user/conf/web/ssl.$domain.crt" - ssl_key="$HOMEDIR/$user/conf/web/ssl.$domain.key" - ssl_pem="$HOMEDIR/$user/conf/web/ssl.$domain.pem" - ssl_ca="$HOMEDIR/$user/conf/web/ssl.$domain.ca" - if [ ! -e "$USER_DATA/ssl/$domain.ca" ]; then - ssl_ca_str='#' - fi - - if [ "$SUSPENDED" = 'yes' ]; then - docroot="$VESTA/data/templates/web/suspend" - sdocroot="$VESTA/data/templates/web/suspend" - fi -} - # Check if this is a last record is_dns_record_critical() { str=$(grep "ID='$id'" $USER_DATA/dns/$domain.conf) @@ -529,7 +449,7 @@ is_dns_record_critical() { records=$(grep "TYPE='$TYPE'" $USER_DATA/dns/$domain.conf| wc -l) if [ $records -le 1 ]; then echo "Error: at least one $TYPE record should remain active" - log_event "$E_INVALID" "$EVENT" + log_event "$E_INVALID" "$ARGUMENTS" exit $E_INVALID fi fi @@ -551,7 +471,7 @@ is_dns_fqnd() { r=$(echo $r|sed -e "s/\.$//") msg="$t record $r should be a fully qualified domain name (FQDN)" echo "Error: $msg" - log_event "$E_INVALID" "$EVENT" + log_event "$E_INVALID" "$ARGUMENTS" exit $E_INVALID fi fi @@ -569,10 +489,68 @@ is_dns_nameserver_valid() { a_record=$(echo $r |cut -f 1 -d '.') n_record=$(grep "RECORD='$a_record'" $zone| grep "TYPE='A'") if [ -z "$n_record" ]; then - echo "Error: corresponding A record $a_record.$d does not exist" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + check_result $E_NOTEXIST "IN A $a_record.$d does not exist" fi fi fi } + + + +#----------------------------------------------------------# +# MAIL # +#----------------------------------------------------------# + +# Mail domain existence check +is_mail_domain_new() { + mail=$(ls $VESTA/data/users/*/mail/$1.conf 2>/dev/null) + if [ ! -z "$mail" ]; then + if [ "$2" == 'mail' ]; then + check_result $E_EXISTS "Mail domain $1 exists" + fi + mail_user=$(echo "$mail" |cut -f 7 -d /) + if [ "$mail_user" != "$user" ]; then + check_result $E_EXISTS "Mail domain $1 exists" + fi + fi +} + +# Checking mail account existance +is_mail_new() { + check_acc=$(grep "ACCOUNT='$1'" $USER_DATA/mail/$domain.conf) + if [ ! -z "$check_acc" ]; then + check_result $E_EXIST "mail account $1 is already exists" + fi + check_als=$(awk -F "ALIAS='" '{print $2}' $USER_DATA/mail/$domain.conf ) + check_als=$(echo "$check_als" | cut -f 1 -d "'" | grep -w $1) + if [ ! -z "$check_als" ]; then + check_result $E_EXIST "mail alias $1 is already exists" + fi +} + + +#----------------------------------------------------------# +# CMN # +#----------------------------------------------------------# + +# Checking domain existance +is_domain_new() { + type=$1 + for object in ${2//,/ }; do + if [ ! -z "$WEB_SYSTEM" ]; then + is_web_domain_new $object $type + is_web_alias_new $object $type + fi + if [ ! -z "$DNS_SYSTEM" ]; then + is_dns_domain_new $object $type + fi + if [ ! -z "$MAIL_SYSTEM" ]; then + is_mail_domain_new $object $type + fi + done +} + +# Get domain variables +get_domain_values() { + eval $(grep "DOMAIN='$domain'" $USER_DATA/$1.conf) +} diff --git a/func/ip.sh b/func/ip.sh index 9fb0a28a..97890682 100644 --- a/func/ip.sh +++ b/func/ip.sh @@ -1,61 +1,22 @@ -# Validationg ip address -is_ip_valid() { - userip=${1-$ip} - check_nat=$(grep -H "^NAT='$userip'" $VESTA/data/ips/* 2>/dev/null) - if [ ! -e "$VESTA/data/ips/$userip" ] && [ -z "$check_nat" ] ; then - echo "Error: IP $userip not exist" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi -} - -# Check if ip availabile for user -is_ip_avalable() { - userip=${1-$ip} - if [ -e "$VESTA/data/ips/$userip" ]; then - ip_data=$(cat $VESTA/data/ips/$userip) - else - nated_ip=$(grep -H "^NAT='$userip'" $VESTA/data/ips/* 2>/dev/null) - nated_ip=$(echo "$nated_ip" | cut -f 1 -d : | cut -f 7 -d /) - ip_data=$(cat $VESTA/data/ips/$nated_ip) - fi - owner=$(echo "$ip_data"|grep OWNER= | cut -f 2 -d \') - status=$(echo "$ip_data"|grep STATUS= | cut -f 2 -d \') - shared=no - if [ 'admin' = "$owner" ] && [ "$status" = 'shared' ]; then - shared='yes' - fi - if [ "$owner" != "$user" ] && [ "$shared" != 'yes' ]; then - echo "Error: User $user don't have permission to use $userip" - log_event "$E_FORBIDEN" "$EVENT" - exit $E_FORBIDEN - fi -} - # Check ip ownership is_ip_owner() { - # Parsing ip - owner=$(grep 'OWNER=' $VESTA/data/ips/$IP|cut -f 2 -d \') + owner=$(grep 'OWNER=' $VESTA/data/ips/$ip |cut -f 2 -d \') if [ "$owner" != "$user" ]; then - echo "Error: IP $IP not owned" - log_event "$E_FORBIDEN" "$EVENT" - exit $E_FORBIDEN + check_result $E_FORBIDEN "$ip is not owned by $user" fi } # Check if ip address is free is_ip_free() { if [ -e "$VESTA/data/ips/$ip" ]; then - echo "Error: IP exist" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + check_result $E_EXISTS "$ip is already exists" fi } # Get full interface name get_ip_iface() { - i=$(/sbin/ip addr | grep -w $interface |\ - awk '{print $NF}' | tail -n 1 | cut -f 2 -d :) + i=$(/sbin/ip addr |grep -w $interface |\ + awk '{print $NF}' |tail -n 1 |cut -f 2 -d :) if [ "$i" = "$interface" ]; then n=0 else @@ -72,9 +33,8 @@ is_ip_key_empty() { eval $string eval value="$key" if [ ! -z "$value" ] && [ "$value" != '0' ]; then - echo "Error: $key is not empty = $value" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + key="$(echo $key|sed -e "s/\$U_//")" + check_result $E_EXISTS "IP is in use / $key = $value" fi } @@ -94,8 +54,11 @@ update_ip_value() { } # Get ip name -get_ip_name() { - grep "NAME=" $VESTA/data/ips/$ip | cut -f 2 -d \' +get_ip_alias() { + ip_name=$(grep "NAME=" $VESTA/data/ips/$local_ip |cut -f 2 -d \') + if [ ! -z "$ip_name" ]; then + echo "${1//./-}.$ip_name" + fi } # Increase ip value @@ -108,7 +71,7 @@ increase_ip_value() { current_usr=$(grep "$usr_key=" $VESTA/data/ips/$sip |cut -f 2 -d \') if [ -z "$current_web" ]; then echo "Error: Parsing error" - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi new_web=$((current_web + 1)) @@ -140,9 +103,7 @@ decrease_ip_value() { current_usr=$(grep "$usr_key=" $VESTA/data/ips/$sip |cut -f 2 -d \') if [ -z "$current_web" ]; then - echo "Error: Parsing error" - log_event "$E_PARSING" "$EVENT" - exit $E_PARSING + check_result $E_PARSING "Parsing errpr" fi new_web=$((current_web - 1)) @@ -166,46 +127,25 @@ decrease_ip_value() { # Get ip address value get_ip_value() { key="$1" - string=$( cat $VESTA/data/ips/$ip ) + string=$(cat $VESTA/data/ips/$ip) eval $string eval value="$key" echo "$value" } + # Get real ip address get_real_ip() { if [ -e "$VESTA/data/ips/$1" ]; then echo $1 else - nated_ip=$(grep -H "^NAT='$1'" $VESTA/data/ips/*) - if [ ! -z "$nated_ip" ]; then - echo "$nated_ip" | cut -f 1 -d : | cut -f 7 -d / - else - get_user_ip + nat=$(grep -H "^NAT='$1'" $VESTA/data/ips/*) + if [ ! -z "$nat" ]; then + echo "$nat" |cut -f 1 -d : |cut -f 7 -d / fi fi } -# Get user ip -get_user_ip(){ - ip=$(grep -H "OWNER='$1'" $VESTA/data/ips/* 2>/dev/null | head -n1) - ip=$(echo "$ip" | cut -f 7 -d / | cut -f 1 -d :) - - if [ -z "$ip" ]; then - admin_ips=$(grep -H "OWNER='admin'" $VESTA/data/ips/* 2>/dev/null) - admin_ips=$(echo "$admin_ips" | cut -f 7 -d / | cut -f 1 -d :) - for admin_ip in $admin_ips; do - if [ -z "$ip" ]; then - shared=$(grep "STATUS='shared'" $VESTA/data/ips/$admin_ip) - if [ ! -z "$shared" ]; then - ip=$admin_ip - fi - fi - done - fi - echo "$ip" -} - # Convert CIDR to netmask convert_cidr() { set -- $(( 5 - ($1 / 8) )) 255 255 255 255 \ @@ -252,3 +192,58 @@ get_broadcast() { (255 ^ ${N[2]}))).$((${I[3]} |\ (255 ^ ${N[3]})))" } + +# Get user ips +get_user_ips() { + dedicated=$(grep -H "OWNER='$user'" $VESTA/data/ips/*) + dedicated=$(echo "$dedicated" |cut -f 1 -d : |sed 's=.*/==') + shared=$(grep -H -A1 "OWNER='admin'" $VESTA/data/ips/* |grep shared) + shared=$(echo "$shared" |cut -f 1 -d : |sed 's=.*/==' |cut -f 1 -d \-) + for dedicated_ip in $dedicated; do + shared=$(echo "$shared" |grep -v $dedicated_ip) + done + echo -e "$dedicated\n$shared" |sed "/^$/d" +} + +# Get user ip +get_user_ip() { + ip=$(get_user_ips |head -n1) + if [ -z "$ip" ]; then + check_result $E_NOTEXIST "no IP is available" + fi + local_ip=$ip + nat=$(grep "^NAT" $VESTA/data/ips/$ip |cut -f 2 -d \') + if [ ! -z "$nat" ]; then + ip=$nat + fi +} + +# Validate ip address +is_ip_valid() { + local_ip="$1" + if [ ! -e "$VESTA/data/ips/$1" ]; then + nat=$(grep -H "^NAT='$1'" $VESTA/data/ips/*) + if [ -z "$nat" ]; then + check_result $E_NOTEXIST "IP $1 doesn't exist" + else + nat=$(echo "$nat" |cut -f1 -d: |cut -f7 -d/) + local_ip=$nat + fi + fi + if [ ! -z $2 ]; then + if [ -z "$nat" ]; then + ip_data=$(cat $VESTA/data/ips/$1) + else + ip_data=$(cat $VESTA/data/ips/$nat) + fi + ip_owner=$(echo "$ip_data" |grep OWNER= |cut -f2 -d \') + ip_status=$(echo "$ip_data" |grep STATUS= |cut -f2 -d \') + if [ "$ip_owner" != "$user" ] && [ "$ip_status" = 'dedicated' ]; then + check_result $E_FORBIDEN "$user user can't use IP $1" + fi + get_user_owner + if [ "$ip_owner" != "$user" ] && [ "$ip_owner" != "$owner" ]; then + check_result $E_FORBIDEN "$user user can't use IP $1" + fi + fi +} diff --git a/func/main.sh b/func/main.sh index 94f64e29..b1503d6c 100644 --- a/func/main.sh +++ b/func/main.sh @@ -1,22 +1,16 @@ # Internal variables -DATE=$(date +%F) -TIME=$(date +%T) -SCRIPT=$(basename $0) HOMEDIR='/home' BACKUP='/backup' BACKUP_GZIP=5 BACKUP_DISK_LIMIT=95 BACKUP_LA_LIMIT=5 RRD_STEP=300 -RRD_IFACE_EXCLUDE=lo -PW_MATRIX='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' -PW_LENGHT='10' BIN=$VESTA/bin USER_DATA=$VESTA/data/users/$user WEBTPL=$VESTA/data/templates/web DNSTPL=$VESTA/data/templates/dns RRD=$VESTA/web/rrd -send_mail="$VESTA/web/inc/mail-wrapper.php" +SENDMAIL="$VESTA/web/inc/mail-wrapper.php" # Return codes OK=0 @@ -42,21 +36,25 @@ E_UPDATE=19 E_RESTART=20 # Event string for logger -EVENT="$DATE $TIME $SCRIPT" for ((I=1; I <= $# ; I++)); do if [[ "$HIDE" != $I ]]; then - EVENT="$EVENT '$(eval echo \$${I})'" + ARGUMENTS="$ARGUMENTS '$(eval echo \$${I})'" else - EVENT="$EVENT '******'" + ARGUMENTS="$ARGUMENTS '******'" fi done # Log event function log_event() { - if [ "$1" -eq 0 ]; then - echo "$2" >> $VESTA/log/system.log + if [ -z "$time" ]; then + LOG_TIME="$(date +'%F %T') $(basename $0)" else - echo "$2 [Error $1]" >> $VESTA/log/error.log + LOG_TIME="$date $time $(basename $0)" + fi + if [ "$1" -eq 0 ]; then + echo "$LOG_TIME $2" >> $VESTA/log/system.log + else + echo "$LOG_TIME $2 [Error $1]" >> $VESTA/log/error.log fi } @@ -66,17 +64,20 @@ log_history() { undo=${2-no} log_user=${3-$user} log=$VESTA/data/users/$log_user/history.log - touch $log if [ '99' -lt "$(wc -l $log |cut -f 1 -d ' ')" ]; then tail -n 49 $log > $log.moved mv -f $log.moved $log chmod 660 $log fi - + if [ -z "$date" ]; then + time_n_date=$(date +'%T %F') + time=$(echo "$time_n_date" |cut -f 1 -d \ ) + date=$(echo "$time_n_date" |cut -f 2 -d \ ) + fi curr_str=$(grep "ID=" $log | cut -f 2 -d \' | sort -n | tail -n1) id="$((curr_str +1))" - echo "ID='$id' DATE='$DATE' TIME='$TIME' CMD='$cmd' UNDO='$undo'" >> $log + echo "ID='$id' DATE='$date' TIME='$time' CMD='$cmd' UNDO='$undo'" >> $log } # Result checker @@ -84,10 +85,10 @@ check_result() { if [ $1 -ne 0 ]; then echo "Error: $2" if [ ! -z "$3" ]; then - log_event $3 $EVENT + log_event "$3" "$ARGUMENTS" exit $3 else - log_event $1 $EVENT + log_event "$1" "$ARGUMENTS" exit $1 fi fi @@ -96,85 +97,81 @@ check_result() { # Argument list checker check_args() { if [ "$1" -gt "$2" ]; then - echo "Error: not enought arguments" echo "Usage: $SCRIPT $3" - log_event "$E_ARGS" "$EVENT" - exit $E_ARGS + check_result $E_ARGS "not enought arguments" >/dev/null fi } # Subsystem checker is_system_enabled() { if [ -z "$1" ] || [ "$1" = no ]; then - echo "Error: $2 is not enabled in the $VESTA/conf/vesta.conf" - log_event "$E_DISABLED" "$EVENT" - exit $E_DISABLED + check_result $E_DISABLED "$2 is not enabled" fi } # User package check is_package_full() { case "$1" in - WEB_DOMAINS) used=$(wc -l $USER_DATA/web.conf|cut -f1 -d \ );; - WEB_ALIASES) used=$(grep "DOMAIN='$domain'" $USER_DATA/web.conf |\ - awk -F "ALIAS='" '{print $2}' | cut -f 1 -d \' | tr ',' '\n' |\ - wc -l );; - DNS_DOMAINS) used=$(wc -l $USER_DATA/dns.conf |cut -f1 -d \ );; - DNS_RECORDS) used=$(wc -l $USER_DATA/dns/$domain.conf |cut -f1 -d \ );; - MAIL_DOMAINS) used=$(wc -l $USER_DATA/mail.conf |cut -f1 -d \ );; - MAIL_ACCOUNTS) used=$(wc -l $USER_DATA/mail/$domain.conf |\ - cut -f1 -d \ );; - DATABASES) used=$(wc -l $USER_DATA/db.conf |cut -f1 -d \ );; - CRON_JOBS) used=$(wc -l $USER_DATA/cron.conf |cut -f1 -d \ );; + WEB_DOMAINS) used=$(wc -l $USER_DATA/web.conf);; + WEB_ALIASES) used=$(echo $aliases |tr ',' '\n' |wc -l);; + DNS_DOMAINS) used=$(wc -l $USER_DATA/dns.conf);; + DNS_RECORDS) used=$(wc -l $USER_DATA/dns/$domain.conf);; + MAIL_DOMAINS) used=$(wc -l $USER_DATA/mail.conf);; + MAIL_ACCOUNTS) used=$(wc -l $USER_DATA/mail/$domain.conf);; + DATABASES) used=$(wc -l $USER_DATA/db.conf);; + CRON_JOBS) used=$(wc -l $USER_DATA/cron.conf);; esac - limit=$(grep "^$1=" $USER_DATA/user.conf | cut -f 2 -d \' ) - if [ "$limit" != 'unlimited' ] && [ "$used" -ge "$limit" ]; then - echo "Error: Limit is reached, please upgrade hosting package" - log_event "$E_LIMIT" "$EVENT" - exit $E_LIMIT + used=$(echo "$used"| cut -f 1 -d \ ) + limit=$(grep "^$1=" $USER_DATA/user.conf |cut -f 2 -d \') + if [ "$limit" != 'unlimited' ] && [[ "$used" -ge "$limit" ]]; then + check_result $E_LIMIT "$1 limit is reached :: upgrade user package" + fi +} + +# User owner for reseller plugin +get_user_owner() { + if [ -z "$RESELLER_KEY" ]; then + owner='admin' + else + owner=$(grep "^OWNER" $USER_DATA/user.conf| cut -f 2 -d \') + if [ -z "$owner" ]; then + owner='admin' + fi fi } # Random password generator -gen_password() { - pw_matrix=${1-$PW_MATRIX} - pw_lenght=${2-$PW_LENGHT} - while [ ${n:=1} -le $pw_lenght ]; do - pass="$pass${pw_matrix:$(($RANDOM%${#pw_matrix})):1}" - let n+=1 +generate_password() { + matrix=$1 + lenght=$2 + if [ -z "$matrix" ]; then + matrix=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + fi + if [ -z "$lenght" ]; then + lenght=10 + fi + i=1 + while [ $i -le $lenght ]; do + pass="$pass${matrix:$(($RANDOM%${#matrix})):1}" + ((i++)) done echo "$pass" } -# Package existance check +# Package existence check is_package_valid() { if [ -z "$1" ]; then pkg_dir="$VESTA/data/packages" fi if [ ! -e "$pkg_dir/$package.pkg" ]; then - echo "Error: package $package doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + check_result $E_NOTEXIST "package $package doesn't exist" fi } # Validate system type is_type_valid() { if [ -z "$(echo $1 | grep -w $2)" ]; then - echo "Error: $2 is unknown type" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Check if backup is available for user -is_backup_available() { - b_owner=$(echo $user |\ - sed -e "s/\.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar//") - if [ "$user" != "$b_owner" ]; then - echo "Error: User $user don't have permission to use $backup" - log_event "$E_FORBIDEN" "$EVENT" - exit $E_FORBIDEN + check_result $E_INVALID "$2 type is invalid" fi } @@ -182,9 +179,7 @@ is_backup_available() { is_backup_enabled() { BACKUPS=$(grep "^BACKUPS=" $USER_DATA/user.conf | cut -f2 -d \') if [ -z "$BACKUPS" ] || [[ "$BACKUPS" -le '0' ]]; then - echo "Error: user backup disabled" - log_event "$E_DISABLED" "$EVENT" - exit $E_DISABLED + check_result $E_DISABLED "user backup is disabled" fi } @@ -193,9 +188,7 @@ is_backup_scheduled() { if [ -e "$VESTA/data/queue/backup.pipe" ]; then check_q=$(grep " $user " $VESTA/data/queue/backup.pipe | grep $1) if [ ! -z "$check_q" ]; then - echo "Error: $1 is already scheduled" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + check_result $E_EXISTS "$1 is already scheduled" fi fi } @@ -210,30 +203,24 @@ is_object_new() { object=$(grep "$2='$3'" $USER_DATA/$1.conf) fi if [ ! -z "$object" ]; then - echo "Error: $2 with value $3 exists" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + check_result $E_EXISTS "$2=$3 is already exists" fi } -# Check if object exists and can be used +# Check if object is valid is_object_valid() { if [ $2 = 'USER' ]; then - if [ -d "$VESTA/data/users/$user" ]; then - sobject="OK" + if [ ! -d "$VESTA/data/users/$3" ]; then + check_result $E_NOTEXIST "$1 $3 doesn't exist" fi else - if [ $2 = 'DBHOST' ]; then - sobject=$(grep "HOST='$host'" $VESTA/conf/$type.conf) - else - sobject=$(grep "$2='$3'" $VESTA/data/users/$user/$1.conf) + object=$(grep "$2='$3'" $VESTA/data/users/$user/$1.conf) + if [ -z "$object" ]; then + arg1=$(basename $1) + arg2=$(echo $2 |tr '[:upper:]' '[:lower:]') + check_result $E_NOTEXIST "$arg1 $arg2 $3 doesn't exist" fi fi - if [ -z "$sobject" ]; then - echo "Error: $2 $3 doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST - fi } # Check if object is supended @@ -244,23 +231,19 @@ is_object_suspended() { spnd=$(grep "$2='$3'" $USER_DATA/$1.conf|grep "SUSPENDED='yes'") fi if [ -z "$spnd" ]; then - echo "Error: $(basename $1) $3 is not suspended" - log_event "$E_SUSPENDED" "$EVENT" - exit $E_SUSPENDED + check_result $E_UNSUSPENDED "$(basename $1) $3 is not suspended" fi } # Check if object is unsupended is_object_unsuspended() { if [ $2 = 'USER' ]; then - spnd=$(cat $USER_DATA/$1.conf|grep "SUSPENDED='yes'") + spnd=$(cat $USER_DATA/$1.conf |grep "SUSPENDED='yes'") else - spnd=$(grep "$2='$3'" $USER_DATA/$1.conf|grep "SUSPENDED='yes'") + spnd=$(grep "$2='$3'" $USER_DATA/$1.conf |grep "SUSPENDED='yes'") fi if [ ! -z "$spnd" ]; then - echo "Error: $(basename $1) $3 is suspended" - log_event "$E_UNSUSPENDED" "$EVENT" - exit $E_UNSUSPENDED + check_result $E_SUSPENDED "$(basename $1) $3 is suspended" fi } @@ -270,9 +253,7 @@ is_object_value_empty() { eval $str eval value=$4 if [ ! -z "$value" ] && [ "$value" != 'no' ]; then - echo "Error: ${4//$}=$value (not empty)" - log_event "$E_EXISTS" "$EVENT" - exit $E_EXISTS + check_result $E_EXISTS "${4//$}=$value is already exists" fi } @@ -282,9 +263,7 @@ is_object_value_exist() { eval $str eval value=$4 if [ -z "$value" ] || [ "$value" = 'no' ]; then - echo "Error: ${4//$}=$value (doesn't exist)" - log_event "$E_NOTEXIST" "$EVENT" - exit $E_NOTEXIST + check_result $E_NOTEXIST "${4//$}=$value doesn't exist" fi } @@ -387,62 +366,6 @@ decrease_user_value() { sed -i "s/$key='$old'/$key='$new'/g" $conf } -# Json listing function -json_list() { - echo '{' - fileds_count=$(echo $fields| wc -w ) - #for line in $(cat $conf); do - while read line; do - eval $line - if [ -n "$data_output" ]; then - echo -e ' },' - fi - i=1 - for field in $fields; do - eval value=$field - if [ $i -eq 1 ]; then - (( ++i)) - echo -e "\t\"$value\": {" - else - if [ $i -lt $fileds_count ]; then - (( ++i)) - echo -e "\t\t\"${field//$/}\": \"$value\"," - else - echo -e "\t\t\"${field//$/}\": \"$value\"" - data_output=yes - fi - fi - done - done < $conf - - if [ "$data_output" = 'yes' ]; then - echo -e ' }' - fi - echo -e '}' -} - -# Shell listing function -shell_list() { - if [ -z "$nohead" ] ; then - echo "${fields//$/}" - for a in $fields; do - echo -e "------ \c" - done - echo - fi - while read line ; do - eval $line - for field in $fields; do - eval value=$field - if [ -z "$value" ]; then - value='NULL' - fi - echo -n "$value " - done - echo - done < $conf -} - # Recalculate U_DISK value recalc_user_disk_usage() { u_usage=0 @@ -517,221 +440,235 @@ sort_cron_jobs() { # Sync cronjobs with system cron sync_cron_jobs() { source $USER_DATA/user.conf - if [ -e "/var/spool/cron/crontabs" ]; then - sys_cron="/var/spool/cron/crontabs/$user" + crontab="/var/spool/cron/crontabs/$user" else - sys_cron="/var/spool/cron/$user" + crontab="/var/spool/cron/$user" fi - rm -f $sys_cron + rm -f $crontab if [ "$CRON_REPORTS" = 'yes' ]; then - echo "MAILTO=$CONTACT" > $sys_cron + echo "MAILTO=$CONTACT" > $crontab fi while read line; do eval $line if [ "$SUSPENDED" = 'no' ]; then echo "$MIN $HOUR $DAY $MONTH $WDAY $CMD" |\ sed -e "s/%quote%/'/g" -e "s/%dots%/:/g" \ - >> $sys_cron + >> $crontab fi done < $USER_DATA/cron.conf - - # Set proper permissions - chown $user:$user $sys_cron - chmod 600 $sys_cron + chown $user:$user $crontab + chmod 600 $crontab } - -### Format Validators ### -# Shell -validate_format_shell() { - if [ -z "$(grep -w $1 /etc/shells)" ]; then - echo "Error: shell $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Password -validate_format_password() { - if [ "${#1}" -lt '6' ]; then - echo "Error: password is too short" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Integer -validate_format_int() { - if ! [[ "$1" =~ ^[0-9]+$ ]] ; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Boolean -validate_format_boolean() { - if [ "$1" != 'yes' ] && [ "$1" != 'no' ]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Network interface -validate_format_interface() { - netdevices=$(cat /proc/net/dev | grep : | cut -f 1 -d : | tr -d ' ') - if [ -z $(echo "$netdevices"| grep -x $1) ]; then - echo "Error: intreface $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# IP address -validate_format_ip() { - t_ip=$(echo $1 |awk -F / '{print $1}') - t_cidr=$(echo $1 |awk -F / '{print $2}') - valid_octets=0 - valid_cidr=1 - for octet in ${t_ip//./ }; do - if [[ $octet =~ ^[0-9]{1,3}$ ]] && [[ $octet -le 255 ]]; then - ((++valid_octets)) - fi - done - - if [ ! -z "$(echo $1|grep '/')" ]; then - if [[ "$t_cidr" -lt 0 ]] || [[ "$t_cidr" -gt 32 ]]; then - valid_cidr=0 - fi - if ! [[ "$t_cidr" =~ ^[0-9]+$ ]]; then - valid_cidr=0 - fi - fi - if [ "$valid_octets" -lt 4 ] || [ "$valid_cidr" -eq 0 ]; then - echo "Error: ip $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# IP address status -validate_format_ip_status() { - if [ -z "$(echo shared,dedicated | grep -w $1 )" ]; then - echo "Error: ip_status $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Email address -validate_format_email() { - if [[ ! "$1" =~ "@" ]] ; then - echo "Error: email $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Name -validate_format_name() { - if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Name with space -validate_format_name_s() { - if ! [[ "$1" =~ ^[[:alnum:]][-|\ |\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Username -validate_format_username() { - if [ "${#1}" -eq 1 ]; then - if ! [[ "$1" =~ [a-z] ]]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit 1 +# User format validator +is_user_format_valid() { + if [ ${#1} -eq 1 ]; then + if ! [[ "$1" =~ ^^[[:alnum:]]$ ]]; then + echo "invalid $2 format :: $1" fi else - if ! [[ "$1" =~ ^[a-zA-Z0-9][-|\.|_|a-zA-Z0-9]{0,28}[a-zA-Z0-9]$ ]] - then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit 1 + if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]] + then + echo "invalid $2 format :: $1" fi fi } -# Domain -validate_format_domain() { +# Domain format validator +is_domain_format_valid() { + object_name=${2-domain} exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]" - if [[ "$1" =~ $exclude ]] || [[ "$1" =~ "^[0-9]+$" ]]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID + if [[ $1 =~ $exclude ]] || [[ $1 =~ ^[0-9]+$ ]] || [[ $1 =~ "\.\." ]]; then + check_result $E_INVALID "invalid $object_name format :: $1" fi } -# Domain alias -validate_format_domain_alias() { - exclude="[!|@|#|$|^|&|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]" - if [[ "$1" =~ $exclude ]] || [[ "$1" =~ "^[0-9]+$" ]]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID +# Alias forman validator +is_alias_format_valid() { + for object in ${1//,/ }; do + exclude="[!|@|#|$|^|&|(|)|+|=|{|}|:|<|>|?|_|/|\|\"|'|;|%|\`| ]" + if [[ "$object" =~ $exclude ]]; then + check_result $E_INVALID "invalid alias format :: $object" + fi + if [[ "$object" =~ [*] ]] && ! [[ "$object" =~ ^[*]\..* ]]; then + check_result $E_INVALID "invalid alias format :: $object" + fi + done +} + +# IP format validator +is_ip_format_valid() { + object_name=${2-ip} + ip_regex='([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])' + ip_clean=$(echo "${1%/[0-9][0-9]}") + ip_clean=$(echo "${1%/[0-9]}") + if ! [[ $ip_clean =~ ^$ip_regex\.$ip_regex\.$ip_regex\.$ip_regex$ ]]; then + check_result $E_INVALID "invalid $object_name format :: $1" + fi + if [ $1 != "$ip_clean" ]; then + ip_cidr="$ip_clean/" + ip_cidr=$(echo "${1#$ip_cidr}") + if [[ "$ip_cidr" -gt 32 ]]; then + check_result $E_INVALID "invalid $object_name format :: $1" + fi fi } -# Database -validate_format_database() { +# Proxy extention format validator +is_extention_format_valid() { + exclude="[!|#|$|^|&|(|)|+|=|{|}|:|@|<|>|?|/|\|\"|'|;|%|\`| ]" + if [[ "$1" =~ $exclude ]]; then + check_result $E_INVALID "invalid proxy extention format :: $1" + fi +} + +# Number format validator +is_number_format_valid() { + object_name=${2-number} + if ! [[ "$1" =~ ^[0-9]+$ ]] ; then + check_result $E_INVALID "invalid $object_name format :: $1" + fi +} + +# Autoreply format validator +is_autoreply_format_valid() { + if [[ "$1" =~ [$|\`] ]] || [ 10240 -le ${#1} ]; then + check_result $E_INVALID "invalid autoreply format :: $1" + fi +} + +# Boolean format validator +is_boolean_format_valid() { + if [ "$1" != 'yes' ] && [ "$1" != 'no' ]; then + check_result $E_INVALID "invalid $2 format :: $1" + fi +} + +# Common format validator +is_common_format_valid() { + exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]" + if [[ "$1" =~ $exclude ]]; then + check_result $E_INVALID "invalid $2 format :: $1" + fi + if [ 400 -le ${#1} ]; then + check_result $E_INVALID "invalid $2 format :: $1" + fi + if [[ "$1" =~ @ ]] && [ ${#1} -gt 1 ] ; then + check_result $E_INVALID "invalid $2 format :: $1" + fi + if [[ $1 =~ \* ]]; then + if [ "$(echo $1 | grep -o '*'|wc -l)" -gt 1 ]; then + check_result $E_INVALID "invalid $2 format :: $1" + fi + fi +} + +# Database format validator +is_database_format_valid() { exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|/|\|\"|'|;|%|\`| ]" if [[ "$1" =~ $exclude ]] || [ 65 -le ${#1} ]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID + check_result $E_INVALID "invalid $2 format :: $1" fi } -# Database user -validate_format_dbuser() { +# Date format validator +is_date_format_valid() { + if ! [[ "$1" =~ ^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$ ]]; then + check_result $E_INVALID "invalid date format :: $1" + fi +} + +# Database user validator +is_dbuser_format_valid() { exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|/|\|\"|'|;|%|\`| ]" if [[ "$1" =~ $exclude ]] || [ 17 -le ${#1} ]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID + check_result $E_INVALID "invalid $2 format :: $1" fi } -# DNS type -validate_format_dns_type() { +# DNS record type validator +is_dns_type_format_valid() { known_dnstype='A,AAAA,NS,CNAME,MX,TXT,SRV,DNSKEY,KEY,IPSECKEY,PTR,SPF' - if [ -z "$(echo $known_dnstype | grep -w $1)" ]; then - echo "Error: dnstype $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID + if [ -z "$(echo $known_dnstype |grep -w $1)" ]; then + check_result $E_INVALID "invalid dns record type format :: $1" fi } -# DKIM key size -validate_format_key_size() { - known_size='128,256,512,768,1024,2048' - if [ -z "$(echo $known_size | grep -w $1)" ]; then - echo "Error: key_size $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID +# DNS record validator +is_dns_record_format_valid() { + if [ "$rtype" = 'A' ]; then + is_ip_format_valid "$1" + fi + if [ "$rtype" = 'NS' ]; then + is_domain_format_valid "$1" 'ns_record' + fi + if [ "$rtype" = 'MX' ]; then + is_domain_format_valid "$1" 'mx_record' + is_int_format_valid "$priority" 'priority_record' + fi + +} + +# Email format validator +is_email_format_valid() { + if [[ ! "$1" =~ "@" ]] ; then + check_result $E_INVALID "invalid email format :: $1" fi } -# Minute / Hour / Day / Month / Day of Week -validate_format_mhdmw() { +# Firewall action validator +is_fw_action_format_valid() { + if [ "$1" != "ACCEPT" ] && [ "$1" != 'DROP' ] ; then + check_result $E_INVALID "invalid action format :: $1" + fi +} + +# Firewall protocol validator +is_fw_protocol_format_valid() { + if [ "$1" != "ICMP" ] && [ "$1" != 'UDP' ] && [ "$1" != 'TCP' ] ; then + check_result $E_INVALID "invalid protocol format :: $1" + fi +} + +# Firewall port validator +is_fw_port_format_valid() { + if [ "${#1}" -eq 1 ]; then + if ! [[ "$1" =~ [0-9] ]]; then + check_result $E_INVALID "invalid port format :: $1" + fi + else + if ! [[ "$1" =~ ^[0-9][-|,|:|0-9]{0,30}[0-9]$ ]] + then + check_result $E_INVALID "invalid port format :: $1" + fi + fi +} + +# Integer validator +is_int_format_valid() { + if ! [[ "$1" =~ ^[0-9]+$ ]] ; then + check_result $E_INVALID "invalid $2 format :: $1" + fi +} + +# Interface validator +is_interface_format_valid() { + netdevices=$(cat /proc/net/dev |grep : |cut -f 1 -d : |tr -d ' ') + if [ -z $(echo "$netdevices" |grep -x $1) ]; then + check_result $E_INVALID "invalid interface format :: $1" + fi +} + +# IP status validator +is_ip_status_format_valid() { + if [ -z "$(echo shared,dedicated | grep -w $1 )" ]; then + check_result $E_INVALID "invalid status format :: $1" + fi +} + +# Cron validator +is_cron_format_valid() { limit=60 check_format='' if [ "$2" = 'day' ]; then @@ -765,190 +702,105 @@ validate_format_mhdmw() { check_format='ok' fi if [ "$check_format" != 'ok' ]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID + check_result $E_INVALID "invalid $2 format :: $1" fi } -# proxy extention or DNS record -validate_format_common() { - exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]" - if [[ "$1" =~ $exclude ]]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi - if [ 400 -le ${#1} ]; then - echo "Error: $2 $1 is too long" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi - if [[ "$1" =~ @ ]] && [ ${#1} -gt 1 ] ; then - echo "Error: @ can not be mixed" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi - if [[ $1 =~ \* ]]; then - if [ "$(echo $1 | grep -o '*'|wc -l)" -gt 1 ]; then - log_event "$E_INVALID" "$EVENT" - echo "Error: * can be used only once" - fi +# Name validator +is_name_format_valid() { + if ! [[ "$1" =~ ^[[:alnum:]][-|\ |\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]; then + check_result $E_INVALID "invalid $2 format :: $1" fi } -# DNS record value -validate_format_dvalue() { - record_types="$(echo A,AAAA,NS,CNAME | grep -w "$rtype")" - if [[ "$1" =~ [\ ] ]] && [ ! -z "$record_types" ]; then - echo "Error: dvalue $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi - if [ "$rtype" = 'A' ]; then - validate_format_ip "$1" - fi - if [ "$rtype" = 'NS' ]; then - validate_format_domain "$1" 'ns_record' - fi - if [ "$rtype" = 'MX' ]; then - validate_format_domain "$1" 'mx_record' - validate_format_int "$priority" 'priority_record' - fi - -} - -# Date -validate_format_date() { - if ! [[ "$1" =~ ^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$ ]]; then - echo "Error: date $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID +# Object validator +is_object_format_valid() { + if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]; then + check_result $E_INVALID "invalid $2 format :: $1" fi } -# Autoreply -validate_format_autoreply() { - exclude="[$|\`]" - if [[ "$1" =~ $exclude ]] || [ 10240 -le ${#1} ]; then - echo "Error: autoreply is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Firewall action -validate_format_fw_action() { - if [ "$1" != "ACCEPT" ] && [ "$1" != 'DROP' ] ; then - echo "Error: $1 is not valid action" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Firewall protocol -validate_format_fw_protocol() { - if [ "$1" != "ICMP" ] && [ "$1" != 'UDP' ] && [ "$1" != 'TCP' ] ; then - echo "Error: $1 is not valid protocol" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Firewall port -validate_format_fw_port() { - if [ "${#1}" -eq 1 ]; then - if ! [[ "$1" =~ [0-9] ]]; then - echo "Error: port $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit 1 - fi - else - if ! [[ "$1" =~ ^[0-9][-|,|:|0-9]{0,30}[0-9]$ ]] - then - echo "Error: port $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit 1 - fi +# Password validator +is_password_format_valid() { + if [ "${#1}" -lt '6' ]; then + check_result $E_INVALID "invalid password format :: $1" fi } # Format validation controller -validate_format(){ +is_format_valid() { for arg_name in $*; do eval arg=\$$arg_name - if [ -z "$arg" ]; then - echo "Error: argument $arg_name is not valid (empty)" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID + if [ ! -z "$arg" ]; then + case $arg_name in + account) is_user_format_valid "$arg" "$arg_name";; + action) is_fw_action_format_valid "$arg";; + aliases) is_alias_format_valid "$arg" ;; + antispam) is_boolean_format_valid "$arg" 'antispam' ;; + antivirus) is_boolean_format_valid "$arg" 'antivirus' ;; + autoreply) is_autoreply_format_valid "$arg" ;; + backup) is_user_format_valid "$arg" 'backup' ;; + charset) is_object_format_valid "$arg" "$arg_name" ;; + charsets) is_common_format_valid "$arg" 'charsets' ;; + comment) is_object_format_valid "$arg" 'comment' ;; + database) is_database_format_valid "$arg" 'database';; + day) is_cron_format_valid "$arg" $arg_name ;; + dbpass) is_password_format_valid "$arg" ;; + dbuser) is_dbuser_format_valid "$arg" 'dbuser';; + dkim) is_boolean_format_valid "$arg" 'dkim' ;; + dkim_size) is_int_format_valid "$arg" ;; + domain) is_domain_format_valid "$arg" ;; + dvalue) is_dns_record_format_valid "$arg";; + email) is_email_format_valid "$arg" ;; + exp) is_date_format_valid "$arg" ;; + extentions) is_common_format_valid "$arg" 'extentions' ;; + fname) is_name_format_valid "$arg" "first name" ;; + ftp_password) is_password_format_valid "$arg" ;; + ftp_user) is_user_format_valid "$arg" "$arg_name" ;; + host) is_object_format_valid "$arg" "$arg_name" ;; + hour) is_cron_format_valid "$arg" $arg_name ;; + id) is_int_format_valid "$arg" 'id' ;; + ip) is_ip_format_valid "$arg" ;; + ip_name) is_domain_format_valid "$arg" 'IP name';; + ip_status) is_ip_status_format_valid "$arg" ;; + job) is_int_format_valid "$arg" 'job' ;; + key) is_user_format_valid "$arg" "$arg_name" ;; + lname) is_name_format_valid "$arg" "last name" ;; + malias) is_user_format_valid "$arg" "$arg_name" ;; + max_db) is_int_format_valid "$arg" 'max db';; + min) is_cron_format_valid "$arg" $arg_name ;; + month) is_cron_format_valid "$arg" $arg_name ;; + nat_ip) is_ip_format_valid "$arg" ;; + netmask) is_ip_format_valid "$arg" 'netmask' ;; + newid) is_int_format_valid "$arg" 'id' ;; + ns1) is_domain_format_valid "$arg" 'ns1' ;; + ns2) is_domain_format_valid "$arg" 'ns2' ;; + ns3) is_domain_format_valid "$arg" 'ns3' ;; + ns4) is_domain_format_valid "$arg" 'ns4' ;; + ns5) is_domain_format_valid "$arg" 'ns5' ;; + ns6) is_domain_format_valid "$arg" 'ns6' ;; + ns7) is_domain_format_valid "$arg" 'ns7' ;; + ns8) is_domain_format_valid "$arg" 'ns8' ;; + object) is_name_format_valid "$arg" 'object';; + package) is_object_format_valid "$arg" "$arg_name" ;; + password) is_password_format_valid "$arg" ;; + port) is_int_format_valid "$arg" 'port' ;; + port_ext) is_fw_port_format_valid "$arg";; + protocol) is_fw_protocol_format_valid "$arg" ;; + proxy_ext) is_extention_format_valid "$arg" ;; + quota) is_int_format_valid "$arg" 'quota' ;; + record) is_common_format_valid "$arg" 'record';; + restart) is_boolean_format_valid "$arg" 'restart' ;; + rtype) is_dns_type_format_valid "$arg" ;; + rule) is_int_format_valid "$arg" "rule id" ;; + soa) is_domain_format_valid "$arg" 'SOA' ;; + stats_pass) is_password_format_valid "$arg" ;; + stats_user) is_user_format_valid "$arg" "$arg_name" ;; + template) is_object_format_valid "$arg" "$arg_name" ;; + ttl) is_int_format_valid "$arg" 'ttl';; + user) is_user_format_valid "$arg" $arg_name;; + wday) is_cron_format_valid "$arg" $arg_name ;; + esac fi - - case $arg_name in - account) validate_format_username "$arg" "$arg_name" ;; - action) validate_format_fw_action "$arg";; - antispam) validate_format_boolean "$arg" 'antispam' ;; - antivirus) validate_format_boolean "$arg" 'antivirus' ;; - autoreply) validate_format_autoreply "$arg" ;; - backup) validate_format_domain "$arg" 'backup' ;; - charset) validate_format_name "$arg" "$arg_name" ;; - charsets) validate_format_common "$arg" 'charsets' ;; - comment) validate_format_name "$arg" 'comment' ;; - database) validate_format_database "$arg" 'database';; - day) validate_format_mhdmw "$arg" $arg_name ;; - dbpass) validate_format_password "$arg" ;; - dbuser) validate_format_dbuser "$arg" 'db_user';; - dkim) validate_format_boolean "$arg" 'dkim' ;; - dkim_size) validate_format_key_size "$arg" ;; - domain) validate_format_domain "$arg" 'domain';; - dom_alias) validate_format_domain_alias "$arg" 'alias';; - dvalue) validate_format_dvalue "$arg";; - email) validate_format_email "$arg" ;; - exp) validate_format_date "$arg" ;; - extentions) validate_format_common "$arg" 'extentions' ;; - fname) validate_format_name_s "$arg" "$arg_name" ;; - forward) validate_format_email "$arg" ;; - ftp_password) validate_format_password "$arg" ;; - ftp_user) validate_format_username "$arg" "$arg_name" ;; - host) validate_format_domain "$arg" "$arg_name" 'host';; - hour) validate_format_mhdmw "$arg" $arg_name ;; - id) validate_format_int "$arg" 'id' ;; - interface) validate_format_interface "$arg" ;; - ip) validate_format_ip "$arg" ;; - ip_name) validate_format_domain "$arg" 'domain';; - ip_status) validate_format_ip_status "$arg" ;; - job) validate_format_int "$arg" 'job' ;; - key) validate_format_username "$arg" "$arg_name" ;; - lname) validate_format_name_s "$arg" "$arg_name" ;; - malias) validate_format_username "$arg" "$arg_name" ;; - max_db) validate_format_int "$arg" 'max db';; - min) validate_format_mhdmw "$arg" $arg_name ;; - month) validate_format_mhdmw "$arg" $arg_name ;; - nat_ip) validate_format_ip "$arg" ;; - netmask) validate_format_ip "$arg" ;; - newid) validate_format_int "$arg" 'id' ;; - ns1) validate_format_domain "$arg" 'name_server';; - ns2) validate_format_domain "$arg" 'name_server';; - ns3) validate_format_domain "$arg" 'name_server';; - ns4) validate_format_domain "$arg" 'name_server';; - object) validate_format_name_s "$arg" 'object';; - package) validate_format_name "$arg" "$arg_name" ;; - password) validate_format_password "$arg" ;; - port) validate_format_int "$arg" 'port' ;; - port_ext) validate_format_fw_port "$arg";; - protocol) validate_format_fw_protocol "$arg" ;; - quota) validate_format_int "$arg" 'quota' ;; - restart) validate_format_boolean "$arg" 'restart' ;; - record) validate_format_common "$arg" 'record';; - rtype) validate_format_dns_type "$arg" ;; - rule) validate_format_int "$arg" "rule id" ;; - shell) validate_format_shell "$arg" ;; - soa) validate_format_domain "$arg" 'soa_record';; - stats_pass) validate_format_password "$arg" ;; - stats_user) validate_format_username "$arg" "$arg_name" ;; - template) validate_format_name "$arg" "$arg_name" ;; - ttl) validate_format_int "$arg" 'ttl';; - user) validate_format_username "$arg" "$arg_name" ;; - wday) validate_format_mhdmw "$arg" $arg_name ;; - esac done } diff --git a/func/rebuild.sh b/func/rebuild.sh index 86641a74..72cd7002 100644 --- a/func/rebuild.sh +++ b/func/rebuild.sh @@ -141,15 +141,11 @@ rebuild_user_conf() { # WEB domain rebuild rebuild_web_domain_conf() { - # Get domain values - domain_idn=$(idn -t --quiet -a "$domain") get_domain_values 'web' - ip=$(get_real_ip $IP) + is_ip_valid $IP + prepare_web_domain_values - # Preparing domain values for the template substitution - upd_web_domain_values - - # Rebuilding directories + # Rebuilding domain directories mkdir -p $HOMEDIR/$user/web/$domain \ $HOMEDIR/$user/web/$domain/public_html \ $HOMEDIR/$user/web/$domain/public_shtml \ @@ -159,18 +155,22 @@ rebuild_web_domain_conf() { $HOMEDIR/$user/web/$domain/stats \ $HOMEDIR/$user/web/$domain/logs - # Create domain logs + # Creating domain logs + if [ ! -e "/var/log/$WEB_SYSTEM/domains" ]; then + mkdir -p /var/log/$WEB_SYSTEM/domains + chmod 771 /var/log/$WEB_SYSTEM/domains + fi touch /var/log/$WEB_SYSTEM/domains/$domain.bytes \ /var/log/$WEB_SYSTEM/domains/$domain.log \ /var/log/$WEB_SYSTEM/domains/$domain.error.log - # Create symlinks + # Creating symlinks cd $HOMEDIR/$user/web/$domain/logs/ ln -f -s /var/log/$WEB_SYSTEM/domains/$domain.log . ln -f -s /var/log/$WEB_SYSTEM/domains/$domain.error.log . - cd - > /dev/null + cd / - # Propagate html skeleton + # Propagating html skeleton if [ ! -e "$WEBTPL/skel/document_errors/" ]; then cp -r $WEBTPL/skel/document_errors/ $HOMEDIR/$user/web/$domain/ fi @@ -195,35 +195,41 @@ rebuild_web_domain_conf() { chown -R $user:$user $HOMEDIR/$user/web/$domain/document_errors chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.* - # Adding tmp conf - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.tpl" - conf="$HOMEDIR/$user/conf/web/tmp_$WEB_SYSTEM.conf" - add_web_config - chown root:$user $conf - chmod 640 $conf + # Adding vhost configuration + conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf" + add_web_config "$WEB_SYSTEM" "$TPL.tpl" - # Running template trigger - if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.sh ]; then - $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.sh \ - $user $domain $ip $HOMEDIR $docroot + # Adding SSL vhost configuration + if [ "$SSL" = 'yes' ]; then + conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf" + add_web_config "$WEB_SYSTEM" "$TPL.stpl" + cp -f $USER_DATA/ssl/$domain.crt \ + $HOMEDIR/$user/conf/web/ssl.$domain.crt + cp -f $USER_DATA/ssl/$domain.key \ + $HOMEDIR/$user/conf/web/ssl.$domain.key + cp -f $USER_DATA/ssl/$domain.pem \ + $HOMEDIR/$user/conf/web/ssl.$domain.pem + if [ -e "$USER_DATA/ssl/$domain.ca" ]; then + cp -f $USER_DATA/ssl/$domain.ca \ + $HOMEDIR/$user/conf/web/ssl.$domain.ca + fi fi - # Checking aliases - if [ ! -z "$ALIAS" ]; then - aliases=$(echo "$ALIAS"|tr ',' '\n'| wc -l) - user_aliases=$((user_aliases + aliases)) + # Adding proxy configuration + if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then + conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf" + add_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + if [ "$SSL" = 'yes' ]; then + conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf" + add_web_config "$PROXY_SYSTEM" "$PROXY.stpl" + fi fi - # Checking stats + # Adding web stats parser if [ ! -z "$STATS" ]; then cat $WEBTPL/$STATS/$STATS.tpl |\ - sed -e "s|%ip%|$ip|g" \ + sed -e "s|%ip%|$local_ip|g" \ -e "s|%web_system%|$WEB_SYSTEM|g" \ - -e "s|%web_port%|$WEB_PORT|g" \ - -e "s|%web_ssl_port%|$WEB_SSL_PORT|g" \ - -e "s|%backend_lsnr%|$backend_lsnr|g" \ - -e "s|%proxy_port%|$PROXY_PORT|g" \ - -e "s|%proxy_ssl_port%|$PROXY_SSL_PORT|g" \ -e "s|%domain_idn%|$domain_idn|g" \ -e "s|%domain%|$domain|g" \ -e "s|%user%|$user|g" \ @@ -231,7 +237,6 @@ rebuild_web_domain_conf() { -e "s|%alias%|${aliases//,/ }|g" \ -e "s|%alias_idn%|${aliases_idn//,/ }|g" \ > $HOMEDIR/$user/conf/web/$STATS.$domain.conf - if [ "$STATS" == 'awstats' ]; then if [ ! -e "/etc/awstats/$STATS.$domain_idn.conf" ]; then ln -f -s $HOMEDIR/$user/conf/web/$STATS.$domain.conf \ @@ -247,82 +252,15 @@ rebuild_web_domain_conf() { if [ ! -z "$STATS_USER" ]; then stats_dir="$HOMEDIR/$user/web/$domain/stats" - - # Adding htaccess file echo "AuthUserFile $stats_dir/.htpasswd" > $stats_dir/.htaccess echo "AuthName \"Web Statistics\"" >> $stats_dir/.htaccess echo "AuthType Basic" >> $stats_dir/.htaccess echo "Require valid-user" >> $stats_dir/.htaccess - - # Generating htaccess user and password echo "$STATS_USER:$STATS_CRYPT" > $stats_dir/.htpasswd fi fi - # Checking SSL - if [ "$SSL" = 'yes' ]; then - - # Adding domain to the web conf - conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf" - tpl_file="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.stpl" - add_web_config - chown root:$user $conf - chmod 640 $conf - - cp -f $USER_DATA/ssl/$domain.crt \ - $HOMEDIR/$user/conf/web/ssl.$domain.crt - cp -f $USER_DATA/ssl/$domain.key \ - $HOMEDIR/$user/conf/web/ssl.$domain.key - cp -f $USER_DATA/ssl/$domain.pem \ - $HOMEDIR/$user/conf/web/ssl.$domain.pem - if [ -e "$USER_DATA/ssl/$domain.ca" ]; then - cp -f $USER_DATA/ssl/$domain.ca \ - $HOMEDIR/$user/conf/web/ssl.$domain.ca - fi - - # Running template trigger - if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.sh ]; then - $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$TPL.sh \ - $user $domain $ip $HOMEDIR $sdocroot - fi - - user_ssl=$((user_ssl + 1)) - ssl_change='yes' - fi - - # Checking proxy - if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl" - conf="$HOMEDIR/$user/conf/web/tmp_$PROXY_SYSTEM.conf" - add_web_config - chown root:$user $conf - chmod 640 $conf - proxy_change='yes' - fi - - if [ ! -z "$PROXY_SYSTEM" ] && [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - if [ -z "$PROXY" ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/default.stpl" - fi - conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf" - add_web_config - chown root:$user $conf - chmod 640 $conf - proxy_change='yes' - fi - - if [ "$SUSPENDED" = 'yes' ]; then - suspended_web=$((suspended_web + 1)) - fi - user_domains=$((user_domains + 1)) - - # Running template trigger - if [ -x $WEBTPL/$PROXY_SYSTEM/$PROXY.sh ]; then - $WEBTPL/$PROXY_SYSTEM/$PROXY.sh $user $domain $ip $HOMEDIR $docroot - fi - - # Defining ftp user shell + # Adding ftp users if [ -z "$FTP_SHELL" ]; then shell='/sbin/nologin' if [ -e "/usr/bin/rssh" ]; then @@ -331,19 +269,15 @@ rebuild_web_domain_conf() { else shell=$FTP_SHELL fi - - # Checking ftp users for ftp_user in ${FTP_USER//:/ }; do if [ -z "$(grep ^$ftp_user: /etc/passwd)" ]; then - # Parsing ftp user variables - position=$(echo $FTP_USER | tr ':' '\n' | grep -n '' |\ - grep ":$ftp_user$" | cut -f 1 -d:) - ftp_path=$(echo $FTP_PATH | tr ':' '\n' | grep -n '' |\ - grep "^$position:" | cut -f 2 -d :) - ftp_md5=$(echo $FTP_MD5 | tr ':' '\n' | grep -n '' |\ - grep "^$position:" | cut -f 2 -d :) + position=$(echo $FTP_USER |tr ':' '\n' |grep -n '' |\ + grep ":$ftp_user$" |cut -f 1 -d:) + ftp_path=$(echo $FTP_PATH |tr ':' '\n' |grep -n '' |\ + grep "^$position:" |cut -f 2 -d :) + ftp_md5=$(echo $FTP_MD5 | tr ':' '\n' |grep -n '' |\ + grep "^$position:" |cut -f 2 -d :) - # Adding ftp user /usr/sbin/useradd $ftp_user \ -s $shell \ -o -u $(id -u $user) \ @@ -352,13 +286,13 @@ rebuild_web_domain_conf() { # Updating ftp user password shadow=$(grep "^$ftp_user:" /etc/shadow) - shdw3=$(echo "$shadow" | cut -f3 -d :) - shdw4=$(echo "$shadow" | cut -f4 -d :) - shdw5=$(echo "$shadow" | cut -f5 -d :) - shdw6=$(echo "$shadow" | cut -f6 -d :) - shdw7=$(echo "$shadow" | cut -f7 -d :) - shdw8=$(echo "$shadow" | cut -f8 -d :) - shdw9=$(echo "$shadow" | cut -f9 -d :) + shdw3=$(echo "$shadow" |cut -f3 -d :) + shdw4=$(echo "$shadow" |cut -f4 -d :) + shdw5=$(echo "$shadow" |cut -f5 -d :) + shdw6=$(echo "$shadow" |cut -f6 -d :) + shdw7=$(echo "$shadow" |cut -f7 -d :) + shdw8=$(echo "$shadow" |cut -f8 -d :) + shdw9=$(echo "$shadow" |cut -f9 -d :) shadow_str="$ftp_user:$ftp_md5:$shdw3:$shdw4:$shdw5:$shdw6" shadow_str="$shadow_str:$shdw7:$shdw8:$shdw9" chmod u+w /etc/shadow @@ -374,10 +308,10 @@ rebuild_web_domain_conf() { docroot="$HOMEDIR/$user/web/$domain/public_html" for auth_user in ${AUTH_USER//:/ }; do # Parsing auth user variables - position=$(echo $AUTH_USER | tr ':' '\n' | grep -n '' |\ - grep ":$auth_user$" | cut -f 1 -d:) - auth_hash=$(echo $AUTH_HASH | tr ':' '\n' | grep -n '' |\ - grep "^$position:" | cut -f 2 -d :) + position=$(echo $AUTH_USER |tr ':' '\n' |grep -n '' |\ + grep ":$auth_user$" |cut -f 1 -d:) + auth_hash=$(echo $AUTH_HASH |tr ':' '\n' |grep -n '' |\ + grep "^$position:" |cut -f 2 -d :) # Adding http auth user touch $htpasswd @@ -397,9 +331,9 @@ rebuild_web_domain_conf() { echo "auth_basic \"$domain password access\";" > $htaccess echo "auth_basic_user_file $htpasswd;" >> $htaccess fi + chmod 640 $htpasswd $htaccess >/dev/null 2>&1 fi done - chmod 640 $htpasswd $htaccess >/dev/null 2>&1 } # DNS domain rebuild @@ -472,10 +406,14 @@ rebuild_dns_domain_conf() { # MAIL domain rebuild rebuild_mail_domain_conf() { - # Get domain values - domain_idn=$(idn -t --quiet -a "$domain") get_domain_values 'mail' + if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) + else + domain_idn=$domain + fi + if [ "$SUSPENDED" = 'yes' ]; then SUSPENDED_MAIL=$((SUSPENDED_MAIL +1)) fi @@ -592,10 +530,10 @@ rebuild_mysql_database() { eval $host_str if [ -z $HOST ] || [ -z $USER ] || [ -z $PASSWORD ]; then echo "Error: mysql config parsing failed" - if [ ! -z "$send_mail" ]; then - echo "Can't parse MySQL DB config" | $send_mail -s "$subj" $email + if [ ! -z "$SENDMAIL" ]; then + echo "Can't parse MySQL DB config" | $SENDMAIL -s "$subj" $email fi - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi @@ -603,11 +541,11 @@ rebuild_mysql_database() { mysql -h $HOST -u $USER -p$PASSWORD -e "$query" > /dev/null 2>&1 if [ '0' -ne "$?" ]; then echo "Error: Database connection to $HOST failed" - if [ ! -z "$send_mail" ]; then + if [ ! -z "$SENDMAIL" ]; then echo "Database connection to MySQL host $HOST failed" |\ - $send_mail -s "$subj" $email + $SENDMAIL -s "$subj" $email fi - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi @@ -635,10 +573,10 @@ rebuild_pgsql_database() { export PGPASSWORD="$PASSWORD" if [ -z $HOST ] || [ -z $USER ] || [ -z $PASSWORD ] || [ -z $TPL ]; then echo "Error: postgresql config parsing failed" - if [ ! -z "$send_mail" ]; then - echo "Can't parse PostgreSQL config" | $send_mail -s "$subj" $email + if [ ! -z "$SENDMAIL" ]; then + echo "Can't parse PostgreSQL config" | $SENDMAIL -s "$subj" $email fi - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi @@ -646,11 +584,11 @@ rebuild_pgsql_database() { psql -h $HOST -U $USER -c "$query" > /dev/null 2>&1 if [ '0' -ne "$?" ]; then echo "Error: Connection failed" - if [ ! -z "$send_mail" ]; then + if [ ! -z "$SENDMAIL" ]; then echo "Database connection to PostgreSQL host $HOST failed" |\ - $send_mail -s "$subj" $email + $SENDMAIL -s "$subj" $email fi - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi @@ -683,7 +621,7 @@ import_mysql_database() { eval $host_str if [ -z $HOST ] || [ -z $USER ] || [ -z $PASSWORD ]; then echo "Error: mysql config parsing failed" - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi @@ -699,7 +637,7 @@ import_pgsql_database() { export PGPASSWORD="$PASSWORD" if [ -z $HOST ] || [ -z $USER ] || [ -z $PASSWORD ] || [ -z $TPL ]; then echo "Error: postgresql config parsing failed" - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi diff --git a/func/remote.sh b/func/remote.sh index f680ce0d..1f2d49d3 100644 --- a/func/remote.sh +++ b/func/remote.sh @@ -106,12 +106,12 @@ remote_dns_health_check() { else subj="DNS sync failed" email=$($BIN/v-get-user-value admin CONTACT) - cat $tmpfile |$send_mail -s "$subj" $email + cat $tmpfile |$SENDMAIL -s "$subj" $email fi # Deleting tmp file rm -f $tmpfile - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" # Suspending remote host dconf="../../conf/dns-cluster" diff --git a/install/debian/7/exim/exim4.conf.template b/install/debian/7/exim/exim4.conf.template index 742f0409..f515fb18 100644 --- a/install/debian/7/exim/exim4.conf.template +++ b/install/debian/7/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen @@ -244,7 +244,7 @@ aliases: localuser_fwd_only: driver = accept transport = devnull - condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}} + condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/fwd_only}{true}{false}}}} localuser_spam: driver = accept diff --git a/install/debian/7/firewall/ports.conf b/install/debian/7/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/debian/7/firewall/ports.conf +++ b/install/debian/7/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/debian/7/firewall/rules.conf b/install/debian/7/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/debian/7/firewall/rules.conf +++ b/install/debian/7/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/debian/7/nginx/nginx.conf b/install/debian/7/nginx/nginx.conf index 1e29f1fc..ca692959 100644 --- a/install/debian/7/nginx/nginx.conf +++ b/install/debian/7/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/debian/7/templates/web/apache2/basedir.stpl b/install/debian/7/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 96de57af..dda3aa76 --- a/install/debian/7/templates/web/apache2/basedir.stpl +++ b/install/debian/7/templates/web/apache2/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/debian/7/templates/web/apache2/basedir.tpl b/install/debian/7/templates/web/apache2/basedir.tpl old mode 100755 new mode 100644 index 07ec38c9..9449bc44 --- a/install/debian/7/templates/web/apache2/basedir.tpl +++ b/install/debian/7/templates/web/apache2/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/debian/7/templates/web/apache2/default.stpl b/install/debian/7/templates/web/apache2/default.stpl old mode 100755 new mode 100644 index da523c13..269c0971 --- a/install/debian/7/templates/web/apache2/default.stpl +++ b/install/debian/7/templates/web/apache2/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/debian/7/templates/web/apache2/default.tpl b/install/debian/7/templates/web/apache2/default.tpl old mode 100755 new mode 100644 index b95c1ee3..c24b1279 --- a/install/debian/7/templates/web/apache2/default.tpl +++ b/install/debian/7/templates/web/apache2/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/debian/7/templates/web/apache2/hosting.stpl b/install/debian/7/templates/web/apache2/hosting.stpl old mode 100755 new mode 100644 index c1c91e22..627325e0 --- a/install/debian/7/templates/web/apache2/hosting.stpl +++ b/install/debian/7/templates/web/apache2/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/debian/7/templates/web/apache2/hosting.tpl b/install/debian/7/templates/web/apache2/hosting.tpl old mode 100755 new mode 100644 index 8f3ec012..0bdd6ea6 --- a/install/debian/7/templates/web/apache2/hosting.tpl +++ b/install/debian/7/templates/web/apache2/hosting.tpl @@ -21,13 +21,14 @@ php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube RMode config RUidGid %user% %group% diff --git a/install/debian/7/templates/web/apache2/phpcgi.stpl b/install/debian/7/templates/web/apache2/phpcgi.stpl old mode 100755 new mode 100644 index 58c4baf9..aa807091 --- a/install/debian/7/templates/web/apache2/phpcgi.stpl +++ b/install/debian/7/templates/web/apache2/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/debian/7/templates/web/apache2/phpcgi.tpl b/install/debian/7/templates/web/apache2/phpcgi.tpl old mode 100755 new mode 100644 index 21be2cdd..fd603800 --- a/install/debian/7/templates/web/apache2/phpcgi.tpl +++ b/install/debian/7/templates/web/apache2/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/debian/7/templates/web/apache2/phpfcgid.stpl b/install/debian/7/templates/web/apache2/phpfcgid.stpl old mode 100755 new mode 100644 index 20a58009..88cea0e6 --- a/install/debian/7/templates/web/apache2/phpfcgid.stpl +++ b/install/debian/7/templates/web/apache2/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/debian/7/templates/web/apache2/phpfcgid.tpl b/install/debian/7/templates/web/apache2/phpfcgid.tpl old mode 100755 new mode 100644 index 72e7d8d4..335b9f62 --- a/install/debian/7/templates/web/apache2/phpfcgid.tpl +++ b/install/debian/7/templates/web/apache2/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.stpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.tpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal.stpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl similarity index 92% rename from install/rhel/5/templates/web/nginx/php-fpm/drupal.stpl rename to install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl index 9a548439..62e67cc9 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/drupal.stpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl @@ -65,15 +65,10 @@ server { } location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - # For Drupal 6 and bwlow: # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; + rewrite ^/(.*)$ /index.php?q=$1; } location ~ ^/sites/.*/files/styles/ { diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal.tpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl similarity index 92% rename from install/debian/8/templates/web/nginx/php5-fpm/drupal.tpl rename to install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl index 417762c1..52adf452 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/drupal.tpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl @@ -62,15 +62,10 @@ server { } location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - # For Drupal 6 and bwlow: # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; + rewrite ^/(.*)$ /index.php?q=$1; } location ~ ^/sites/.*/files/styles/ { diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/7/templates/web/nginx/php5-fpm/moodle.stpl b/install/debian/7/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/7/templates/web/nginx/php5-fpm/moodle.tpl b/install/debian/7/templates/web/nginx/php5-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/debian/7/templates/web/nginx/php5-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/7/templates/web/nginx/php5-fpm/owncloud.stpl b/install/debian/7/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/owncloud.stpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl b/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/debian/7/templates/web/php5-fpm/no-php.tpl b/install/debian/7/templates/web/php5-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/debian/7/templates/web/php5-fpm/no-php.tpl +++ b/install/debian/7/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/debian/7/vsftpd/vsftpd.conf b/install/debian/7/vsftpd/vsftpd.conf index 0902899e..1ca1a992 100644 --- a/install/debian/7/vsftpd/vsftpd.conf +++ b/install/debian/7/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -22,3 +23,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/debian/8/exim/exim4.conf.template b/install/debian/8/exim/exim4.conf.template index 742f0409..f515fb18 100644 --- a/install/debian/8/exim/exim4.conf.template +++ b/install/debian/8/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen @@ -244,7 +244,7 @@ aliases: localuser_fwd_only: driver = accept transport = devnull - condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}} + condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/fwd_only}{true}{false}}}} localuser_spam: driver = accept diff --git a/install/debian/8/firewall/ports.conf b/install/debian/8/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/debian/8/firewall/ports.conf +++ b/install/debian/8/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/debian/8/firewall/rules.conf b/install/debian/8/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/debian/8/firewall/rules.conf +++ b/install/debian/8/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/debian/8/nginx/nginx.conf b/install/debian/8/nginx/nginx.conf index 1e29f1fc..ca692959 100644 --- a/install/debian/8/nginx/nginx.conf +++ b/install/debian/8/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/debian/8/roundcube/vesta.php b/install/debian/8/roundcube/vesta.php index 8fb202a4..3261f656 100644 --- a/install/debian/8/roundcube/vesta.php +++ b/install/debian/8/roundcube/vesta.php @@ -6,8 +6,8 @@ * @version 1.0 * @author Serghey Rodin */ - - function password_save($curpass, $passwd) +class rcube_vesta_password { + function save($curpass, $passwd) { $rcmail = rcmail::get_instance(); $vesta_host = $rcmail->config->get('password_vesta_host'); @@ -40,7 +40,16 @@ $send .= PHP_EOL; $send .= $postdata . PHP_EOL . PHP_EOL; - $fp = fsockopen('ssl://' . $vesta_host, $vesta_port); + //$fp = fsockopen('ssl://' . $vesta_host, $vesta_port); + $errno = ""; + $errstr = ""; + $context = stream_context_create(); + + $result = stream_context_set_option($context, 'ssl', 'verify_peer', false); + $result = stream_context_set_option($context, 'ssl', 'verify_host', false); + $result = stream_context_set_option($context, 'ssl', 'allow_self_signed', true); + + $fp = stream_socket_client('ssl://' . $vesta_host . ':'.$vesta_port, $errno, $errstr, 60, STREAM_CLIENT_CONNECT, $context); fputs($fp, $send); $result = fread($fp, 2048); fclose($fp); @@ -60,3 +69,4 @@ } } +} diff --git a/install/debian/8/templates/web/apache2/basedir.stpl b/install/debian/8/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e699..d978d4c4 --- a/install/debian/8/templates/web/apache2/basedir.stpl +++ b/install/debian/8/templates/web/apache2/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/debian/8/templates/web/apache2/basedir.tpl b/install/debian/8/templates/web/apache2/basedir.tpl old mode 100755 new mode 100644 index 75daf0e1..96c94a1b --- a/install/debian/8/templates/web/apache2/basedir.tpl +++ b/install/debian/8/templates/web/apache2/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/debian/8/templates/web/apache2/default.stpl b/install/debian/8/templates/web/apache2/default.stpl old mode 100755 new mode 100644 index e884a95b..a7faa721 --- a/install/debian/8/templates/web/apache2/default.stpl +++ b/install/debian/8/templates/web/apache2/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/debian/8/templates/web/apache2/default.tpl b/install/debian/8/templates/web/apache2/default.tpl old mode 100755 new mode 100644 index 073724ce..3a227015 --- a/install/debian/8/templates/web/apache2/default.tpl +++ b/install/debian/8/templates/web/apache2/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/debian/8/templates/web/apache2/hosting.stpl b/install/debian/8/templates/web/apache2/hosting.stpl old mode 100755 new mode 100644 index 7a5d7787..8892072b --- a/install/debian/8/templates/web/apache2/hosting.stpl +++ b/install/debian/8/templates/web/apache2/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/debian/8/templates/web/apache2/hosting.tpl b/install/debian/8/templates/web/apache2/hosting.tpl old mode 100755 new mode 100644 index ab844dc7..1eb26910 --- a/install/debian/8/templates/web/apache2/hosting.tpl +++ b/install/debian/8/templates/web/apache2/hosting.tpl @@ -14,20 +14,20 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube RMode config RUidGid %user% %group% diff --git a/install/debian/8/templates/web/apache2/phpcgi.stpl b/install/debian/8/templates/web/apache2/phpcgi.stpl old mode 100755 new mode 100644 index aa513730..731355bc --- a/install/debian/8/templates/web/apache2/phpcgi.stpl +++ b/install/debian/8/templates/web/apache2/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/debian/8/templates/web/apache2/phpcgi.tpl b/install/debian/8/templates/web/apache2/phpcgi.tpl old mode 100755 new mode 100644 index a05ff252..c6796d29 --- a/install/debian/8/templates/web/apache2/phpcgi.tpl +++ b/install/debian/8/templates/web/apache2/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/debian/8/templates/web/apache2/phpfcgid.stpl b/install/debian/8/templates/web/apache2/phpfcgid.stpl old mode 100755 new mode 100644 index 62249575..156c8a91 --- a/install/debian/8/templates/web/apache2/phpfcgid.stpl +++ b/install/debian/8/templates/web/apache2/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/debian/8/templates/web/apache2/phpfcgid.tpl b/install/debian/8/templates/web/apache2/phpfcgid.tpl old mode 100755 new mode 100644 index 5c1f16e2..a4c01269 --- a/install/debian/8/templates/web/apache2/phpfcgid.tpl +++ b/install/debian/8/templates/web/apache2/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.tpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl similarity index 92% rename from install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl rename to install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl index 9a548439..62e67cc9 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl @@ -65,15 +65,10 @@ server { } location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - # For Drupal 6 and bwlow: # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; + rewrite ^/(.*)$ /index.php?q=$1; } location ~ ^/sites/.*/files/styles/ { diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal.tpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal6.tpl similarity index 92% rename from install/rhel/5/templates/web/nginx/php-fpm/drupal.tpl rename to install/debian/8/templates/web/nginx/php5-fpm/drupal6.tpl index 417762c1..52adf452 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/drupal.tpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal6.tpl @@ -62,15 +62,10 @@ server { } location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - # For Drupal 6 and bwlow: # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; + rewrite ^/(.*)$ /index.php?q=$1; } location ~ ^/sites/.*/files/styles/ { diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/8/templates/web/nginx/php5-fpm/moodle.stpl b/install/debian/8/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/8/templates/web/nginx/php5-fpm/moodle.tpl b/install/debian/8/templates/web/nginx/php5-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/debian/8/templates/web/nginx/php5-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/debian/8/templates/web/php5-fpm/no-php.tpl b/install/debian/8/templates/web/php5-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/debian/8/templates/web/php5-fpm/no-php.tpl +++ b/install/debian/8/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/debian/8/vsftpd/vsftpd.conf b/install/debian/8/vsftpd/vsftpd.conf index 0902899e..1ca1a992 100644 --- a/install/debian/8/vsftpd/vsftpd.conf +++ b/install/debian/8/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -22,3 +23,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/rhel/5/exim/exim.conf b/install/rhel/5/exim/exim.conf index 0f983016..6f9a7388 100644 --- a/install/rhel/5/exim/exim.conf +++ b/install/rhel/5/exim/exim.conf @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/rhel/5/firewall/ports.conf b/install/rhel/5/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/rhel/5/firewall/ports.conf +++ b/install/rhel/5/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/rhel/5/firewall/rules.conf b/install/rhel/5/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/rhel/5/firewall/rules.conf +++ b/install/rhel/5/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/rhel/5/nginx/nginx.conf b/install/rhel/5/nginx/nginx.conf index 1b953c01..f64919fd 100644 --- a/install/rhel/5/nginx/nginx.conf +++ b/install/rhel/5/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/rhel/5/templates/web/httpd/basedir.stpl b/install/rhel/5/templates/web/httpd/basedir.stpl old mode 100755 new mode 100644 index d568276d..4ced9f38 --- a/install/rhel/5/templates/web/httpd/basedir.stpl +++ b/install/rhel/5/templates/web/httpd/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/rhel/5/templates/web/httpd/basedir.tpl b/install/rhel/5/templates/web/httpd/basedir.tpl old mode 100755 new mode 100644 index 41b77334..566c9884 --- a/install/rhel/5/templates/web/httpd/basedir.tpl +++ b/install/rhel/5/templates/web/httpd/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/rhel/5/templates/web/httpd/default.stpl b/install/rhel/5/templates/web/httpd/default.stpl old mode 100755 new mode 100644 index ffb536c5..cd4a8c88 --- a/install/rhel/5/templates/web/httpd/default.stpl +++ b/install/rhel/5/templates/web/httpd/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/rhel/5/templates/web/httpd/default.tpl b/install/rhel/5/templates/web/httpd/default.tpl old mode 100755 new mode 100644 index 29de125f..94288db0 --- a/install/rhel/5/templates/web/httpd/default.tpl +++ b/install/rhel/5/templates/web/httpd/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/rhel/5/templates/web/httpd/hosting.stpl b/install/rhel/5/templates/web/httpd/hosting.stpl old mode 100755 new mode 100644 index ee06dfce..f94ba186 --- a/install/rhel/5/templates/web/httpd/hosting.stpl +++ b/install/rhel/5/templates/web/httpd/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/rhel/5/templates/web/httpd/hosting.tpl b/install/rhel/5/templates/web/httpd/hosting.tpl old mode 100755 new mode 100644 index c3b83997..1d3dd354 --- a/install/rhel/5/templates/web/httpd/hosting.tpl +++ b/install/rhel/5/templates/web/httpd/hosting.tpl @@ -14,20 +14,20 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube RMode config RUidGid %user% %group% diff --git a/install/rhel/5/templates/web/httpd/phpcgi.stpl b/install/rhel/5/templates/web/httpd/phpcgi.stpl old mode 100755 new mode 100644 index b3e6488a..591693a4 --- a/install/rhel/5/templates/web/httpd/phpcgi.stpl +++ b/install/rhel/5/templates/web/httpd/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/rhel/5/templates/web/httpd/phpcgi.tpl b/install/rhel/5/templates/web/httpd/phpcgi.tpl old mode 100755 new mode 100644 index 952d2b49..114c6a52 --- a/install/rhel/5/templates/web/httpd/phpcgi.tpl +++ b/install/rhel/5/templates/web/httpd/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/rhel/5/templates/web/httpd/phpfcgid.stpl b/install/rhel/5/templates/web/httpd/phpfcgid.stpl old mode 100755 new mode 100644 index 352d268b..3bb82cca --- a/install/rhel/5/templates/web/httpd/phpfcgid.stpl +++ b/install/rhel/5/templates/web/httpd/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/rhel/5/templates/web/httpd/phpfcgid.tpl b/install/rhel/5/templates/web/httpd/phpfcgid.tpl old mode 100755 new mode 100644 index 9826c946..f4e4f472 --- a/install/rhel/5/templates/web/httpd/phpfcgid.tpl +++ b/install/rhel/5/templates/web/httpd/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.stpl b/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.stpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.tpl b/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.tpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal.stpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal6.stpl similarity index 92% rename from install/rhel/6/templates/web/nginx/php-fpm/drupal.stpl rename to install/rhel/5/templates/web/nginx/php-fpm/drupal6.stpl index 9a548439..62e67cc9 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/drupal.stpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal6.stpl @@ -65,15 +65,10 @@ server { } location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - # For Drupal 6 and bwlow: # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; + rewrite ^/(.*)$ /index.php?q=$1; } location ~ ^/sites/.*/files/styles/ { diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal6.tpl similarity index 92% rename from install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl rename to install/rhel/5/templates/web/nginx/php-fpm/drupal6.tpl index 417762c1..52adf452 100644 --- a/install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal6.tpl @@ -62,15 +62,10 @@ server { } location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - # For Drupal 6 and bwlow: # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; + rewrite ^/(.*)$ /index.php?q=$1; } location ~ ^/sites/.*/files/styles/ { diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/5/templates/web/nginx/php-fpm/moodle.stpl b/install/rhel/5/templates/web/nginx/php-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/5/templates/web/nginx/php-fpm/moodle.tpl b/install/rhel/5/templates/web/nginx/php-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/rhel/5/templates/web/nginx/php-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/5/templates/web/nginx/php-fpm/owncloud.stpl b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/owncloud.stpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/rhel/5/templates/web/php-fpm/no-php.tpl b/install/rhel/5/templates/web/php-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/rhel/5/templates/web/php-fpm/no-php.tpl +++ b/install/rhel/5/templates/web/php-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/rhel/5/vsftpd/vsftpd.conf b/install/rhel/5/vsftpd/vsftpd.conf index 7a986aff..cf4c9624 100644 --- a/install/rhel/5/vsftpd/vsftpd.conf +++ b/install/rhel/5/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -19,3 +20,4 @@ ascii_download_enable=YES pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/rhel/6/exim/exim.conf b/install/rhel/6/exim/exim.conf index 0f983016..6f9a7388 100644 --- a/install/rhel/6/exim/exim.conf +++ b/install/rhel/6/exim/exim.conf @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/rhel/6/firewall/ports.conf b/install/rhel/6/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/rhel/6/firewall/ports.conf +++ b/install/rhel/6/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/rhel/6/firewall/rules.conf b/install/rhel/6/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/rhel/6/firewall/rules.conf +++ b/install/rhel/6/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/rhel/6/nginx/nginx.conf b/install/rhel/6/nginx/nginx.conf index 1b953c01..f64919fd 100644 --- a/install/rhel/6/nginx/nginx.conf +++ b/install/rhel/6/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/rhel/6/templates/web/httpd/basedir.stpl b/install/rhel/6/templates/web/httpd/basedir.stpl old mode 100755 new mode 100644 index d568276d..4ced9f38 --- a/install/rhel/6/templates/web/httpd/basedir.stpl +++ b/install/rhel/6/templates/web/httpd/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/rhel/6/templates/web/httpd/basedir.tpl b/install/rhel/6/templates/web/httpd/basedir.tpl old mode 100755 new mode 100644 index 41b77334..566c9884 --- a/install/rhel/6/templates/web/httpd/basedir.tpl +++ b/install/rhel/6/templates/web/httpd/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/rhel/6/templates/web/httpd/default.stpl b/install/rhel/6/templates/web/httpd/default.stpl old mode 100755 new mode 100644 index ffb536c5..cd4a8c88 --- a/install/rhel/6/templates/web/httpd/default.stpl +++ b/install/rhel/6/templates/web/httpd/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/rhel/6/templates/web/httpd/default.tpl b/install/rhel/6/templates/web/httpd/default.tpl old mode 100755 new mode 100644 index 29de125f..94288db0 --- a/install/rhel/6/templates/web/httpd/default.tpl +++ b/install/rhel/6/templates/web/httpd/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/rhel/6/templates/web/httpd/hosting.stpl b/install/rhel/6/templates/web/httpd/hosting.stpl old mode 100755 new mode 100644 index ee06dfce..f1c1c111 --- a/install/rhel/6/templates/web/httpd/hosting.stpl +++ b/install/rhel/6/templates/web/httpd/hosting.stpl @@ -15,15 +15,16 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All diff --git a/install/rhel/6/templates/web/httpd/hosting.tpl b/install/rhel/6/templates/web/httpd/hosting.tpl old mode 100755 new mode 100644 index c3b83997..65bf20fd --- a/install/rhel/6/templates/web/httpd/hosting.tpl +++ b/install/rhel/6/templates/web/httpd/hosting.tpl @@ -14,15 +14,16 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All diff --git a/install/rhel/6/templates/web/httpd/phpcgi.stpl b/install/rhel/6/templates/web/httpd/phpcgi.stpl old mode 100755 new mode 100644 index b3e6488a..591693a4 --- a/install/rhel/6/templates/web/httpd/phpcgi.stpl +++ b/install/rhel/6/templates/web/httpd/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/rhel/6/templates/web/httpd/phpcgi.tpl b/install/rhel/6/templates/web/httpd/phpcgi.tpl old mode 100755 new mode 100644 index 952d2b49..114c6a52 --- a/install/rhel/6/templates/web/httpd/phpcgi.tpl +++ b/install/rhel/6/templates/web/httpd/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/rhel/6/templates/web/httpd/phpfcgid.stpl b/install/rhel/6/templates/web/httpd/phpfcgid.stpl old mode 100755 new mode 100644 index 352d268b..3bb82cca --- a/install/rhel/6/templates/web/httpd/phpfcgid.stpl +++ b/install/rhel/6/templates/web/httpd/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/rhel/6/templates/web/httpd/phpfcgid.tpl b/install/rhel/6/templates/web/httpd/phpfcgid.tpl old mode 100755 new mode 100644 index 9826c946..f4e4f472 --- a/install/rhel/6/templates/web/httpd/phpfcgid.tpl +++ b/install/rhel/6/templates/web/httpd/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.stpl b/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.stpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.tpl b/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.tpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal.stpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal6.stpl similarity index 92% rename from install/debian/8/templates/web/nginx/php5-fpm/drupal.stpl rename to install/rhel/6/templates/web/nginx/php-fpm/drupal6.stpl index 9a548439..62e67cc9 100644 --- a/install/debian/8/templates/web/nginx/php5-fpm/drupal.stpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal6.stpl @@ -65,15 +65,10 @@ server { } location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - # For Drupal 6 and bwlow: # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; + rewrite ^/(.*)$ /index.php?q=$1; } location ~ ^/sites/.*/files/styles/ { diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal.tpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal6.tpl similarity index 92% rename from install/rhel/6/templates/web/nginx/php-fpm/drupal.tpl rename to install/rhel/6/templates/web/nginx/php-fpm/drupal6.tpl index 417762c1..52adf452 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/drupal.tpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal6.tpl @@ -62,15 +62,10 @@ server { } location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - # For Drupal 6 and bwlow: # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; + rewrite ^/(.*)$ /index.php?q=$1; } location ~ ^/sites/.*/files/styles/ { diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/6/templates/web/nginx/php-fpm/moodle.stpl b/install/rhel/6/templates/web/nginx/php-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/6/templates/web/nginx/php-fpm/moodle.tpl b/install/rhel/6/templates/web/nginx/php-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/rhel/6/templates/web/nginx/php-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/6/templates/web/nginx/php-fpm/owncloud.stpl b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/owncloud.stpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/rhel/6/templates/web/php-fpm/no-php.tpl b/install/rhel/6/templates/web/php-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/rhel/6/templates/web/php-fpm/no-php.tpl +++ b/install/rhel/6/templates/web/php-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/rhel/6/vsftpd/vsftpd.conf b/install/rhel/6/vsftpd/vsftpd.conf index 7a986aff..cf4c9624 100644 --- a/install/rhel/6/vsftpd/vsftpd.conf +++ b/install/rhel/6/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -19,3 +20,4 @@ ascii_download_enable=YES pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/rhel/7/exim/exim.conf b/install/rhel/7/exim/exim.conf index 0f983016..6f9a7388 100644 --- a/install/rhel/7/exim/exim.conf +++ b/install/rhel/7/exim/exim.conf @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen diff --git a/install/rhel/7/firewall/ports.conf b/install/rhel/7/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/rhel/7/firewall/ports.conf +++ b/install/rhel/7/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/rhel/7/firewall/rules.conf b/install/rhel/7/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/rhel/7/firewall/rules.conf +++ b/install/rhel/7/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/rhel/7/nginx/nginx.conf b/install/rhel/7/nginx/nginx.conf index 1b953c01..f64919fd 100644 --- a/install/rhel/7/nginx/nginx.conf +++ b/install/rhel/7/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/rhel/7/templates/web/httpd/basedir.stpl b/install/rhel/7/templates/web/httpd/basedir.stpl old mode 100755 new mode 100644 index b90818f1..95221539 --- a/install/rhel/7/templates/web/httpd/basedir.stpl +++ b/install/rhel/7/templates/web/httpd/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/rhel/7/templates/web/httpd/basedir.tpl b/install/rhel/7/templates/web/httpd/basedir.tpl old mode 100755 new mode 100644 index 53188221..e1f86c70 --- a/install/rhel/7/templates/web/httpd/basedir.tpl +++ b/install/rhel/7/templates/web/httpd/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/rhel/7/templates/web/httpd/default.stpl b/install/rhel/7/templates/web/httpd/default.stpl old mode 100755 new mode 100644 index 1134f39a..c63dd270 --- a/install/rhel/7/templates/web/httpd/default.stpl +++ b/install/rhel/7/templates/web/httpd/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/rhel/7/templates/web/httpd/default.tpl b/install/rhel/7/templates/web/httpd/default.tpl old mode 100755 new mode 100644 index 78caf0b8..55868761 --- a/install/rhel/7/templates/web/httpd/default.tpl +++ b/install/rhel/7/templates/web/httpd/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/rhel/7/templates/web/httpd/hosting.stpl b/install/rhel/7/templates/web/httpd/hosting.stpl old mode 100755 new mode 100644 index 28ba49d5..673c9c01 --- a/install/rhel/7/templates/web/httpd/hosting.stpl +++ b/install/rhel/7/templates/web/httpd/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/rhel/7/templates/web/httpd/hosting.tpl b/install/rhel/7/templates/web/httpd/hosting.tpl old mode 100755 new mode 100644 index 3a924970..25f8e3bf --- a/install/rhel/7/templates/web/httpd/hosting.tpl +++ b/install/rhel/7/templates/web/httpd/hosting.tpl @@ -14,15 +14,16 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All diff --git a/install/rhel/7/templates/web/httpd/phpcgi.stpl b/install/rhel/7/templates/web/httpd/phpcgi.stpl old mode 100755 new mode 100644 index 924e869e..1f7b3547 --- a/install/rhel/7/templates/web/httpd/phpcgi.stpl +++ b/install/rhel/7/templates/web/httpd/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/rhel/7/templates/web/httpd/phpcgi.tpl b/install/rhel/7/templates/web/httpd/phpcgi.tpl old mode 100755 new mode 100644 index bcefbfc4..c0ae6208 --- a/install/rhel/7/templates/web/httpd/phpcgi.tpl +++ b/install/rhel/7/templates/web/httpd/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/rhel/7/templates/web/httpd/phpfcgid.stpl b/install/rhel/7/templates/web/httpd/phpfcgid.stpl old mode 100755 new mode 100644 index 64bdb1b0..6d7e81df --- a/install/rhel/7/templates/web/httpd/phpfcgid.stpl +++ b/install/rhel/7/templates/web/httpd/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/rhel/7/templates/web/httpd/phpfcgid.tpl b/install/rhel/7/templates/web/httpd/phpfcgid.tpl old mode 100755 new mode 100644 index d48da5ee..79d26209 --- a/install/rhel/7/templates/web/httpd/phpfcgid.tpl +++ b/install/rhel/7/templates/web/httpd/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.stpl b/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.stpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.tpl b/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.tpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal.stpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal.stpl deleted file mode 100644 index 9a548439..00000000 --- a/install/rhel/7/templates/web/nginx/php-fpm/drupal.stpl +++ /dev/null @@ -1,101 +0,0 @@ -server { - listen %ip%:%web_ssl_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - ssl on; - ssl_certificate %ssl_pem%; - ssl_certificate_key %ssl_key%; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal.tpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal.tpl deleted file mode 100644 index 417762c1..00000000 --- a/install/rhel/7/templates/web/nginx/php-fpm/drupal.tpl +++ /dev/null @@ -1,98 +0,0 @@ -server { - listen %ip%:%web_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - # Very rarely should these ever be accessed outside of your lan - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal6.stpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal6.stpl new file mode 100644 index 00000000..62e67cc9 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal6.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal6.tpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal6.tpl new file mode 100644 index 00000000..52adf452 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal6.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/moodle.stpl b/install/rhel/7/templates/web/nginx/php-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/moodle.tpl b/install/rhel/7/templates/web/nginx/php-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/rhel/7/templates/web/nginx/php-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/rhel/7/templates/web/nginx/php-fpm/owncloud.stpl b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/owncloud.stpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl +++ b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/rhel/7/templates/web/php-fpm/no-php.tpl b/install/rhel/7/templates/web/php-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/rhel/7/templates/web/php-fpm/no-php.tpl +++ b/install/rhel/7/templates/web/php-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/rhel/7/vsftpd/vsftpd.conf b/install/rhel/7/vsftpd/vsftpd.conf index 4673c838..6e11268d 100644 --- a/install/rhel/7/vsftpd/vsftpd.conf +++ b/install/rhel/7/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -20,3 +21,4 @@ ascii_download_enable=YES pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/ubuntu/12.04/exim/exim4.conf.template b/install/ubuntu/12.04/exim/exim4.conf.template index 742f0409..f515fb18 100644 --- a/install/ubuntu/12.04/exim/exim4.conf.template +++ b/install/ubuntu/12.04/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen @@ -244,7 +244,7 @@ aliases: localuser_fwd_only: driver = accept transport = devnull - condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}} + condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/fwd_only}{true}{false}}}} localuser_spam: driver = accept diff --git a/install/ubuntu/12.04/firewall/ports.conf b/install/ubuntu/12.04/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/ubuntu/12.04/firewall/ports.conf +++ b/install/ubuntu/12.04/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/ubuntu/12.04/firewall/rules.conf b/install/ubuntu/12.04/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/ubuntu/12.04/firewall/rules.conf +++ b/install/ubuntu/12.04/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/ubuntu/12.04/nginx/nginx.conf b/install/ubuntu/12.04/nginx/nginx.conf index 1e29f1fc..ca692959 100644 --- a/install/ubuntu/12.04/nginx/nginx.conf +++ b/install/ubuntu/12.04/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/ubuntu/12.04/templates/web/apache2/basedir.stpl b/install/ubuntu/12.04/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 96de57af..dda3aa76 --- a/install/ubuntu/12.04/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/12.04/templates/web/apache2/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/12.04/templates/web/apache2/basedir.tpl b/install/ubuntu/12.04/templates/web/apache2/basedir.tpl old mode 100755 new mode 100644 index 07ec38c9..9449bc44 --- a/install/ubuntu/12.04/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/12.04/templates/web/apache2/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/12.04/templates/web/apache2/default.stpl b/install/ubuntu/12.04/templates/web/apache2/default.stpl old mode 100755 new mode 100644 index da523c13..269c0971 --- a/install/ubuntu/12.04/templates/web/apache2/default.stpl +++ b/install/ubuntu/12.04/templates/web/apache2/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/12.04/templates/web/apache2/default.tpl b/install/ubuntu/12.04/templates/web/apache2/default.tpl old mode 100755 new mode 100644 index b95c1ee3..c24b1279 --- a/install/ubuntu/12.04/templates/web/apache2/default.tpl +++ b/install/ubuntu/12.04/templates/web/apache2/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/12.04/templates/web/apache2/hosting.stpl b/install/ubuntu/12.04/templates/web/apache2/hosting.stpl old mode 100755 new mode 100644 index c1c91e22..627325e0 --- a/install/ubuntu/12.04/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/12.04/templates/web/apache2/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/ubuntu/12.04/templates/web/apache2/hosting.tpl b/install/ubuntu/12.04/templates/web/apache2/hosting.tpl old mode 100755 new mode 100644 index 8f3ec012..3e30d737 --- a/install/ubuntu/12.04/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/12.04/templates/web/apache2/hosting.tpl @@ -14,20 +14,20 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube RMode config RUidGid %user% %group% diff --git a/install/ubuntu/12.04/templates/web/apache2/phpcgi.stpl b/install/ubuntu/12.04/templates/web/apache2/phpcgi.stpl old mode 100755 new mode 100644 index 58c4baf9..aa807091 --- a/install/ubuntu/12.04/templates/web/apache2/phpcgi.stpl +++ b/install/ubuntu/12.04/templates/web/apache2/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/12.04/templates/web/apache2/phpcgi.tpl b/install/ubuntu/12.04/templates/web/apache2/phpcgi.tpl old mode 100755 new mode 100644 index 21be2cdd..fd603800 --- a/install/ubuntu/12.04/templates/web/apache2/phpcgi.tpl +++ b/install/ubuntu/12.04/templates/web/apache2/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/12.04/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/12.04/templates/web/apache2/phpfcgid.stpl old mode 100755 new mode 100644 index 20a58009..88cea0e6 --- a/install/ubuntu/12.04/templates/web/apache2/phpfcgid.stpl +++ b/install/ubuntu/12.04/templates/web/apache2/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/12.04/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/12.04/templates/web/apache2/phpfcgid.tpl old mode 100755 new mode 100644 index 72e7d8d4..335b9f62 --- a/install/ubuntu/12.04/templates/web/apache2/phpfcgid.tpl +++ b/install/ubuntu/12.04/templates/web/apache2/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.stpl +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.tpl +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.stpl deleted file mode 100644 index 9a548439..00000000 --- a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.stpl +++ /dev/null @@ -1,101 +0,0 @@ -server { - listen %ip%:%web_ssl_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - ssl on; - ssl_certificate %ssl_pem%; - ssl_certificate_key %ssl_key%; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.tpl deleted file mode 100644 index 417762c1..00000000 --- a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.tpl +++ /dev/null @@ -1,98 +0,0 @@ -server { - listen %ip%:%web_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - # Very rarely should these ever be accessed outside of your lan - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal6.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal6.stpl new file mode 100644 index 00000000..62e67cc9 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal6.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal6.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal6.tpl new file mode 100644 index 00000000..52adf452 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal6.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal7.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal7.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal8.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal8.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/moodle.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/moodle.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.stpl +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/12.04/vsftpd/vsftpd.conf b/install/ubuntu/12.04/vsftpd/vsftpd.conf index 0902899e..1ca1a992 100644 --- a/install/ubuntu/12.04/vsftpd/vsftpd.conf +++ b/install/ubuntu/12.04/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -22,3 +23,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/ubuntu/12.10/exim/exim4.conf.template b/install/ubuntu/12.10/exim/exim4.conf.template index 742f0409..f515fb18 100644 --- a/install/ubuntu/12.10/exim/exim4.conf.template +++ b/install/ubuntu/12.10/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen @@ -244,7 +244,7 @@ aliases: localuser_fwd_only: driver = accept transport = devnull - condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}} + condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/fwd_only}{true}{false}}}} localuser_spam: driver = accept diff --git a/install/ubuntu/12.10/firewall/ports.conf b/install/ubuntu/12.10/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/ubuntu/12.10/firewall/ports.conf +++ b/install/ubuntu/12.10/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/ubuntu/12.10/firewall/rules.conf b/install/ubuntu/12.10/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/ubuntu/12.10/firewall/rules.conf +++ b/install/ubuntu/12.10/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/ubuntu/12.10/nginx/nginx.conf b/install/ubuntu/12.10/nginx/nginx.conf index 1e29f1fc..ca692959 100644 --- a/install/ubuntu/12.10/nginx/nginx.conf +++ b/install/ubuntu/12.10/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/ubuntu/12.10/templates/web/apache2/basedir.stpl b/install/ubuntu/12.10/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 96de57af..dda3aa76 --- a/install/ubuntu/12.10/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/12.10/templates/web/apache2/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/12.10/templates/web/apache2/basedir.tpl b/install/ubuntu/12.10/templates/web/apache2/basedir.tpl old mode 100755 new mode 100644 index 07ec38c9..9449bc44 --- a/install/ubuntu/12.10/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/12.10/templates/web/apache2/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/12.10/templates/web/apache2/default.stpl b/install/ubuntu/12.10/templates/web/apache2/default.stpl old mode 100755 new mode 100644 index da523c13..269c0971 --- a/install/ubuntu/12.10/templates/web/apache2/default.stpl +++ b/install/ubuntu/12.10/templates/web/apache2/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/12.10/templates/web/apache2/default.tpl b/install/ubuntu/12.10/templates/web/apache2/default.tpl old mode 100755 new mode 100644 index b95c1ee3..c24b1279 --- a/install/ubuntu/12.10/templates/web/apache2/default.tpl +++ b/install/ubuntu/12.10/templates/web/apache2/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/12.10/templates/web/apache2/hosting.stpl b/install/ubuntu/12.10/templates/web/apache2/hosting.stpl old mode 100755 new mode 100644 index c1c91e22..627325e0 --- a/install/ubuntu/12.10/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/12.10/templates/web/apache2/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/ubuntu/12.10/templates/web/apache2/hosting.tpl b/install/ubuntu/12.10/templates/web/apache2/hosting.tpl old mode 100755 new mode 100644 index 8f3ec012..3e30d737 --- a/install/ubuntu/12.10/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/12.10/templates/web/apache2/hosting.tpl @@ -14,20 +14,20 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube RMode config RUidGid %user% %group% diff --git a/install/ubuntu/12.10/templates/web/apache2/phpcgi.stpl b/install/ubuntu/12.10/templates/web/apache2/phpcgi.stpl old mode 100755 new mode 100644 index 58c4baf9..aa807091 --- a/install/ubuntu/12.10/templates/web/apache2/phpcgi.stpl +++ b/install/ubuntu/12.10/templates/web/apache2/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/12.10/templates/web/apache2/phpcgi.tpl b/install/ubuntu/12.10/templates/web/apache2/phpcgi.tpl old mode 100755 new mode 100644 index 21be2cdd..fd603800 --- a/install/ubuntu/12.10/templates/web/apache2/phpcgi.tpl +++ b/install/ubuntu/12.10/templates/web/apache2/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/12.10/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/12.10/templates/web/apache2/phpfcgid.stpl old mode 100755 new mode 100644 index 20a58009..88cea0e6 --- a/install/ubuntu/12.10/templates/web/apache2/phpfcgid.stpl +++ b/install/ubuntu/12.10/templates/web/apache2/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/12.10/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/12.10/templates/web/apache2/phpfcgid.tpl old mode 100755 new mode 100644 index 72e7d8d4..335b9f62 --- a/install/ubuntu/12.10/templates/web/apache2/phpfcgid.tpl +++ b/install/ubuntu/12.10/templates/web/apache2/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.stpl +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.tpl +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.stpl deleted file mode 100644 index 9a548439..00000000 --- a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.stpl +++ /dev/null @@ -1,101 +0,0 @@ -server { - listen %ip%:%web_ssl_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - ssl on; - ssl_certificate %ssl_pem%; - ssl_certificate_key %ssl_key%; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.tpl deleted file mode 100644 index 417762c1..00000000 --- a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.tpl +++ /dev/null @@ -1,98 +0,0 @@ -server { - listen %ip%:%web_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - # Very rarely should these ever be accessed outside of your lan - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal6.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal6.stpl new file mode 100644 index 00000000..62e67cc9 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal6.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal6.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal6.tpl new file mode 100644 index 00000000..52adf452 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal6.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal7.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal7.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal8.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal8.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/moodle.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/moodle.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.stpl +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/12.10/vsftpd/vsftpd.conf b/install/ubuntu/12.10/vsftpd/vsftpd.conf index 0902899e..1ca1a992 100644 --- a/install/ubuntu/12.10/vsftpd/vsftpd.conf +++ b/install/ubuntu/12.10/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -22,3 +23,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/ubuntu/13.04/exim/exim4.conf.template b/install/ubuntu/13.04/exim/exim4.conf.template index 742f0409..f515fb18 100644 --- a/install/ubuntu/13.04/exim/exim4.conf.template +++ b/install/ubuntu/13.04/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen @@ -244,7 +244,7 @@ aliases: localuser_fwd_only: driver = accept transport = devnull - condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}} + condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/fwd_only}{true}{false}}}} localuser_spam: driver = accept diff --git a/install/ubuntu/13.04/firewall/ports.conf b/install/ubuntu/13.04/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/ubuntu/13.04/firewall/ports.conf +++ b/install/ubuntu/13.04/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/ubuntu/13.04/firewall/rules.conf b/install/ubuntu/13.04/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/ubuntu/13.04/firewall/rules.conf +++ b/install/ubuntu/13.04/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/ubuntu/13.04/nginx/nginx.conf b/install/ubuntu/13.04/nginx/nginx.conf index 1e29f1fc..828b028d 100644 --- a/install/ubuntu/13.04/nginx/nginx.conf +++ b/install/ubuntu/13.04/nginx/nginx.conf @@ -51,7 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; application/x-javascript application/javascript; gzip_proxied any; diff --git a/install/ubuntu/13.04/templates/web/apache2/basedir.stpl b/install/ubuntu/13.04/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 96de57af..dda3aa76 --- a/install/ubuntu/13.04/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/13.04/templates/web/apache2/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/13.04/templates/web/apache2/basedir.tpl b/install/ubuntu/13.04/templates/web/apache2/basedir.tpl old mode 100755 new mode 100644 index 07ec38c9..9449bc44 --- a/install/ubuntu/13.04/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/13.04/templates/web/apache2/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/13.04/templates/web/apache2/default.stpl b/install/ubuntu/13.04/templates/web/apache2/default.stpl old mode 100755 new mode 100644 index da523c13..269c0971 --- a/install/ubuntu/13.04/templates/web/apache2/default.stpl +++ b/install/ubuntu/13.04/templates/web/apache2/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/13.04/templates/web/apache2/default.tpl b/install/ubuntu/13.04/templates/web/apache2/default.tpl old mode 100755 new mode 100644 index b95c1ee3..c24b1279 --- a/install/ubuntu/13.04/templates/web/apache2/default.tpl +++ b/install/ubuntu/13.04/templates/web/apache2/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/13.04/templates/web/apache2/hosting.stpl b/install/ubuntu/13.04/templates/web/apache2/hosting.stpl old mode 100755 new mode 100644 index c1c91e22..ce0763ae --- a/install/ubuntu/13.04/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/13.04/templates/web/apache2/hosting.stpl @@ -15,15 +15,16 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All diff --git a/install/ubuntu/13.04/templates/web/apache2/hosting.tpl b/install/ubuntu/13.04/templates/web/apache2/hosting.tpl old mode 100755 new mode 100644 index 8f3ec012..f3491a5f --- a/install/ubuntu/13.04/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/13.04/templates/web/apache2/hosting.tpl @@ -14,15 +14,16 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All diff --git a/install/ubuntu/13.04/templates/web/apache2/phpcgi.stpl b/install/ubuntu/13.04/templates/web/apache2/phpcgi.stpl old mode 100755 new mode 100644 index 58c4baf9..aa807091 --- a/install/ubuntu/13.04/templates/web/apache2/phpcgi.stpl +++ b/install/ubuntu/13.04/templates/web/apache2/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/13.04/templates/web/apache2/phpcgi.tpl b/install/ubuntu/13.04/templates/web/apache2/phpcgi.tpl old mode 100755 new mode 100644 index 21be2cdd..fd603800 --- a/install/ubuntu/13.04/templates/web/apache2/phpcgi.tpl +++ b/install/ubuntu/13.04/templates/web/apache2/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/13.04/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/13.04/templates/web/apache2/phpfcgid.stpl old mode 100755 new mode 100644 index 20a58009..88cea0e6 --- a/install/ubuntu/13.04/templates/web/apache2/phpfcgid.stpl +++ b/install/ubuntu/13.04/templates/web/apache2/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/13.04/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/13.04/templates/web/apache2/phpfcgid.tpl old mode 100755 new mode 100644 index 72e7d8d4..335b9f62 --- a/install/ubuntu/13.04/templates/web/apache2/phpfcgid.tpl +++ b/install/ubuntu/13.04/templates/web/apache2/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.stpl +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.tpl +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.stpl deleted file mode 100644 index 9a548439..00000000 --- a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.stpl +++ /dev/null @@ -1,101 +0,0 @@ -server { - listen %ip%:%web_ssl_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - ssl on; - ssl_certificate %ssl_pem%; - ssl_certificate_key %ssl_key%; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.tpl deleted file mode 100644 index 417762c1..00000000 --- a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.tpl +++ /dev/null @@ -1,98 +0,0 @@ -server { - listen %ip%:%web_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - # Very rarely should these ever be accessed outside of your lan - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal6.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal6.stpl new file mode 100644 index 00000000..62e67cc9 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal6.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal6.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal6.tpl new file mode 100644 index 00000000..52adf452 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal6.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal7.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal7.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal8.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal8.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/moodle.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/moodle.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.stpl +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/13.04/vsftpd/vsftpd.conf b/install/ubuntu/13.04/vsftpd/vsftpd.conf index 0902899e..1ca1a992 100644 --- a/install/ubuntu/13.04/vsftpd/vsftpd.conf +++ b/install/ubuntu/13.04/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -22,3 +23,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/ubuntu/13.10/exim/exim4.conf.template b/install/ubuntu/13.10/exim/exim4.conf.template index 742f0409..f515fb18 100644 --- a/install/ubuntu/13.10/exim/exim4.conf.template +++ b/install/ubuntu/13.10/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen @@ -244,7 +244,7 @@ aliases: localuser_fwd_only: driver = accept transport = devnull - condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}} + condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/fwd_only}{true}{false}}}} localuser_spam: driver = accept diff --git a/install/ubuntu/13.10/firewall/ports.conf b/install/ubuntu/13.10/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/ubuntu/13.10/firewall/ports.conf +++ b/install/ubuntu/13.10/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/ubuntu/13.10/firewall/rules.conf b/install/ubuntu/13.10/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/ubuntu/13.10/firewall/rules.conf +++ b/install/ubuntu/13.10/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/ubuntu/13.10/nginx/nginx.conf b/install/ubuntu/13.10/nginx/nginx.conf index 1e29f1fc..ca692959 100644 --- a/install/ubuntu/13.10/nginx/nginx.conf +++ b/install/ubuntu/13.10/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/ubuntu/13.10/templates/web/apache2/basedir.stpl b/install/ubuntu/13.10/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e699..d978d4c4 --- a/install/ubuntu/13.10/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/13.10/templates/web/apache2/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/13.10/templates/web/apache2/basedir.tpl b/install/ubuntu/13.10/templates/web/apache2/basedir.tpl old mode 100755 new mode 100644 index 75daf0e1..96c94a1b --- a/install/ubuntu/13.10/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/13.10/templates/web/apache2/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/13.10/templates/web/apache2/default.stpl b/install/ubuntu/13.10/templates/web/apache2/default.stpl old mode 100755 new mode 100644 index e884a95b..a7faa721 --- a/install/ubuntu/13.10/templates/web/apache2/default.stpl +++ b/install/ubuntu/13.10/templates/web/apache2/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/13.10/templates/web/apache2/default.tpl b/install/ubuntu/13.10/templates/web/apache2/default.tpl old mode 100755 new mode 100644 index 073724ce..3a227015 --- a/install/ubuntu/13.10/templates/web/apache2/default.tpl +++ b/install/ubuntu/13.10/templates/web/apache2/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/13.10/templates/web/apache2/hosting.stpl b/install/ubuntu/13.10/templates/web/apache2/hosting.stpl old mode 100755 new mode 100644 index 7a5d7787..8892072b --- a/install/ubuntu/13.10/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/13.10/templates/web/apache2/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/ubuntu/13.10/templates/web/apache2/hosting.tpl b/install/ubuntu/13.10/templates/web/apache2/hosting.tpl old mode 100755 new mode 100644 index ab844dc7..1eb26910 --- a/install/ubuntu/13.10/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/13.10/templates/web/apache2/hosting.tpl @@ -14,20 +14,20 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube RMode config RUidGid %user% %group% diff --git a/install/ubuntu/13.10/templates/web/apache2/phpcgi.stpl b/install/ubuntu/13.10/templates/web/apache2/phpcgi.stpl old mode 100755 new mode 100644 index aa513730..731355bc --- a/install/ubuntu/13.10/templates/web/apache2/phpcgi.stpl +++ b/install/ubuntu/13.10/templates/web/apache2/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/13.10/templates/web/apache2/phpcgi.tpl b/install/ubuntu/13.10/templates/web/apache2/phpcgi.tpl old mode 100755 new mode 100644 index a05ff252..c6796d29 --- a/install/ubuntu/13.10/templates/web/apache2/phpcgi.tpl +++ b/install/ubuntu/13.10/templates/web/apache2/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/13.10/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/13.10/templates/web/apache2/phpfcgid.stpl old mode 100755 new mode 100644 index 62249575..156c8a91 --- a/install/ubuntu/13.10/templates/web/apache2/phpfcgid.stpl +++ b/install/ubuntu/13.10/templates/web/apache2/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/13.10/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/13.10/templates/web/apache2/phpfcgid.tpl old mode 100755 new mode 100644 index 5c1f16e2..a4c01269 --- a/install/ubuntu/13.10/templates/web/apache2/phpfcgid.tpl +++ b/install/ubuntu/13.10/templates/web/apache2/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.stpl +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.tpl +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.stpl deleted file mode 100644 index 9a548439..00000000 --- a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.stpl +++ /dev/null @@ -1,101 +0,0 @@ -server { - listen %ip%:%web_ssl_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - ssl on; - ssl_certificate %ssl_pem%; - ssl_certificate_key %ssl_key%; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.tpl deleted file mode 100644 index 417762c1..00000000 --- a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.tpl +++ /dev/null @@ -1,98 +0,0 @@ -server { - listen %ip%:%web_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - # Very rarely should these ever be accessed outside of your lan - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal6.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal6.stpl new file mode 100644 index 00000000..62e67cc9 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal6.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal6.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal6.tpl new file mode 100644 index 00000000..52adf452 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal6.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal7.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal7.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal8.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal8.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/moodle.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/moodle.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.stpl +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/13.10/vsftpd/vsftpd.conf b/install/ubuntu/13.10/vsftpd/vsftpd.conf index 0902899e..1ca1a992 100644 --- a/install/ubuntu/13.10/vsftpd/vsftpd.conf +++ b/install/ubuntu/13.10/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -22,3 +23,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/ubuntu/14.04/exim/exim4.conf.template b/install/ubuntu/14.04/exim/exim4.conf.template index 742f0409..f515fb18 100644 --- a/install/ubuntu/14.04/exim/exim4.conf.template +++ b/install/ubuntu/14.04/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen @@ -244,7 +244,7 @@ aliases: localuser_fwd_only: driver = accept transport = devnull - condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}} + condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/fwd_only}{true}{false}}}} localuser_spam: driver = accept diff --git a/install/ubuntu/14.04/firewall/ports.conf b/install/ubuntu/14.04/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/ubuntu/14.04/firewall/ports.conf +++ b/install/ubuntu/14.04/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/ubuntu/14.04/firewall/rules.conf b/install/ubuntu/14.04/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/ubuntu/14.04/firewall/rules.conf +++ b/install/ubuntu/14.04/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/ubuntu/14.04/nginx/nginx.conf b/install/ubuntu/14.04/nginx/nginx.conf index 1e29f1fc..ca692959 100644 --- a/install/ubuntu/14.04/nginx/nginx.conf +++ b/install/ubuntu/14.04/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/ubuntu/14.04/templates/web/apache2/basedir.stpl b/install/ubuntu/14.04/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e699..d978d4c4 --- a/install/ubuntu/14.04/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/14.04/templates/web/apache2/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/14.04/templates/web/apache2/basedir.tpl b/install/ubuntu/14.04/templates/web/apache2/basedir.tpl old mode 100755 new mode 100644 index 75daf0e1..96c94a1b --- a/install/ubuntu/14.04/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/14.04/templates/web/apache2/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/14.04/templates/web/apache2/default.stpl b/install/ubuntu/14.04/templates/web/apache2/default.stpl old mode 100755 new mode 100644 index e884a95b..a7faa721 --- a/install/ubuntu/14.04/templates/web/apache2/default.stpl +++ b/install/ubuntu/14.04/templates/web/apache2/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/14.04/templates/web/apache2/default.tpl b/install/ubuntu/14.04/templates/web/apache2/default.tpl old mode 100755 new mode 100644 index 073724ce..3a227015 --- a/install/ubuntu/14.04/templates/web/apache2/default.tpl +++ b/install/ubuntu/14.04/templates/web/apache2/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/14.04/templates/web/apache2/hosting.stpl b/install/ubuntu/14.04/templates/web/apache2/hosting.stpl old mode 100755 new mode 100644 index 7a5d7787..8892072b --- a/install/ubuntu/14.04/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/14.04/templates/web/apache2/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/ubuntu/14.04/templates/web/apache2/hosting.tpl b/install/ubuntu/14.04/templates/web/apache2/hosting.tpl old mode 100755 new mode 100644 index ab844dc7..1eb26910 --- a/install/ubuntu/14.04/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/14.04/templates/web/apache2/hosting.tpl @@ -14,20 +14,20 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube RMode config RUidGid %user% %group% diff --git a/install/ubuntu/14.04/templates/web/apache2/phpcgi.stpl b/install/ubuntu/14.04/templates/web/apache2/phpcgi.stpl old mode 100755 new mode 100644 index aa513730..731355bc --- a/install/ubuntu/14.04/templates/web/apache2/phpcgi.stpl +++ b/install/ubuntu/14.04/templates/web/apache2/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/14.04/templates/web/apache2/phpcgi.tpl b/install/ubuntu/14.04/templates/web/apache2/phpcgi.tpl old mode 100755 new mode 100644 index a05ff252..c6796d29 --- a/install/ubuntu/14.04/templates/web/apache2/phpcgi.tpl +++ b/install/ubuntu/14.04/templates/web/apache2/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/14.04/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/14.04/templates/web/apache2/phpfcgid.stpl old mode 100755 new mode 100644 index 62249575..156c8a91 --- a/install/ubuntu/14.04/templates/web/apache2/phpfcgid.stpl +++ b/install/ubuntu/14.04/templates/web/apache2/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/14.04/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/14.04/templates/web/apache2/phpfcgid.tpl old mode 100755 new mode 100644 index 5c1f16e2..a4c01269 --- a/install/ubuntu/14.04/templates/web/apache2/phpfcgid.tpl +++ b/install/ubuntu/14.04/templates/web/apache2/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.stpl +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.tpl +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.stpl deleted file mode 100644 index 9a548439..00000000 --- a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.stpl +++ /dev/null @@ -1,101 +0,0 @@ -server { - listen %ip%:%web_ssl_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - ssl on; - ssl_certificate %ssl_pem%; - ssl_certificate_key %ssl_key%; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.tpl deleted file mode 100644 index 417762c1..00000000 --- a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.tpl +++ /dev/null @@ -1,98 +0,0 @@ -server { - listen %ip%:%web_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - # Very rarely should these ever be accessed outside of your lan - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal6.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal6.stpl new file mode 100644 index 00000000..62e67cc9 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal6.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal6.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal6.tpl new file mode 100644 index 00000000..52adf452 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal6.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal7.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal7.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal8.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal8.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/moodle.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/moodle.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.stpl +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/14.04/vsftpd/vsftpd.conf b/install/ubuntu/14.04/vsftpd/vsftpd.conf index 0902899e..1ca1a992 100644 --- a/install/ubuntu/14.04/vsftpd/vsftpd.conf +++ b/install/ubuntu/14.04/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -22,3 +23,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/ubuntu/14.10/exim/exim4.conf.template b/install/ubuntu/14.10/exim/exim4.conf.template index 742f0409..f515fb18 100644 --- a/install/ubuntu/14.10/exim/exim4.conf.template +++ b/install/ubuntu/14.10/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen @@ -244,7 +244,7 @@ aliases: localuser_fwd_only: driver = accept transport = devnull - condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}} + condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/fwd_only}{true}{false}}}} localuser_spam: driver = accept diff --git a/install/ubuntu/14.10/firewall/ports.conf b/install/ubuntu/14.10/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/ubuntu/14.10/firewall/ports.conf +++ b/install/ubuntu/14.10/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/ubuntu/14.10/firewall/rules.conf b/install/ubuntu/14.10/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/ubuntu/14.10/firewall/rules.conf +++ b/install/ubuntu/14.10/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/ubuntu/14.10/nginx/nginx.conf b/install/ubuntu/14.10/nginx/nginx.conf index 1e29f1fc..ca692959 100644 --- a/install/ubuntu/14.10/nginx/nginx.conf +++ b/install/ubuntu/14.10/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/ubuntu/14.10/templates/web/apache2/basedir.stpl b/install/ubuntu/14.10/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e699..d978d4c4 --- a/install/ubuntu/14.10/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/14.10/templates/web/apache2/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/14.10/templates/web/apache2/basedir.tpl b/install/ubuntu/14.10/templates/web/apache2/basedir.tpl old mode 100755 new mode 100644 index 75daf0e1..96c94a1b --- a/install/ubuntu/14.10/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/14.10/templates/web/apache2/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/14.10/templates/web/apache2/default.stpl b/install/ubuntu/14.10/templates/web/apache2/default.stpl old mode 100755 new mode 100644 index e884a95b..a7faa721 --- a/install/ubuntu/14.10/templates/web/apache2/default.stpl +++ b/install/ubuntu/14.10/templates/web/apache2/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/14.10/templates/web/apache2/default.tpl b/install/ubuntu/14.10/templates/web/apache2/default.tpl old mode 100755 new mode 100644 index 073724ce..3a227015 --- a/install/ubuntu/14.10/templates/web/apache2/default.tpl +++ b/install/ubuntu/14.10/templates/web/apache2/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/14.10/templates/web/apache2/hosting.stpl b/install/ubuntu/14.10/templates/web/apache2/hosting.stpl old mode 100755 new mode 100644 index 7a5d7787..8892072b --- a/install/ubuntu/14.10/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/14.10/templates/web/apache2/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/ubuntu/14.10/templates/web/apache2/hosting.tpl b/install/ubuntu/14.10/templates/web/apache2/hosting.tpl old mode 100755 new mode 100644 index ab844dc7..1eb26910 --- a/install/ubuntu/14.10/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/14.10/templates/web/apache2/hosting.tpl @@ -14,20 +14,20 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube RMode config RUidGid %user% %group% diff --git a/install/ubuntu/14.10/templates/web/apache2/phpcgi.stpl b/install/ubuntu/14.10/templates/web/apache2/phpcgi.stpl old mode 100755 new mode 100644 index aa513730..731355bc --- a/install/ubuntu/14.10/templates/web/apache2/phpcgi.stpl +++ b/install/ubuntu/14.10/templates/web/apache2/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/14.10/templates/web/apache2/phpcgi.tpl b/install/ubuntu/14.10/templates/web/apache2/phpcgi.tpl old mode 100755 new mode 100644 index a05ff252..c6796d29 --- a/install/ubuntu/14.10/templates/web/apache2/phpcgi.tpl +++ b/install/ubuntu/14.10/templates/web/apache2/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/14.10/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/14.10/templates/web/apache2/phpfcgid.stpl old mode 100755 new mode 100644 index 62249575..156c8a91 --- a/install/ubuntu/14.10/templates/web/apache2/phpfcgid.stpl +++ b/install/ubuntu/14.10/templates/web/apache2/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/14.10/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/14.10/templates/web/apache2/phpfcgid.tpl old mode 100755 new mode 100644 index 5c1f16e2..a4c01269 --- a/install/ubuntu/14.10/templates/web/apache2/phpfcgid.tpl +++ b/install/ubuntu/14.10/templates/web/apache2/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.stpl +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.tpl +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.stpl deleted file mode 100644 index 9a548439..00000000 --- a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.stpl +++ /dev/null @@ -1,101 +0,0 @@ -server { - listen %ip%:%web_ssl_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - ssl on; - ssl_certificate %ssl_pem%; - ssl_certificate_key %ssl_key%; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.tpl deleted file mode 100644 index 417762c1..00000000 --- a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.tpl +++ /dev/null @@ -1,98 +0,0 @@ -server { - listen %ip%:%web_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - # Very rarely should these ever be accessed outside of your lan - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal6.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal6.stpl new file mode 100644 index 00000000..62e67cc9 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal6.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal6.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal6.tpl new file mode 100644 index 00000000..52adf452 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal6.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal7.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal7.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal8.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal8.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/moodle.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/moodle.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.stpl +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/14.10/vsftpd/vsftpd.conf b/install/ubuntu/14.10/vsftpd/vsftpd.conf index 0902899e..1ca1a992 100644 --- a/install/ubuntu/14.10/vsftpd/vsftpd.conf +++ b/install/ubuntu/14.10/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -22,3 +23,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/ubuntu/15.04/exim/exim4.conf.template b/install/ubuntu/15.04/exim/exim4.conf.template index 742f0409..f515fb18 100644 --- a/install/ubuntu/15.04/exim/exim4.conf.template +++ b/install/ubuntu/15.04/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen @@ -244,7 +244,7 @@ aliases: localuser_fwd_only: driver = accept transport = devnull - condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}} + condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/fwd_only}{true}{false}}}} localuser_spam: driver = accept diff --git a/install/ubuntu/15.04/firewall/ports.conf b/install/ubuntu/15.04/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/ubuntu/15.04/firewall/ports.conf +++ b/install/ubuntu/15.04/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/ubuntu/15.04/firewall/rules.conf b/install/ubuntu/15.04/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/ubuntu/15.04/firewall/rules.conf +++ b/install/ubuntu/15.04/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/ubuntu/15.04/nginx/nginx.conf b/install/ubuntu/15.04/nginx/nginx.conf index 1e29f1fc..ca692959 100644 --- a/install/ubuntu/15.04/nginx/nginx.conf +++ b/install/ubuntu/15.04/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/ubuntu/15.04/templates/web/apache2/basedir.stpl b/install/ubuntu/15.04/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e699..d978d4c4 --- a/install/ubuntu/15.04/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/15.04/templates/web/apache2/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/15.04/templates/web/apache2/basedir.tpl b/install/ubuntu/15.04/templates/web/apache2/basedir.tpl old mode 100755 new mode 100644 index 75daf0e1..96c94a1b --- a/install/ubuntu/15.04/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/15.04/templates/web/apache2/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/15.04/templates/web/apache2/default.stpl b/install/ubuntu/15.04/templates/web/apache2/default.stpl old mode 100755 new mode 100644 index e884a95b..a7faa721 --- a/install/ubuntu/15.04/templates/web/apache2/default.stpl +++ b/install/ubuntu/15.04/templates/web/apache2/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/15.04/templates/web/apache2/default.tpl b/install/ubuntu/15.04/templates/web/apache2/default.tpl old mode 100755 new mode 100644 index 073724ce..3a227015 --- a/install/ubuntu/15.04/templates/web/apache2/default.tpl +++ b/install/ubuntu/15.04/templates/web/apache2/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/15.04/templates/web/apache2/hosting.stpl b/install/ubuntu/15.04/templates/web/apache2/hosting.stpl old mode 100755 new mode 100644 index 7a5d7787..8892072b --- a/install/ubuntu/15.04/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/15.04/templates/web/apache2/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/ubuntu/15.04/templates/web/apache2/hosting.tpl b/install/ubuntu/15.04/templates/web/apache2/hosting.tpl old mode 100755 new mode 100644 index ab844dc7..1eb26910 --- a/install/ubuntu/15.04/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/15.04/templates/web/apache2/hosting.tpl @@ -14,20 +14,20 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube RMode config RUidGid %user% %group% diff --git a/install/ubuntu/15.04/templates/web/apache2/phpcgi.stpl b/install/ubuntu/15.04/templates/web/apache2/phpcgi.stpl old mode 100755 new mode 100644 index aa513730..731355bc --- a/install/ubuntu/15.04/templates/web/apache2/phpcgi.stpl +++ b/install/ubuntu/15.04/templates/web/apache2/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/15.04/templates/web/apache2/phpcgi.tpl b/install/ubuntu/15.04/templates/web/apache2/phpcgi.tpl old mode 100755 new mode 100644 index a05ff252..c6796d29 --- a/install/ubuntu/15.04/templates/web/apache2/phpcgi.tpl +++ b/install/ubuntu/15.04/templates/web/apache2/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/15.04/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/15.04/templates/web/apache2/phpfcgid.stpl old mode 100755 new mode 100644 index 62249575..156c8a91 --- a/install/ubuntu/15.04/templates/web/apache2/phpfcgid.stpl +++ b/install/ubuntu/15.04/templates/web/apache2/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/15.04/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/15.04/templates/web/apache2/phpfcgid.tpl old mode 100755 new mode 100644 index 5c1f16e2..a4c01269 --- a/install/ubuntu/15.04/templates/web/apache2/phpfcgid.tpl +++ b/install/ubuntu/15.04/templates/web/apache2/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.stpl +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.tpl +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.stpl deleted file mode 100644 index 9a548439..00000000 --- a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.stpl +++ /dev/null @@ -1,101 +0,0 @@ -server { - listen %ip%:%web_ssl_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - ssl on; - ssl_certificate %ssl_pem%; - ssl_certificate_key %ssl_key%; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.tpl deleted file mode 100644 index 417762c1..00000000 --- a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.tpl +++ /dev/null @@ -1,98 +0,0 @@ -server { - listen %ip%:%web_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - # Very rarely should these ever be accessed outside of your lan - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal6.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal6.stpl new file mode 100644 index 00000000..62e67cc9 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal6.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal6.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal6.tpl new file mode 100644 index 00000000..52adf452 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal6.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal7.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal7.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal8.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal8.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/moodle.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/moodle.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.stpl +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/15.04/vsftpd/vsftpd.conf b/install/ubuntu/15.04/vsftpd/vsftpd.conf index 0902899e..1ca1a992 100644 --- a/install/ubuntu/15.04/vsftpd/vsftpd.conf +++ b/install/ubuntu/15.04/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -22,3 +23,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/ubuntu/15.10/exim/exim4.conf.template b/install/ubuntu/15.10/exim/exim4.conf.template index 742f0409..f515fb18 100644 --- a/install/ubuntu/15.10/exim/exim4.conf.template +++ b/install/ubuntu/15.10/exim/exim4.conf.template @@ -227,7 +227,7 @@ procmail: autoreplay: driver = accept require_files = /etc/exim4/domains/$domain/autoreply.${local_part}.msg - condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}}{yes}{no}} + condition = ${if exists{/etc/exim4/domains/$domain/autoreply.${local_part}.msg}{yes}{no}} retry_use_local_part transport = userautoreply unseen @@ -244,7 +244,7 @@ aliases: localuser_fwd_only: driver = accept transport = devnull - condition = ${if exists{/etc/exim/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim/domains/$domain/fwd_only}{true}{false}}}} + condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/fwd_only}{true}{false}}}} localuser_spam: driver = accept diff --git a/install/ubuntu/15.10/firewall/ports.conf b/install/ubuntu/15.10/firewall/ports.conf index a6ef4dae..b730d012 100644 --- a/install/ubuntu/15.10/firewall/ports.conf +++ b/install/ubuntu/15.10/firewall/ports.conf @@ -2,6 +2,7 @@ PROTOCOL='TCP' PORT='20' PROTOCOL='TCP' PORT='21' PROTOCOL='TCP' PORT='22' PROTOCOL='TCP' PORT='25' +PROTOCOL='TCP' PORT='53' PROTOCOL='UDP' PORT='53' PROTOCOL='TCP' PORT='80' PROTOCOL='TCP' PORT='443' diff --git a/install/ubuntu/15.10/firewall/rules.conf b/install/ubuntu/15.10/firewall/rules.conf index 956c2e1d..fba98e1e 100644 --- a/install/ubuntu/15.10/firewall/rules.conf +++ b/install/ubuntu/15.10/firewall/rules.conf @@ -4,7 +4,8 @@ RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='3306,5432' IP='0.0.0.0/0' COMMENT= RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='6' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587,2525' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='7' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='8' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' -RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' -RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' +RULE='7' ACTION='ACCEPT' PROTOCOL='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='9' ACTION='ACCEPT' PROTOCOL='TCP' PORT='21,12000-12100' IP='0.0.0.0/0' COMMENT='FTP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='10' ACTION='ACCEPT' PROTOCOL='TCP' PORT='80,443' IP='0.0.0.0/0' COMMENT='WEB' SUSPENDED='no' TIME='17:04:27' DATE='2014-09-24' +RULE='11' ACTION='ACCEPT' PROTOCOL='TCP' PORT='22' IP='0.0.0.0/0' COMMENT='SSH' SUSPENDED='no' TIME='17:14:41' DATE='2014-09-16' diff --git a/install/ubuntu/15.10/nginx/nginx.conf b/install/ubuntu/15.10/nginx/nginx.conf index 1e29f1fc..ca692959 100644 --- a/install/ubuntu/15.10/nginx/nginx.conf +++ b/install/ubuntu/15.10/nginx/nginx.conf @@ -51,8 +51,7 @@ http { gzip_comp_level 9; gzip_min_length 512; gzip_buffers 8 64k; - gzip_types text/plain text/css text/javascript - application/x-javascript application/javascript; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype; gzip_proxied any; diff --git a/install/ubuntu/15.10/templates/web/apache2/basedir.stpl b/install/ubuntu/15.10/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e699..d978d4c4 --- a/install/ubuntu/15.10/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/15.10/templates/web/apache2/basedir.stpl @@ -15,7 +15,10 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/15.10/templates/web/apache2/basedir.tpl b/install/ubuntu/15.10/templates/web/apache2/basedir.tpl old mode 100755 new mode 100644 index 75daf0e1..96c94a1b --- a/install/ubuntu/15.10/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/15.10/templates/web/apache2/basedir.tpl @@ -14,7 +14,10 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value open_basedir %docroot% + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" AllowOverride All diff --git a/install/ubuntu/15.10/templates/web/apache2/default.stpl b/install/ubuntu/15.10/templates/web/apache2/default.stpl old mode 100755 new mode 100644 index e884a95b..a7faa721 --- a/install/ubuntu/15.10/templates/web/apache2/default.stpl +++ b/install/ubuntu/15.10/templates/web/apache2/default.stpl @@ -15,6 +15,9 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/15.10/templates/web/apache2/default.tpl b/install/ubuntu/15.10/templates/web/apache2/default.tpl old mode 100755 new mode 100644 index 073724ce..3a227015 --- a/install/ubuntu/15.10/templates/web/apache2/default.tpl +++ b/install/ubuntu/15.10/templates/web/apache2/default.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp AllowOverride All diff --git a/install/ubuntu/15.10/templates/web/apache2/hosting.stpl b/install/ubuntu/15.10/templates/web/apache2/hosting.stpl old mode 100755 new mode 100644 index 7a5d7787..8892072b --- a/install/ubuntu/15.10/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/15.10/templates/web/apache2/hosting.stpl @@ -15,20 +15,20 @@ AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% diff --git a/install/ubuntu/15.10/templates/web/apache2/hosting.tpl b/install/ubuntu/15.10/templates/web/apache2/hosting.tpl old mode 100755 new mode 100644 index ab844dc7..1eb26910 --- a/install/ubuntu/15.10/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/15.10/templates/web/apache2/hosting.tpl @@ -14,20 +14,20 @@ AllowOverride All Options +Includes -Indexes +ExecCGI - php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value upload_max_filesize 10M php_admin_value max_execution_time 20 php_admin_value post_max_size 8M php_admin_value memory_limit 32M php_admin_flag mysql.allow_persistent off php_admin_flag safe_mode off + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%" + php_admin_value open_basedir %docroot%:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube + php_admin_value upload_tmp_dir %home%/%user%/tmp php_admin_value session.save_path %home%/%user%/tmp - php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f %email%' AllowOverride All - php_admin_value open_basedir %home%/%user%/web:%home%/%user%/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube RMode config RUidGid %user% %group% diff --git a/install/ubuntu/15.10/templates/web/apache2/phpcgi.stpl b/install/ubuntu/15.10/templates/web/apache2/phpcgi.stpl old mode 100755 new mode 100644 index aa513730..731355bc --- a/install/ubuntu/15.10/templates/web/apache2/phpcgi.stpl +++ b/install/ubuntu/15.10/templates/web/apache2/phpcgi.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/15.10/templates/web/apache2/phpcgi.tpl b/install/ubuntu/15.10/templates/web/apache2/phpcgi.tpl old mode 100755 new mode 100644 index a05ff252..c6796d29 --- a/install/ubuntu/15.10/templates/web/apache2/phpcgi.tpl +++ b/install/ubuntu/15.10/templates/web/apache2/phpcgi.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp Action phpcgi-script /cgi-bin/php SetHandler phpcgi-script diff --git a/install/ubuntu/15.10/templates/web/apache2/phpfcgid.stpl b/install/ubuntu/15.10/templates/web/apache2/phpfcgid.stpl old mode 100755 new mode 100644 index 62249575..156c8a91 --- a/install/ubuntu/15.10/templates/web/apache2/phpfcgid.stpl +++ b/install/ubuntu/15.10/templates/web/apache2/phpfcgid.stpl @@ -15,6 +15,9 @@ SSLRequireSSL AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/15.10/templates/web/apache2/phpfcgid.tpl b/install/ubuntu/15.10/templates/web/apache2/phpfcgid.tpl old mode 100755 new mode 100644 index 5c1f16e2..a4c01269 --- a/install/ubuntu/15.10/templates/web/apache2/phpfcgid.tpl +++ b/install/ubuntu/15.10/templates/web/apache2/phpfcgid.tpl @@ -14,6 +14,9 @@ AllowOverride All Options +Includes -Indexes +ExecCGI + php_admin_value open_basedir %docroot%:%home%/%user%/tmp + php_admin_value upload_tmp_dir %home%/%user%/tmp + php_admin_value session.save_path %home%/%user%/tmp SetHandler fcgid-script diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8..8acad089 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.stpl +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.stpl @@ -32,7 +32,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.tpl index 31647c9f..f3456aa7 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.tpl +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.tpl @@ -28,7 +28,7 @@ server { } } - location ^~ /lib/ { + location ~ ^/lib.*\.(gif|png|ico|jpg)$ { expires 30d; } diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.stpl deleted file mode 100644 index 9a548439..00000000 --- a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.stpl +++ /dev/null @@ -1,101 +0,0 @@ -server { - listen %ip%:%web_ssl_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - ssl on; - ssl_certificate %ssl_pem%; - ssl_certificate_key %ssl_key%; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.tpl deleted file mode 100644 index 417762c1..00000000 --- a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.tpl +++ /dev/null @@ -1,98 +0,0 @@ -server { - listen %ip%:%web_port%; - server_name %domain_idn% %alias_idn%; - root %docroot%; - index index.php index.html index.htm; - access_log /var/log/nginx/domains/%domain%.log combined; - access_log /var/log/nginx/domains/%domain%.bytes bytes; - error_log /var/log/nginx/domains/%domain%.error.log error; - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - # Very rarely should these ever be accessed outside of your lan - location ~* \.(txt|log)$ { - allow 192.168.0.0/16; - deny all; - } - - location ~ \..*/.*\.php$ { - return 403; - } - - # No no for private - location ~ ^/sites/.*/private/ { - return 403; - } - - # Block access to "hidden" files and directories whose names begin with a - # period. This includes directories used by version control systems such - # as Subversion or Git to store control files. - location ~ (^|/)\. { - return 403; - } - - location / { - try_files $uri @rewrite; - - location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { - expires max; - } - - location ~ [^/]\.php(/|$) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } - - fastcgi_pass %backend_lsnr%; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_intercept_errors on; - include /etc/nginx/fastcgi_params; - } - } - - location @rewrite { - # You have 2 options here - # For D7 and above: - # Clean URLs are handled in drupal_environment_initialize(). - rewrite ^ /index.php; - - # For Drupal 6 and bwlow: - # Some modules enforce no slash (/) at the end of the URL - # Else this rewrite block wouldn't be needed (GlobalRedirect) - #rewrite ^/(.*)$ /index.php?q=$1; - } - - location ~ ^/sites/.*/files/styles/ { - try_files $uri @rewrite; - } - - error_page 403 /error/404.html; - error_page 404 /error/404.html; - error_page 500 502 503 504 /error/50x.html; - - location /error/ { - alias %home%/%user%/web/%domain%/document_errors/; - } - - location ~* "/\.(htaccess|htpasswd)$" { - deny all; - return 404; - } - - include /etc/nginx/conf.d/phpmyadmin.inc*; - include /etc/nginx/conf.d/phppgadmin.inc*; - include /etc/nginx/conf.d/webmail.inc*; - - include %home%/%user%/conf/web/nginx.%domain%.conf*; -} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal6.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal6.stpl new file mode 100644 index 00000000..62e67cc9 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal6.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal6.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal6.tpl new file mode 100644 index 00000000..52adf452 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal6.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # For Drupal 6 and bwlow: + # Some modules enforce no slash (/) at the end of the URL + # Else this rewrite block wouldn't be needed (GlobalRedirect) + rewrite ^/(.*)$ /index.php?q=$1; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal7.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal7.stpl new file mode 100644 index 00000000..6ff87d84 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal7.stpl @@ -0,0 +1,96 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal7.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal7.tpl new file mode 100644 index 00000000..75719cd9 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal7.tpl @@ -0,0 +1,93 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal8.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 00000000..b334d481 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal8.stpl @@ -0,0 +1,97 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal8.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal8.tpl new file mode 100644 index 00000000..c927ab13 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal8.tpl @@ -0,0 +1,94 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + try_files $uri @rewrite; + + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$)|^/update.php { + fastcgi_split_path_info ^(.+?\.php)(|/.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + location @rewrite { + # You have 2 options here + # For D7 and above: + # Clean URLs are handled in drupal_environment_initialize(). + rewrite ^ /index.php; + } + + location ~ ^/sites/.*/files/styles/ { + try_files $uri @rewrite; + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/moodle.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 00000000..c67efe86 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/moodle.stpl @@ -0,0 +1,85 @@ +server { + listen %ip%:%web_ssl_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + ssl on; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/moodle.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/moodle.tpl new file mode 100644 index 00000000..0147c821 --- /dev/null +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/moodle.tpl @@ -0,0 +1,82 @@ +server { + listen %ip%:%web_port%; + server_name %domain_idn% %alias_idn%; + root %docroot%; + index index.php index.html index.htm; + access_log /var/log/nginx/domains/%domain%.log combined; + access_log /var/log/nginx/domains/%domain%.bytes bytes; + error_log /var/log/nginx/domains/%domain%.error.log error; + + rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + # Very rarely should these ever be accessed outside of your lan + location ~* \.(txt|log)$ { + allow 192.168.0.0/16; + deny all; + } + + location ~ \..*/.*\.php$ { + return 403; + } + + # No no for private + location ~ ^/sites/.*/private/ { + return 403; + } + + # Block access to "hidden" files and directories whose names begin with a + # period. This includes directories used by version control systems such + # as Subversion or Git to store control files. + location ~ (^|/)\. { + return 403; + } + + location / { + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { + expires max; + } + + location ~ [^/]\.php(/|$) { + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + fastcgi_pass %backend_lsnr%; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_intercept_errors on; + include /etc/nginx/fastcgi_params; + } + } + + error_page 403 /error/404.html; + error_page 404 /error/404.html; + error_page 500 502 503 504 /error/50x.html; + + location /error/ { + alias %home%/%user%/web/%domain%/document_errors/; + } + + location ~* "/\.(htaccess|htpasswd)$" { + deny all; + return 404; + } + + include /etc/nginx/conf.d/phpmyadmin.inc*; + include /etc/nginx/conf.d/phppgadmin.inc*; + include /etc/nginx/conf.d/webmail.inc*; + + include %home%/%user%/conf/web/nginx.%domain%.conf*; +} diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43..3d3b7547 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.stpl +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.stpl @@ -43,7 +43,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.tpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.tpl index 57cac2f8..2e898100 100644 --- a/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.tpl +++ b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.tpl @@ -39,7 +39,7 @@ server { try_files $uri $uri/ /index.php; location ~ \.php(?:$|/) { - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_split_path_info ^(.+\.php)(/.+)$; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl index 89487d5f..e677f3e9 100644 --- a/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl +++ b/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl @@ -1,13 +1,13 @@ -#[%backend%] -#user = %user% -#group = %user% -#listen = /dev/null +;[%backend%] +;user = %user% +;group = %user% +;listen = /dev/null -#listen.owner = %user% -#listen.group = nginx +;listen.owner = %user% +;listen.group = nginx -#pm = dynamic -#pm.max_children = 50 -#pm.start_servers = 3 -#pm.min_spare_servers = 2 -#pm.max_spare_servers = 10 +;pm = dynamic +;pm.max_children = 50 +;pm.start_servers = 3 +;pm.min_spare_servers = 2 +;pm.max_spare_servers = 10 diff --git a/install/ubuntu/15.10/vsftpd/vsftpd.conf b/install/ubuntu/15.10/vsftpd/vsftpd.conf index 0902899e..1ca1a992 100644 --- a/install/ubuntu/15.10/vsftpd/vsftpd.conf +++ b/install/ubuntu/15.10/vsftpd/vsftpd.conf @@ -1,7 +1,8 @@ anonymous_enable=NO local_enable=YES write_enable=YES -local_umask=002 +local_umask=022 +anon_umask=022 anon_upload_enable=NO dirmessage_enable=YES xferlog_enable=YES @@ -22,3 +23,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index 0c972c79..5dfb084f 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -13,7 +13,7 @@ VERSION='debian' memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9]) arch=$(uname -i) os='debian' -release=$(cat /etc/issue|grep -o [0-9]|head -n1) +release=$(cat /etc/debian_version|grep -o [0-9]|head -n1) codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))" vestacp="http://$CHOST/$VERSION/$release" @@ -380,6 +380,18 @@ if [ -z "$servername" ]; then servername=$(hostname -f) fi +# Set FQDN if it wasn't set +mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)' +mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}' +if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then + if [ ! -z "$servername" ]; then + servername="$servername.example.com" + else + servername="example.com" + fi + echo "127.0.0.1 $servername" >> /etc/hosts +fi + # Set email if it wasn't set if [ -z "$email" ]; then email="admin@$servername" @@ -644,7 +656,8 @@ wget $vestacp/logrotate/vesta -O /etc/logrotate.d/vesta # Building directory tree and creating some blank files for vesta mkdir -p $VESTA/conf $VESTA/log $VESTA/ssl $VESTA/data/ips \ - $VESTA/data/queue $VESTA/data/users $VESTA/data/firewall + $VESTA/data/queue $VESTA/data/users $VESTA/data/firewall \ + $VESTA/data/sessions touch $VESTA/data/queue/backup.pipe $VESTA/data/queue/disk.pipe \ $VESTA/data/queue/webstats.pipe $VESTA/data/queue/restart.pipe \ $VESTA/data/queue/traffic.pipe $VESTA/log/system.log \ @@ -654,6 +667,8 @@ chmod -R 750 $VESTA/data/queue chmod 660 $VESTA/log/* rm -f /var/log/vesta ln -s /usr/local/vesta/log /var/log/vesta +chown admin:admin $VESTA/data/sessions +chmod 770 $VESTA/data/sessions # Generating vesta configuration rm -f $VESTA/conf/vesta.conf 2>/dev/null @@ -1117,12 +1132,10 @@ $VESTA/bin/v-update-sys-ip ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/) # Get public ip -pub_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null) +pub_ip=$(curl -s vestacp.com/what-is-my-ip/) if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then $VESTA/bin/v-change-sys-ip-nat $ip $pub_ip -fi -if [ -z "$pub_ip" ]; then - ip=$main_ip + ip=$pub_ip fi # Firewall configuration @@ -1175,10 +1188,14 @@ fi update-rc.d vesta defaults service vesta start check_result $? "vesta start failed" +chown admin:admin $VESTA/data/sessions # Adding notifications $VESTA/upd/add_notifications.sh +# Adding cronjob for autoupdates +$VESTA/bin/v-add-cron-vesta-autoupdate + #----------------------------------------------------------# # Vesta Access Info # diff --git a/install/vst-install-rhel.sh b/install/vst-install-rhel.sh index 593043fb..db1903b2 100755 --- a/install/vst-install-rhel.sh +++ b/install/vst-install-rhel.sh @@ -380,6 +380,18 @@ if [ -z "$servername" ]; then servername=$(hostname -f) fi +# Set FQDN if it wasn't set +mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)' +mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}' +if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then + if [ ! -z "$servername" ]; then + servername="$servername.example.com" + else + servername="example.com" + fi + echo "127.0.0.1 $servername" >> /etc/hosts +fi + # Set email if it wasn't set if [ -z "$email" ]; then email="admin@$servername" @@ -424,6 +436,7 @@ check_result $? "Can't install EPEL repository" if [ "$remi" = 'yes' ]; then rpm -Uvh --force $vestacp/remi-release.rpm check_result $? "Can't install REMI repository" + sed -i "s/enabled=0/enabled=1/g" /etc/yum.repos.d/remi.repo fi # Installing Nginx repository @@ -593,7 +606,7 @@ fi # Installing rpm packages if [ -z "$disable_remi" ]; then - yum -y --disablerepo=* --enablerepo="base,updates,nginx,epel,vesta,remi" \ + yum -y --disablerepo=* --enablerepo="base,updates,nginx,epel,vesta,remi*"\ install $software else yum -y --disablerepo=* --enablerepo="base,updates,nginx,epel,vesta" \ @@ -677,7 +690,8 @@ wget $vestacp/logrotate/vesta -O /etc/logrotate.d/vesta # Buidling directory tree and creating some blank files for vesta mkdir -p $VESTA/conf $VESTA/log $VESTA/ssl $VESTA/data/ips \ - $VESTA/data/queue $VESTA/data/users $VESTA/data/firewall + $VESTA/data/queue $VESTA/data/users $VESTA/data/firewall \ + $VESTA/data/sessions touch $VESTA/data/queue/backup.pipe $VESTA/data/queue/disk.pipe \ $VESTA/data/queue/webstats.pipe $VESTA/data/queue/restart.pipe \ $VESTA/data/queue/traffic.pipe $VESTA/log/system.log \ @@ -687,6 +701,8 @@ chmod -R 750 $VESTA/data/queue chmod 660 $VESTA/log/* rm -f /var/log/vesta ln -s /usr/local/vesta/log /var/log/vesta +chown admin:admin $VESTA/data/sessions +chmod 770 $VESTA/data/sessions # Generating vesta configuration rm -f $VESTA/conf/vesta.conf 2>/dev/null @@ -1187,12 +1203,10 @@ $VESTA/bin/v-update-sys-ip ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/) # Get public ip -pub_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null) +pub_ip=$(curl -s vestacp.com/what-is-my-ip/) if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then $VESTA/bin/v-change-sys-ip-nat $ip $pub_ip -fi -if [ -z "$pub_ip" ]; then - ip=$main_ip + ip=$pub_ip fi # Firewall configuration @@ -1245,10 +1259,14 @@ fi chkconfig vesta on service vesta start check_result $? "vesta start failed" +chown admin:admin $VESTA/data/sessions # Adding notifications $VESTA/upd/add_notifications.sh +# Adding cronjob for autoupdates +$VESTA/bin/v-add-cron-vesta-autoupdate + #----------------------------------------------------------# # Vesta Access Info # diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh index 8a17a3ba..d71a4edc 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -365,6 +365,18 @@ if [ -z "$servername" ]; then servername=$(hostname -f) fi +# Set FQDN if it wasn't set +mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)' +mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}' +if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then + if [ ! -z "$servername" ]; then + servername="$servername.example.com" + else + servername="example.com" + fi + echo "127.0.0.1 $servername" >> /etc/hosts +fi + # Set email if it wasn't set if [ -z "$email" ]; then email="admin@$servername" @@ -636,7 +648,8 @@ wget $vestacp/logrotate/vesta -O /etc/logrotate.d/vesta # Buidling directory tree and creating some blank files for vesta mkdir -p $VESTA/conf $VESTA/log $VESTA/ssl $VESTA/data/ips \ - $VESTA/data/queue $VESTA/data/users $VESTA/data/firewall + $VESTA/data/queue $VESTA/data/users $VESTA/data/firewall \ + $VESTA/data/sessions touch $VESTA/data/queue/backup.pipe $VESTA/data/queue/disk.pipe \ $VESTA/data/queue/webstats.pipe $VESTA/data/queue/restart.pipe \ $VESTA/data/queue/traffic.pipe $VESTA/log/system.log \ @@ -646,6 +659,8 @@ chmod -R 750 $VESTA/data/queue chmod 660 $VESTA/log/* rm -f /var/log/vesta ln -s /usr/local/vesta/log /var/log/vesta +chown admin:admin $VESTA/data/sessions +chmod 770 $VESTA/data/sessions # Generating vesta configuration rm -f $VESTA/conf/vesta.conf 2>/dev/null @@ -1106,12 +1121,10 @@ $VESTA/bin/v-update-sys-ip ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/) # Get public ip -pub_ip=$(wget vestacp.com/what-is-my-ip/ -O - 2>/dev/null) +pub_ip=$(curl -s vestacp.com/what-is-my-ip/) if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then $VESTA/bin/v-change-sys-ip-nat $ip $pub_ip -fi -if [ -z "$pub_ip" ]; then - ip=$main_ip + ip=$pub_ip fi # Firewall configuration @@ -1164,10 +1177,14 @@ fi update-rc.d vesta defaults service vesta start check_result $? "vesta start failed" +chown admin:admin $VESTA/data/sessions # Adding notifications $VESTA/upd/add_notifications.sh +# Adding cronjob for autoupdates +$VESTA/bin/v-add-cron-vesta-autoupdate + #----------------------------------------------------------# # Vesta Access Info # diff --git a/install/vst-install.sh b/install/vst-install.sh index 9e05feea..63e6f4f8 100755 --- a/install/vst-install.sh +++ b/install/vst-install.sh @@ -44,6 +44,11 @@ case $(head -n1 /etc/issue | cut -f 1 -d ' ') in *) type="rhel" ;; esac +# Fallback to Ubuntu +if [ ! -e "/etc/redhat-release" ]; then + type='ubuntu' +fi + # Check wget if [ -e '/usr/bin/wget' ]; then wget http://vestacp.com/pub/vst-install-$type.sh -O vst-install-$type.sh diff --git a/src/deb/nginx/control b/src/deb/nginx/control index 708e501f..568ca705 100644 --- a/src/deb/nginx/control +++ b/src/deb/nginx/control @@ -1,7 +1,7 @@ Source: vesta-nginx Package: vesta-nginx Priority: optional -Version: 0.9.8-15 +Version: 0.9.8-16 Section: admin Maintainer: Serghey Rodin Homepage: http://vestacp.com diff --git a/src/deb/php/control b/src/deb/php/control index 6a1094e6..e97d4905 100644 --- a/src/deb/php/control +++ b/src/deb/php/control @@ -1,7 +1,7 @@ Source: vesta-php Package: vesta-php Priority: optional -Version: 0.9.8-15 +Version: 0.9.8-16 Section: admin Maintainer: Serghey Rodin Homepage: http://vestacp.com diff --git a/src/deb/vesta/control b/src/deb/vesta/control index d33f8467..14b54147 100644 --- a/src/deb/vesta/control +++ b/src/deb/vesta/control @@ -1,7 +1,7 @@ Source: vesta Package: vesta Priority: optional -Version: 0.9.8-15 +Version: 0.9.8-16 Section: admin Maintainer: Serghey Rodin Homepage: http://vestacp.com diff --git a/src/deb/vesta/postinst b/src/deb/vesta/postinst index e600138c..1455ce1f 100755 --- a/src/deb/vesta/postinst +++ b/src/deb/vesta/postinst @@ -10,4 +10,9 @@ if [ -x "/usr/local/vesta/upd/add_notifications.sh" ]; then /usr/local/vesta/upd/add_notifications.sh fi +# Run session save path trigger +if [ -x "/usr/local/vesta/upd/fix_sessions.sh" ]; then + /usr/local/vesta/upd/fix_sessions.sh +fi + exit 0 diff --git a/src/rpm/conf/nginx.conf b/src/rpm/conf/nginx.conf index d055bd69..89206f17 100644 --- a/src/rpm/conf/nginx.conf +++ b/src/rpm/conf/nginx.conf @@ -14,10 +14,10 @@ http { tcp_nopush on; tcp_nodelay on; client_header_timeout 1m; - client_body_timeout 1m; + client_body_timeout 3m; client_header_buffer_size 2k; client_body_buffer_size 256k; - client_max_body_size 100m; + client_max_body_size 256m; large_client_header_buffers 4 8k; send_timeout 30; keepalive_timeout 60 60; diff --git a/src/rpm/conf/php-fpm.conf b/src/rpm/conf/php-fpm.conf index 7283dfdd..8a7d0bd5 100755 --- a/src/rpm/conf/php-fpm.conf +++ b/src/rpm/conf/php-fpm.conf @@ -498,3 +498,4 @@ php_admin_value[post_max_size] = 512M php_admin_value[upload_max_filesize] = 512M php_admin_value[max_execution_time] = 600 php_admin_value[max_input_time] = 600 +php_admin_value[session.save_path] = /usr/local/vesta/data/sessions diff --git a/src/rpm/specs/vesta-nginx.spec b/src/rpm/specs/vesta-nginx.spec index 9741d75e..448e63f4 100644 --- a/src/rpm/specs/vesta-nginx.spec +++ b/src/rpm/specs/vesta-nginx.spec @@ -1,6 +1,6 @@ Name: vesta-nginx Version: 0.9.8 -Release: 15 +Release: 16 Summary: Vesta Control Panel Group: System Environment/Base License: BSD-like diff --git a/src/rpm/specs/vesta-php.spec b/src/rpm/specs/vesta-php.spec index 5dcfd28b..08d8aa8c 100644 --- a/src/rpm/specs/vesta-php.spec +++ b/src/rpm/specs/vesta-php.spec @@ -1,6 +1,6 @@ Name: vesta-php Version: 0.9.8 -Release: 15 +Release: 16 Summary: Vesta Control Panel Group: System Environment/Base License: GPL @@ -52,6 +52,9 @@ fi %attr(755,root,root) /usr/local/vesta/php %changelog +* Wed Jul 31 2013 Serghey Rodin - 0.9.8-16 +- New session save path + * Wed Jul 31 2013 Serghey Rodin - 0.9.8-1 - Upgraded to 5.4.17 diff --git a/src/rpm/specs/vesta.spec b/src/rpm/specs/vesta.spec index 38eae0b7..34cb9c7f 100644 --- a/src/rpm/specs/vesta.spec +++ b/src/rpm/specs/vesta.spec @@ -1,6 +1,6 @@ Name: vesta Version: 0.9.8 -Release: 15 +Release: 16 Summary: Vesta Control Panel Group: System Environment/Base License: GPL @@ -36,6 +36,9 @@ if [ $1 -ge 2 ]; then if [ -e /usr/local/vesta/upd/add_notifications.sh ]; then /usr/local/vesta/upd/add_notifications.sh fi + if [ -e /usr/local/vesta/upd/fix_sessions.sh ]; then + /usr/local/vesta/upd/fix_sessions.sh + fi fi %files %{_vestadir} @@ -50,6 +53,17 @@ fi %config(noreplace) %{_vestadir}/web/css/uploadify.css %changelog +* Mon Jun 27 2016 Serghey Rodin - 0.9.8-16 +- Full keyboard control +- Cron Helper +- LetsEncrypt Support cli-only +- Language files update +- File permission in File Manager +- Handle DES passwords +- New templates for PHP-FPM +- Core refactoring +- Dozen bugfixes including security issues + * Fri Nov 06 2015 Serghey Rodin - 0.9.8-15 - File Manager (commercial plugin) - SFTP Chroot (commercial plugin) diff --git a/upd/add_notifications.sh b/upd/add_notifications.sh index ca2dc49c..0798eee4 100755 --- a/upd/add_notifications.sh +++ b/upd/add_notifications.sh @@ -5,6 +5,12 @@ if [ ! -e '/usr/local/vesta/data/users/admin/notifications.conf' ]; then /usr/local/vesta/bin/v-add-user-notification admin "File Manager" "Browse, coppy, edit, view, and retrieve all of your web domain files using fully featured File Manager. Plugin is avaiable for purchase." 'filemanager' /usr/local/vesta/bin/v-add-user-notification admin "Chroot SFTP" "If you want have SFTP accounts that will be used only to transfer files (and not to ssh), you can purchase and enable SFTP Chroot. " /usr/local/vesta/bin/v-add-user-notification admin "Starred Objects" "Use stars to easily mark certain object as important or to indicate that you need to do something about it later." 'starred' - /usr/local/vesta/bin/v-add-user-notification admin "Monitoring Tools" "This module answers common performance, health, usage and monitoring questions. Server -> Show CPU, Memory, Disk usage" - /usr/local/vesta/bin/v-add-user-notification admin "Release 0.9.8-15" "New version is cool. A lot of work has been put in the user experience and stability. Check out release notes" + /usr/local/vesta/bin/v-add-user-notification admin "Keyboard Control" "You can use your keyboard to perform many of the same actions you perform using the mouse, such as navigating to or selecting menus, and items." + /usr/local/vesta/bin/v-add-user-notification admin "Release 0.9.8-16" "We are focused on continuously improving the quality of Vesta releases, and we’ve been working hard to ensure this is a stable release. release notes" +else + sed -i "/0.9.8-15/d" /usr/local/vesta/data/users/admin/notifications.conf + sed -i "/Monitoring Tools/d" /usr/local/vesta/data/users/admin/notifications.conf + /usr/local/vesta/bin/v-add-user-notification admin "Keyboard Control" "You can use your keyboard to perform many of the same actions you perform using the mouse, such as navigating to or selecting menus, and items." + /usr/local/vesta/bin/v-add-user-notification admin "Release 0.9.8-16" "We are focused on continuously improving the quality of Vesta releases, and we’ve been working hard to ensure this is a stable release. release notes" fi + diff --git a/upd/fix_sessions.sh b/upd/fix_sessions.sh new file mode 100755 index 00000000..faad9491 --- /dev/null +++ b/upd/fix_sessions.sh @@ -0,0 +1,64 @@ +#!/bin/bash +# Fix vesta session save path + +# Defining vars +VESTA='/usr/local/vesta' +cmd1="$VESTA/upd/fix_sessions.sh" +cmd2="$VESTA/bin/fix_sessions.sh" +cron="$VESTA/data/users/admin/cron.conf" +sessions="$VESTA/data/sessions" +conf="$VESTA/php/etc/php-fpm.conf" +settings=" +php_admin_value[memory_limit] = 256M +php_admin_value[post_max_size] = 512M +php_admin_value[upload_max_filesize] = 512M +php_admin_value[max_execution_time] = 600 +php_admin_value[max_input_time] = 600 +php_admin_value[session.save_path] = $sessions" +user='admin' + +# Adding cron job +if [ ! -z "$1" ]; then + cp $cmd1 $cmd2 + str="JOB='777' MIN='*' HOUR='*' DAY='*' MONTH='*' WDAY='*' SUSPENDED='no'" + str="$str CMD='sudo $cmd2' TIME='04:39:26' DATE='2016-06-24'" + if [ -z "$(grep $cmd2 $cron)" ]; then + echo "$str" >> $cron + source $VESTA/func/main.sh + sync_cron_jobs + $BIN/v-restart-cron + fi + exit +fi + +if [ ! -d "$sessions" ]; then + # Creating new session dir + mkdir $sessions + chown admin:admin $sessions + chmod 770 $sessions + + # Updating php.ini + if [ -z "$(grep $sessions $conf)" ]; then + echo "$settings" >> $conf + fi + + # Moving old sessions to new dir + for session in $(grep WEB_SYSTEM /tmp/sess_* 2>/dev/null|cut -f1 -d :); do + mv $session $sessions + done + + # Reloading php-fpm server + fpm_pid=$(ps auxf |grep "$conf" |grep -v grep |awk '{print $2}') + kill -12 $fpm_pid +fi + +# Cleaning up cron jobs +if [ ! -z "$(grep $cmd2 $cron)" ]; then + source $VESTA/func/main.sh + sed -i "/JOB='777' /d" $cron + sync_cron_jobs + $BIN/v-restart-cron + rm -f $VESTA/bin/fix_sessions.sh +fi + +exit diff --git a/web/add/cron/index.php b/web/add/cron/index.php index 62cae8f1..c9302ae6 100644 --- a/web/add/cron/index.php +++ b/web/add/cron/index.php @@ -1,10 +1,9 @@ diff --git a/web/add/dns/index.php b/web/add/dns/index.php index 629e2ec5..7c18faab 100644 --- a/web/add/dns/index.php +++ b/web/add/dns/index.php @@ -1,10 +1,9 @@ .fileinput-button input -*/ -.fileinput-button input { - font-size: 14px !important; - width: 90px; -} - -.progress-container { - width: 100%; - position: fixed; - bottom: 1px; -} -.progress-container .progress-elm { - background-color: rgba(0, 0, 0, 0.5); - border-radius: 3px; - display: block; - height: 12px; - margin-left: auto; - margin-right: auto; - padding: 7px; - width: 212px; -} - -.progress-container .progress-elm .title { - color: #fff; - display: inline-block; - float: left; - font-family: arial; - font-size: 11px; - margin-left: 4px; - padding-right: 14px; - padding-top: 0; - text-transform: uppercase; -} - -.progress-container .progress-elm .progress { - background: #ebebeb url("/images/progress.gif") no-repeat scroll 0px 0; - border-color: #8a9079; - border-radius: 3px; - color: transparent; - display: inline-block; - height: 0; - margin-top: 3px; - padding: 3px 12px; - transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; - width: 60px; - float: left; -} - -.progress-container .progress-elm .close { - background: rgba(0, 0, 0, 0) url("/images/sprite.png?1446554103") repeat scroll -428px -487px; - cursor: pointer; - display: inline-block; - float: right; - height: 7px; - margin-right: 3px; - margin-top: 3px; - width: 7px; -} -.progress-container .progress-elm .close:hover { - border: 7px solid #333; - margin-top: -4px; - margin-right: -4px; - background-color: #333; -} -.progress-container .progress-elm .close:active { - border: 7px solid #FFCC00; - margin-top: -4px; - margin-right: -4px; - background-color: #FFCC00; -} - - - - - -.checkbox-toolbar { - float: left !important; -} -/*W -.check-label::before { - background-image: url("/images/sprite.png?1446554103"); - background-position: -232px -9px; - background-repeat: no-repeat; - background-size: 450px auto; - content: ""; - display: inline-block; - height: 16px; - width: 16px; - margin-top: -25px; - - border: 1px solid red; -} -input[type="checkbox"] { - display: none; -} - -.clicked-on.check-label::before, .checkbox-selected .check-label { - background-position: -225px -42px; - content: ""; - display: inline-block; - height: 27px; - left: -6px; - top: -6px; - width: 27px; -} -*/ @media (max-width: 1400px) { .listing li .filename-holder { width: 35%; } } - -@media (max-width: 1320px) { +@media (max-width: 1550px) { .menu div.button.mkfile, .menu div.button.mkdir { display: none; } .menu div.button.mkfile.small, @@ -546,14 +384,13 @@ input[type="checkbox"] { .listing li .filename-holder { max-width: 30%; } } -@media (max-width: 1210px) { +@media (max-width: 1500px) { .menu div.button.del { display: none; } .menu div.button.del.small { display: inline-block; } .listing li .filename-holder { max-width: 25%; } } - -@media (max-width: 1180px) { +@media (max-width: 1450px) { .menu div.button { display: none; } .menu div.button.medium, .menu div.button.small { display: inline-block; } @@ -565,7 +402,7 @@ input[type="checkbox"] { .listing li .mode { display: none; } } -@media (max-width: 890px) { +@media (max-width: 990px) { .window { width: 100%; } .window:nth-of-type(2){ display: none; } .listing li .owner { display: inline-block; } @@ -580,7 +417,7 @@ input[type="checkbox"] { .listing li .filename-holder { max-width: 30%; } } -@media (max-width: 600px) { +@media (max-width: 670px) { .menu div.button { display: none; } .menu div.button.medium, .menu div.button.small { display: inline-block; } @@ -608,123 +445,3 @@ input[type="checkbox"] { } -.subcontext-control.hidden { - display: none !important; -} - -.subcontext-control { - color: red; -} -.subcontext-menu-hidden { - display: none; -} - -.subcontext-menu { - position: absolute; - background-color: yellow; - padding: 10px; - border: 1px solid red; -} - -.subcontext-menu li { - /*float: left;*/ -} - - -.shortcuts { - background: rgba(50, 50, 50, 0.9); - display: inline-block; - position: fixed; - right: 20%; - bottom: 0; - color: #eee; - width: 810px; - border: 1px solid #333; - font-family: arial; - font-size: 13px; -} -.shortcuts .header { - border-bottom: 1px solid #333; - height: 43px; -} -.shortcuts .title { - text-transform: uppercase; - color: #ffcc00; - padding: 7px 0 7px 14px; - display: inline-block; - float: left; - font-size: 11px; - letter-spacing: 3px; - font-weight: bold; - line-height: 30px; -} -.shortcuts .close { - background: url("/images/sprite.png?1446554103") repeat scroll -408px -469px; - cursor: pointer; - display: inline-block; - float: right; - height: 32px; - padding-top: 11px; - width: 46px; -} -.shortcuts .close:hover { - background-color: #000; -.. -} -.shortcuts .close:active { - background-color: #55c9c0; -} -.shortcuts ul { - list-style-type: none; - padding: 30px 20px; - display: inline-block; - float: left; - width: 360px; -} -.shortcuts ul li { - padding: 5px 20px; -} -.shortcuts ul li.step-top { - padding-top: 30px; -} -.shortcuts ul li span { - color: #48F4EF; - display: inline-block; - font-weight: bold; - padding: 0 20px 0 0; - text-align: right; -} -.shortcuts ul li span.bigger { - font-size: 18px; -} -.shortcuts ul.note { - font-style: italic; - color: #9CA484; - width: 700px; - padding-left: 50px; -} -.shortcuts ul.note a { - color: #9CA484; -} - -.to-shortcuts { - display: inline-block; - position: fixed; - top: 95%; - right: 1%; -} -.l-icon-shortcuts { - display: inline-block; - vertical-align: middle; - background-image: url("/images/sprite.png?1446554103"); - width: 35px; - height: 35px; - background-position: -122px -283px; - border-radius: 18px; -} -.l-icon-shortcuts:hover { - background-position: -160px -283px; -} -.l-icon-shortcuts:active { - background-position: -198px -283px; -} diff --git a/web/css/styles.min.css b/web/css/styles.min.css index 3dae45c8..e0a3e112 100644 --- a/web/css/styles.min.css +++ b/web/css/styles.min.css @@ -579,7 +579,7 @@ body { color: #929292; } -.body-login { +.body-login, .body-reset { height: auto; padding-top: 10%; /*background: url(/images/edit_bg.png);*/ @@ -676,6 +676,7 @@ input[type="checkbox"] { position: fixed; width: 100%; z-index: 100; + height: 34px } .l-header a { font-size: 12px; @@ -695,6 +696,8 @@ input[type="checkbox"] { .l-menu { float: left; + position: fixed; + margin-left: 70px; } .l-menu__item { float: left; @@ -730,10 +733,13 @@ input[type="checkbox"] { .lang-ru .l-menu__item a { padding: 11px 18px; } -.lang-tr .l-menu__item a, -.lang-ar .l-menu__item a { +.lang-el .l-menu__item a, +.lang-tr .l-menu__item a { padding: 11px 15px; } +.lang-ar .l-menu__item a { + padding: 11px 11px; +} .lang-ar .l-menu__item a { line-height: 35px; } @@ -807,7 +813,7 @@ input[type="checkbox"] { background-color: #c4da5e; } .l-profile__notifications.updates { - background-position: -202px -157px; + background-position: -202px -135px; } .notification-container { @@ -1067,7 +1073,7 @@ div.l-content > div.l-separator:nth-of-type(4) { overflow: hidden; top: 42px; width: 201px; - background-color: #959593; + background-color: #5c5c5c; list-style-type: none; padding-left: 0; box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.3); @@ -1076,7 +1082,7 @@ div.l-content > div.l-separator:nth-of-type(4) { padding: 0; } .context-menu li { - border-bottom: 1px solid #aaa; + border-bottom: 1px solid #777; color: #fff; cursor: pointer; font-size: 12px; @@ -1167,8 +1173,13 @@ div.l-content > div.l-separator:nth-of-type(4) { padding-left: 40px; } +.l-sort-toolbar td.step-right:first-of-type { + padding-right: 20px; +} + .l-sort-toolbar td:nth-of-type(2) { /* /// padding-right: 60px;*/ + padding-right: 20px; } .l-sort-toolbar td:last-of-type { /* /// padding-left: 40px; */ @@ -1332,7 +1343,7 @@ div.l-content > div.l-separator:nth-of-type(4) { .l-unit--suspended .l-unit__name, .l-unit--suspended b, -.l-unit--outdated .l-unit__name, +.l-unit--outdated .l-unit__name, .l-unit--outdated b { color: #c0c0c0; } @@ -1591,13 +1602,17 @@ div.l-content > div.l-separator:nth-of-type(4) { display: none; } +body.mobile .l-unit-toolbar__col--right { + display: block; +} + .l-unit-toolbar .shortcut { display: none; } .units.active .l-unit.focus .l-unit-toolbar .shortcut { display: block; - background-color: #c8c7c6; + background-color: #69a298; border-radius: 13px; color: #fff; cursor: pointer; @@ -1641,6 +1656,10 @@ div.l-content > div.l-separator:nth-of-type(4) { border-right: 1px solid #d8d7d7; position: relative; } +.selected .actions-panel__col { + -webkit-filter: contrast(80%); + filter: contrast(80%); +} .actions-panel__col i { background-image: url("/images/sprite.png?1446554103"); background-repeat: no-repeat; @@ -1676,7 +1695,7 @@ div.l-content > div.l-separator:nth-of-type(4) { .lang-ar .actions-panel__col a { font-size: 15px; font-weight: normal; - line-height: 29px; + line-height: 31px; } @@ -2090,11 +2109,15 @@ div.l-content > div.l-separator:nth-of-type(4) { height: 36px; background-position: -216px 560px; cursor: pointer; - display: none; + visibility: hidden; } .l-unit--starred .l-icon-star { - display: inline-block; background-position: -174px 560px; + visibility: visible; +} +.selected .l-icon-star { + filter: contrast(70%); + -webkit-filter: contrast(70%); } .units.compact .l-icon-star { @@ -2111,7 +2134,7 @@ div.l-content > div.l-separator:nth-of-type(4) { } .l-unit:hover .l-icon-star { - display: inline-block; + visibility: visible; } @@ -2140,7 +2163,10 @@ div.l-content > div.l-separator:nth-of-type(4) { background-position: -198px -281px; } - +body.mobile .l-icon-to-top, +body.mobile .l-icon-shortcuts { + display: none; +} .l-icon-star-orange { @@ -2373,6 +2399,13 @@ div.l-content > div.l-separator:nth-of-type(4) { .jump-top { margin-top: -60px; } +.jump-small-top { + margin-top: -12px; +} +.float-right { + display: inline-block; + float: right; +} .data a { text-decoration: none; @@ -2410,11 +2443,13 @@ label { border-color: #f1f1f1; background-color: #f1f1f1; } - - -.vst-input.long{ - width: 580px; +.vst-input.long { + width: 832px; } +.vst-input.short { + width: 200px; +} + .vst-list { background-color: #fff; border: 1px solid #ccc; @@ -2669,6 +2704,11 @@ td.hint { border: 1px solid #D1D70D; background-color: #D1D70D; } +a.button.cancel { + padding: 8px 38px; + text-transform: capitalize; +} + .ui-dialog button.cancel { color: #000; @@ -2843,12 +2883,10 @@ div.l-content.collapsed .l-sort { margin-top: 94px; } -.l-content > .l-center .l-unit:nth-of-type(1) { - padding-top: 260px; -} - -.l-content > .l-center .l-unit-ft:nth-of-type(1) { - padding-top: 260px; +.l-content > .units.l-center::before { + content: ''; + display: block; + height: 260px; } form#vstobjects { @@ -2943,8 +2981,11 @@ form#vstobjects.suspended { -o-transition: width .2s ease-out; transition: width .2s ease-out; } +.lang-ru .search-input.activated{ + width: 70px; +} .search-input.activated{ - width: 150px; + width: 130px; visibility: visible; } .search-input:focus { @@ -2987,6 +3028,7 @@ form#vstobjects.suspended { width: 800px; border: 1px solid #333; font-size: 13px; + z-index: 120; } .shortcuts .header { border-bottom: 1px solid #333; @@ -3012,7 +3054,6 @@ form#vstobjects.suspended { } .shortcuts .close:hover { background-color: #000; - } .shortcuts .close:active { background-color: #55c9c0; @@ -3131,3 +3172,117 @@ form#vstobjects.suspended { .ui-dialog .ui-dialog-content { padding: 10px 26px 30px !important; } + +.helper-container { + float: right; + height: 293px; + margin-bottom: -450px; + margin-top: 459px; + padding-top: 3px; + width: 563px; +} + +.context-helper { + text-transform: uppercase; +# text-decoration: underline; + color: #777; + font-size: 11px; + cursor: pointer; + font-weight: bold; + float: right; +} +.context-helper:hover { + color: #55C9C0; +} +.context-helper:active { + color: #ff6701; +} + + +.cron-helper-tabs { +/* margin-top: 30px;*/ + border: 1px solid #d9d9d9 !important; +} + +.cron-helper-tabs a { + color: #777; + font-size: 11px; + font-weight: bold; + line-height: 30px; + padding: 0 12px; + text-transform: uppercase; +} + +.cron-helper-tabs a:hover { + color: #ff6701; +} +.cron-helper-tabs a:active { + color: #55C9C0; +} +.cron-helper-tabs .ui-tabs-selected a { + color: #ff6701; +} + +.cron-helper-tabs select { + font-size: 15px !important; +} +.cron-helper-tabs select.short { + background-position: -388px -604px; + min-width: 30px; + width: 70px; +} + +.cron-helper-tabs p { + color: #777; + font-size: 12px; +} +.cron-helper-tabs p span{ + padding-right: 15px; + padding-left: 25px; +} +.cron-helper-tabs p span.first{ + display: inline-block; + padding-right: 15px; + width: 100px; + padding-left: 0; +} + +.cron-helper-tabs .button { + width: auto; + background-color: #55C9C0; + border: 1px solid #55C9C0; + text-transform: capitalize; +} +.cron-helper-tabs .button:hover { + background-color: #5BD8CF; + border: 1px solid #5BD8CF; +} +.cron-helper-tabs .button:active { + background-color: #4FBCB4; + border: 1px solid #4FBCB4; +} + +.context-helper-close { + background: rgba(0, 0, 0, 0) url("/images/sprite.png?1446554103") repeat scroll -408px -469px; + cursor: pointer; + display: inline-block; + float: right; + height: 32px; + padding-top: 11px; + width: 46px; + filter: contrast(50%); +} +.context-helper-close:hover { + background-color: #aaa; + filter: none; +} +.context-helper-close:active { + background-color: #999; + filter: none; +} + +@media screen and (max-width: 950px) { + .helper-container { + display: none; + } +} diff --git a/web/delete/notification/index.php b/web/delete/notification/index.php index fa3a14f1..0f978712 100644 --- a/web/delete/notification/index.php +++ b/web/delete/notification/index.php @@ -21,7 +21,6 @@ if($_GET['delete'] == 1){ } else { $v_username = escapeshellarg($user); $v_id = escapeshellarg((int)$_GET['notification_id']); - echo VESTA_CMD."v-acknowledge-user-notification ".$v_username." ".$v_id; exec (VESTA_CMD."v-acknowledge-user-notification ".$v_username." ".$v_id, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/download/backup/index.php b/web/download/backup/index.php index 888a78fa..06846714 100644 --- a/web/download/backup/index.php +++ b/web/download/backup/index.php @@ -3,10 +3,10 @@ error_reporting(NULL); session_start(); include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); -$backup = $_GET['backup']; +$backup = basename($_GET['backup']); // Check if the backup exists -if (!file_exists($backup)) { +if (!file_exists('/backup/'.$backup)) { exit(0); } diff --git a/web/edit/backup/exclusions/index.php b/web/edit/backup/exclusions/index.php index 8bac32c1..bbbb4b3e 100644 --- a/web/edit/backup/exclusions/index.php +++ b/web/edit/backup/exclusions/index.php @@ -2,7 +2,6 @@ // Init error_reporting(NULL); ob_start(); -session_start(); $TAB = 'BACKUP'; include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); @@ -123,18 +122,9 @@ if (!empty($_POST['save'])) { } -// Header -include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html'); - -// Panel -top_panel($user,$TAB); - -// Display body -include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_backup_exclusions.html'); +// Render page +render_page($user, $TAB, 'edit_backup_exclusions'); // Flush session messages unset($_SESSION['error_msg']); unset($_SESSION['ok_msg']); - -// Footer -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); diff --git a/web/edit/cron/index.php b/web/edit/cron/index.php index b2e82d28..c66ca85c 100644 --- a/web/edit/cron/index.php +++ b/web/edit/cron/index.php @@ -22,7 +22,8 @@ if (empty($_GET['job'])) { $v_job = escapeshellarg($_GET['job']); exec (VESTA_CMD."v-list-cron-job ".$user." ".$v_job." 'json'", $output, $return_var); check_return_code($return_var,$output); -$data = json_decode(implode('', $output), true); + +$data = json_decode(implode('', str_replace("\\", "\\\\", $output)), true); unset($output); // Parse cron job @@ -53,7 +54,7 @@ if (!empty($_POST['save'])) { } $v_username = $user; - $v_job = escapeshellarg($_GET['job']); + $v_job = escapeshellarg($_GET['job']); $v_min = escapeshellarg($_POST['v_min']); $v_hour = escapeshellarg($_POST['v_hour']); $v_day = escapeshellarg($_POST['v_day']); @@ -74,18 +75,9 @@ if (!empty($_POST['save'])) { } } -// Header -include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html'); - -// Panel -top_panel($user,$TAB); - -// Display body -include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_cron.html'); +// Render page +render_page($user, $TAB, 'edit_cron'); // Flush session messages unset($_SESSION['error_msg']); unset($_SESSION['ok_msg']); - -// Footer -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); diff --git a/web/edit/db/index.php b/web/edit/db/index.php index 29d358f8..21d394f0 100644 --- a/web/edit/db/index.php +++ b/web/edit/db/index.php @@ -2,16 +2,10 @@ // Init error_reporting(NULL); ob_start(); -session_start(); $TAB = 'DB'; -include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); - -// Header -include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html'); - -// Panel -top_panel($user,$TAB); +// Main include +include($_SERVER['DOCUMENT_ROOT'].'/inc/main.php'); // Check database id if (empty($_GET['database'])) { @@ -75,7 +69,7 @@ if (!empty($_POST['save'])) { fwrite($fp, $_POST['v_password']."\n"); fclose($fp); exec (VESTA_CMD."v-change-database-password ".$v_username." ".$v_database." ".$v_password, $output, $return_var); - check_return_code($return_var,$output); + check_return_code($return_var,$output); unset($output); unlink($v_password); $v_password = escapeshellarg($_POST['v_password']); @@ -87,12 +81,9 @@ if (!empty($_POST['save'])) { } } -// Display body -include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_db.html'); +// Render page +render_page($user, $TAB, 'edit_db'); // Flush session messages unset($_SESSION['error_msg']); unset($_SESSION['ok_msg']); - -// Footer -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); diff --git a/web/edit/dns/index.php b/web/edit/dns/index.php index 6ceac64a..3c2e1e5c 100644 --- a/web/edit/dns/index.php +++ b/web/edit/dns/index.php @@ -1,10 +1,9 @@ $value) { $v_dns_cluster = 'yes'; } -// List MySQL hosts -exec (VESTA_CMD."v-list-database-hosts mysql json", $output, $return_var); -$v_mysql_hosts = json_decode(implode('', $output), true); +// List Database hosts +exec (VESTA_CMD."v-list-database-hosts json", $output, $return_var); +$db_hosts = json_decode(implode('', $output), true); unset($output); -foreach ($v_mysql_hosts as $key => $value) { - $v_mysql = 'yes'; -} - -// List PostgreSQL hosts -exec (VESTA_CMD."v-list-database-hosts pgsql json", $output, $return_var); -$v_pgsql_hosts = json_decode(implode('', $output), true); -unset($output); -foreach ($v_pgsql_hosts as $key => $value) { - $v_psql = 'yes'; -} +$v_mysql_hosts = array_values(array_filter($db_hosts, function($host){return $host['TYPE'] === 'mysql';})); +$v_mysql = count($v_mysql_hosts) ? 'yes' : 'no'; +$v_pgsql_hosts = array_values(array_filter($db_hosts, function($host){return $host['TYPE'] === 'pgsql';})); +$v_pgsql = count($v_pgsql_hosts) ? 'yes' : 'no'; +unset($db_hosts); // List backup settings $v_backup_dir = "/backup"; @@ -207,7 +201,7 @@ if (!empty($_POST['save'])) { // Update phpPgAdmin url if (empty($_SESSION['error_msg'])) { - if ($_POST['v_psql_url'] != $_SESSION['DB_PGA_URL']) { + if ($_POST['v_pgsql_url'] != $_SESSION['DB_PGA_URL']) { exec (VESTA_CMD."v-change-sys-config-value DB_PGA_URL '".escapeshellarg($_POST['v_pgsql_url'])."'", $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -421,18 +415,9 @@ foreach ($sys_arr as $key => $value) { $_SESSION[$key] = $value; } -// Header -include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html'); - -// Panel -top_panel($user,$TAB); - -// Display body -include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_server.html'); +// Render page +render_page($user, $TAB, 'edit_server'); // Flush session messages unset($_SESSION['error_msg']); unset($_SESSION['ok_msg']); - -// Footer -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); diff --git a/web/edit/user/index.php b/web/edit/user/index.php index c0ea9cd5..049ee20d 100644 --- a/web/edit/user/index.php +++ b/web/edit/user/index.php @@ -1,10 +1,9 @@ '; -//print_r($files); - - -//$_REQUEST['sort_field'] = 'size'; -$_REQUEST['sort_field'] = 'name'; -//$_REQUEST['sort_field'] = 'atime'; -//$_REQUEST['sort_field'] = 'mtime'; -$_REQUEST['sort_desc'] = 1; - - - -/* -+- copy file / dir [ recursive ] -+- rename(move) file / dir -+- delete file / dir [ recursive ] -+- chmod file / dir -+- chown file / dir -+- create file -+- create dir -*/ - -switch($_REQUEST['action']){ - case 'copy': fm_copy($_REQUEST['source'], $_REQUEST['dest']); break; - case 'rename': fm_rename($_REQUEST['source'], $_REQUEST['dest']); break; - case 'delete': fm_delete($_REQUEST['source']); break; - case 'chmod': fm_chmod($_REQUEST['source'], $_REQUEST['mode']); break; - case 'chown': fm_chown($_REQUEST['source'], $_REQUEST['uid'], $_REQUEST['gid']); break; - case 'create_file': fm_create_file($_REQUEST['source'], $_REQUEST['mode'] || FALSE); break; - case 'create_dir': fm_create_dir($_REQUEST['source'], $_REQUEST['mode'] || FALSE); break; - - default: - $pwd = $_REQUEST['path'] ? $_REQUEST['path'] : __DIR__; - $listing = dir_list($pwd, $_REQUEST['sort_field']); - $writable = is_writable($pwd); - - $pwd = array_merge(array('/'), explode('/', trim($pwd, '/'))); - - include('templates/filemanager.php'); - break; -} - - - - - - -//echo $_GET['sort_field']; - -// if(in_array($_GET['sort_field'], $available_sort_fields)){ -// echo '1'; -// } - - - - - - - - -/* - upload_file - -+ list_dir -+- copy file / dir [ recursive ] -+- rename(move) file / dir -+- delete file / dir [ recursive ] -+- chmod file / dir -+- chown file / dir -+- create file -+- create dir - - view file / image - download file / image -*/ - - - -function fm_create_file($filename){ - if(is_file($filename)) - return array('error' => 'file exists', 'code' => 1); - - return !!fopen($filename, 'w'); -} - - -function fm_create_dir($dirname){ - if(is_dir($filename)) - return array('error' => 'directory exists', 'code' => 1); - - // TODO set parent directory mode - return mkdir($dirname); -} - - -function fm_chown($filename, $recursive = 0, $uid = FALSE, $gid = FALSE){ - if(is_dir($filename) && $recursive){ - $dir_handle = opendir($dir); - while ($item = readdir($dir_handle)){ - if (!in_array($item, array('.','..'))){ - $new_item = $filename.'/'.$item; - - if($uid !== FALSE) chown($new_item, (int)$uid); - if($gid !== FALSE) chgrp($new_item, (int)$gid); - - if(is_dir($new_item)){ - fm_chown($new_item, $recursive, $uid, $gid); - } - } - } - }else{ - if($uid !== FALSE) chown($filename, (int)$uid); - if($gid !== FALSE) chgrp($filename, (int)$gid); - } -} - - -function fm_chmod($filename, $recursive = 0, $mode){ - if(is_dir($filename) && $recursive){ - $dir_handle = opendir($dir); - while ($item = readdir($dir_handle)){ - if (!in_array($item, array('.','..'))){ - $new_item = $filename.'/'.$item; - chmod($new_item, octdec($mode)); - - if(is_dir($new_item)){ - fm_chmod($new_item, $recursive, $mode); - } - } - } - }else{ - chmod($filename, octdec($mode)); - } -} - - -function fm_delete($filename){ - if(is_dir($filename)){ - foreach ( - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($filename, RecursiveDirectoryIterator::SKIP_DOTS), - RecursiveIteratorIterator::SELF_FIRST) as $item - ) { - if ($item->isDir()) { - rmdir($item); -// mkdir($dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName(), decoct(fileperms($item->getPerms()))); - } else { - unlink($item); -// copy($item, $dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName()); - } - } - }else{ - return unlink($filename); - } -} - - -function fm_rename($source, $dest){ - return rename($source, $dest); -} - - -function fm_copy($source, $dest){ - if(is_dir($source)){ - foreach ( - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS), - RecursiveIteratorIterator::SELF_FIRST) as $item - ) { - if ($item->isDir()) { - // TODO set dir perms - mkdir($dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName(), decoct(fileperms($item->getPerms()))); - } else { - copy($item, $dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName()); - } - } - - }else{ - return copy($source, $dest); - } -} - - -function list_dir(){ - $dir_iterator = new RecursiveDirectoryIterator("/path"); - $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST); - // could use CHILD_FIRST if you so wish - - foreach ($iterator as $file) { - echo $file, "\n"; - } - - $size = 0; - foreach ($iterator as $file) { - if ($file->isFile()) { - echo substr($file->getPathname(), 27) . ": " . $file->getSize() . " B; modified " . date("Y-m-d", $file->getMTime()) . "\n"; - $size += $file->getSize(); - } - } - - echo "\nTotal file size: ", $size, " bytes\n"; -} - - - - -/// fast removing directory -function rmrf($dir) { - - foreach (glob($dir) as $file) { - if (is_dir($file)) { - rmrf("$file/*"); - rmdir($file); - } else { - unlink($file); - } - } -} - - - - -function dir_list($dir, $sort = 0) -{ - $sort_order_for_filename = SORT_ASC; - //$available_sort_fields = array('size, type', 'mtime', 'atime', 'owner', 'group'); - $available_sort_fields = array('name', 'size', 'type', 'mtime', 'atime', 'owner', 'group'); - $sort_order = SORT_ASC; - - if ($dir[strlen($dir)-1] != '/') $dir .= '/'; - if (!is_dir($dir)) return array(); - - $start = microtime(TRUE); - - $listing = array('dirs' => array(), 'files' => array(), 'dir_names' => array(), 'file_names' => array() ,'count' => 0, 'timeout_exeeded' => 0, 'time' => 0); - $dir_handle = opendir($dir); - $dir_objects = array(); - while ($object = readdir($dir_handle)){ - if (!in_array($object, array('.','..'))){ - $filename = $dir . $object; - $time = microtime(true) - $start; - if($time <= LISTING_TIMEOUT){ - $stats = stat($filename); - $mode = explain_mode($stats['mode']); - $perms = decoct(fileperms($filename)); - $item = array( - 'name' => $object, - 'size' => $stats['size'], - 'mode' => array('owner' => $mode['owner'], 'group' => $mode['owner'], 'other' => $mode['owner']), - 'perms' => decoct($stats['mode']), - 'type' => $mode['type'], - 'mtime' => $stats['mtime'], - 'atime' => $stats['atime'], - 'mdate_human' => date("Y F d", $stats['mtime']), - 'mtime_human' => date("H:i:s", $stats['mtime']), - 'adate_human' => date("Y F d", $stats['atime']), - 'atime_human' => date("H:i:s", $stats['atime']), - 'nlink' => $stats['nlink'], - 'owner' => posix_getpwuid($stats['uid'])['name'], - 'group' => posix_getgrgid($stats['gid'])['name'] - ); - }else{ - $listing['timeout_exeeded'] = TRUE; - if(is_dir($filename)){ $type = 'd'; - }else{ $type = '-'; } - - $item = array( - 'name' => $object, - 'size' => FALSE, - 'mode' => array('owner' => FALSE, 'group' => FALSE, 'other' => FALSE), - 'type' => $type, - 'mtime' => FALSE, - 'atime' => FALSE, - 'mdate_human' => FALSE, - 'mtime_human' => FALSE, - 'adate_human' => FALSE, - 'atime_human' => FALSE, - 'nlink' => FALSE, - 'owner' => FALSE, - 'group' => FALSE - ); - } - - - $listing['count']++; - - if($item['type'] == 'd'){ - $listing['dirs'][] = $item; - $listing['dir_names'][] = $item['name']; - }else{ - if($sort && !$listing['timeout_exeeded']){ - $listing[$sort][] = $item[$sort]; - } - $listing['files'][] = $item; - $listing['file_names'][] = $item['name']; - } - } - } - $listing['time'] = microtime(TRUE) - $start; - - - if(!$listing['timeout_exeeded']){ - if(in_array($_REQUEST['sort_field'], $available_sort_fields)){ - if($_REQUEST['sort_desc']){ - $sort_order = SORT_DESC; - } - array_multisort($listing[$_REQUEST['sort_field']], $sort_order, $listing['file_names'], $sort_order_for_filename, $listing['files']); - } - array_multisort($listing['dir_names'], $sort_order_for_filename, $listing['dirs']); - } - - return $listing; -} - - -function explain_mode($mode) -{ - $info = array(); - - if (($mode & 0xC000) == 0xC000) { $info['type'] = 's'; } - elseif (($mode & 0xA000) == 0xA000) { $info['type'] = 'l'; } - elseif (($mode & 0x8000) == 0x8000) { $info['type'] = '-'; } - elseif (($mode & 0x6000) == 0x6000) { $info['type'] = 'b'; } - elseif (($mode & 0x4000) == 0x4000) { $info['type'] = 'd'; } - elseif (($mode & 0x2000) == 0x2000) { $info['type'] = 'c'; } - elseif (($mode & 0x1000) == 0x1000) { $info['type'] = 'p'; } - else { $info['type'] = 'u'; } - - $info['owner'] = (($mode & 0x0100) ? 'r' : '-'); - $info['owner'] .= (($mode & 0x0080) ? 'w' : '-'); - $info['owner'] .= (($mode & 0x0040) ? (($mode & 0x0800) ? 's' : 'x' ) : (($mode & 0x0800) ? 'S' : '-')); - - // group - $info['group'] = (($mode & 0x0020) ? 'r' : '-'); - $info['group'] .= (($mode & 0x0010) ? 'w' : '-'); - $info['group'] .= (($mode & 0x0008) ? (($mode & 0x0400) ? 's' : 'x' ) : (($mode & 0x0400) ? 'S' : '-')); - - // other - $info['other'] = (($mode & 0x0004) ? 'r' : '-'); - $info['other'] .= (($mode & 0x0002) ? 'w' : '-'); - $info['other'] .= (($mode & 0x0001) ? (($mode & 0x0200) ? 't' : 'x' ) : (($mode & 0x0200) ? 'T' : '-')); - - return $info; -} - -?> +// absolete \ No newline at end of file diff --git a/web/file_manager/fm_api.php b/web/file_manager/fm_api.php index f4629794..0bb0effd 100644 --- a/web/file_manager/fm_api.php +++ b/web/file_manager/fm_api.php @@ -29,46 +29,62 @@ switch ($_REQUEST['action']) { $dir = $_REQUEST['dir']; print json_encode($fm->ls($dir)); break; + case 'check_file_type': $dir = $_REQUEST['dir']; - print json_encode($fm->checkFileType($dir)); break; + case 'rename_file': $dir = $_REQUEST['dir']; - $item = $_REQUEST['item']; - $target_name = $_REQUEST['target_name']; - - print json_encode($fm->renameFile($dir, $item, $target_name)); + $item = $dir . '/' . $_REQUEST['item']; + $target_name = $dir . '/' . $_REQUEST['target_name']; + print json_encode($fm->renameFile($item, $target_name)); break; + case 'rename_directory': $dir = $_REQUEST['dir']; + $item = $dir.$_REQUEST['item']; + $target_name = $dir.$_REQUEST['target_name']; + + print json_encode($fm->renameDirectory($item, $target_name)); + break; + + case 'move_file': $item = $_REQUEST['item']; $target_name = $_REQUEST['target_name']; - - print json_encode($fm->renameDirectory($dir, $item, $target_name)); + print json_encode($fm->renameFile($item, $target_name)); break; + + case 'move_directory': + $item = $_REQUEST['item']; + $target_name = $_REQUEST['target_name']; + print json_encode($fm->renameDirectory($item, $target_name)); + break; + case 'delete_files': $dir = $_REQUEST['dir']; $item = $_REQUEST['item']; - print json_encode($fm->deleteItem($dir, $item)); break; + case 'create_file': $dir = $_REQUEST['dir']; $filename = $_REQUEST['filename']; print json_encode($fm->createFile($dir, $filename)); break; + case 'create_dir': $dir = $_REQUEST['dir']; $dirname = $_REQUEST['dirname']; print json_encode($fm->createDir($dir, $dirname)); break; - + case 'open_file': $dir = $_REQUEST['dir']; print json_encode($fm->open_file($dir)); break; + case 'copy_file': $dir = $_REQUEST['dir']; $target_dir = $_REQUEST['dir_target']; @@ -76,6 +92,7 @@ switch ($_REQUEST['action']) { $item = $_REQUEST['item']; print json_encode($fm->copyFile($item, $dir, $target_dir, $filename)); break; + case 'copy_directory': $dir = $_REQUEST['dir']; $target_dir = $_REQUEST['dir_target']; @@ -83,6 +100,7 @@ switch ($_REQUEST['action']) { $item = $_REQUEST['item']; print json_encode($fm->copyDirectory($item, $dir, $target_dir, $filename)); break; + case 'unpack_item': $dir = $_REQUEST['dir']; $target_dir = $_REQUEST['dir_target']; @@ -90,17 +108,25 @@ switch ($_REQUEST['action']) { $item = $_REQUEST['item']; print json_encode($fm->unpackItem($item, $dir, $target_dir, $filename)); break; + case 'pack_item': - $dir = $_REQUEST['dir']; - $target_dir = $_REQUEST['dir_target']; - $filename = $_REQUEST['filename']; - $item = $_REQUEST['item']; - print json_encode($fm->packItem($item, $dir, $target_dir, $filename)); + $items = $_REQUEST['items']; + $dst_item = $_REQUEST['dst_item']; + print json_encode($fm->packItem($items, $dst_item)); break; + case 'backup': $path = $_REQUEST['path']; print json_encode($fm->backupItem($path)); break; + + case 'chmod_item': + $dir = $_REQUEST['dir']; + $item = $_REQUEST['item']; + $permissions = $_REQUEST['permissions']; + print json_encode($fm->chmodItem($dir, $item, $permissions)); + break; + default: //print json_encode($fm->init()); break; diff --git a/web/file_manager/fm_core.php b/web/file_manager/fm_core.php index 72436898..f2b65908 100644 --- a/web/file_manager/fm_core.php +++ b/web/file_manager/fm_core.php @@ -1,7 +1,7 @@ 0, @@ -13,38 +13,26 @@ class FileManager { 'SIZE' => 6, 'NAME' => 7 ); - + protected $user = null; public $ROOT_DIR = null; - + public function setRootDir($root = null) { if (null != $root) { - $root = realpath($root); + $root = realpath($root); } $this->ROOT_DIR = $root; } - + public function __construct($user) { $this->user = $user; } - - /*public function init() { - $path = !empty($_REQUEST['dir']) ? $_REQUEST['dir'] : ''; - $start_url = !empty($path) ? $this->ROOT_DIR . '/' . $path : $this->ROOT_DIR; - $listing = $this->getDirectoryListing($path); - - return $data = array( - 'result' => true, - 'ROOT_DIR' => $this->ROOT_DIR, - 'TAB_A_PATH' => $start_url, - 'TAB_B_PATH' => $this->ROOT_DIR, // second tab always loads home dir - 'listing' => $listing - ); - }*/ - + public function checkFileType($dir) { $dir = $this->formatFullPath($dir); + exec(VESTA_CMD . "v-get-fs-file-type {$this->user} {$dir}", $output, $return_var); + $error = self::check_return_code($return_var, $output); if (empty($error)) { return array( @@ -59,7 +47,7 @@ class FileManager { ); } } - + public function formatFullPath($path_part = '') { if (substr($path_part, 0, strlen($this->ROOT_DIR)) === $this->ROOT_DIR) { $path = $path_part; @@ -71,13 +59,13 @@ class FileManager { //$path = str_replace(' ', '\ ', $path); return escapeshellarg($path); } - + function deleteItem($dir, $item) { $dir = $this->formatFullPath($item); exec (VESTA_CMD . "v-delete-fs-directory {$this->user} {$dir}", $output, $return_var); $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -89,29 +77,16 @@ class FileManager { 'message' => $error ); } - - /*if (is_readable($item)) { - unlink($item); - } - if (is_readable($item)) { - return array( - 'result' => false, - 'message' => 'item was not deleted' - ); - } - return array( - 'result' => true - );*/ } - + function copyFile($item, $dir, $target_dir, $filename) { $src = $this->formatFullPath($item); $dst = $this->formatFullPath($target_dir); - + exec (VESTA_CMD . "v-copy-fs-file {$this->user} {$src} {$dst}", $output, $return_var); $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -124,17 +99,15 @@ class FileManager { ); } } - - + function copyDirectory($item, $dir, $target_dir, $filename) { $src = $this->formatFullPath($item); $dst = $this->formatFullPath($target_dir); - + exec (VESTA_CMD . "v-copy-fs-directory {$this->user} {$src} {$dst}", $output, $return_var); - $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -147,25 +120,23 @@ class FileManager { ); } } - + static function check_return_code($return_var, $output) { if ($return_var != 0) { $error = implode('
', $output); return $error; - //if (empty($error)) $error = __('Error code:',$return_var); - //$_SESSION['error_msg'] = $error; } - + return null; } - + function createFile($dir, $filename) { $dir = $this->formatFullPath($dir . '/' . $filename); exec (VESTA_CMD . "v-add-fs-file {$this->user} {$dir}", $output, $return_var); $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -178,19 +149,22 @@ class FileManager { ); } } - - function packItem($item, $dir, $target_dir, $filename) { - $item = $this->formatFullPath($item); - $dst_item = $this->formatFullPath($target_dir); - + + function packItem($items, $dst_item) { + $items_arr = explode(',', $items); + foreach($items_arr as $key => $item){ + $items_arr[$key] = $this->formatFullPath($item); + } + $items = implode(' ', $items_arr); + + $dst_item = $this->formatFullPath($dst_item); $dst_item = str_replace('.tar.gz', '', $dst_item); - - //$item = str_replace($dir . '/', '', $item); -//var_dump(VESTA_CMD . "v-add-fs-archive {$this->user} {$dst_item} {$item}");die(); - exec (VESTA_CMD . "v-add-fs-archive {$this->user} {$dst_item} {$item}", $output, $return_var); + +// echo VESTA_CMD . "v-add-fs-archive {$this->user} {$dst_item} {$items}"; + exec (VESTA_CMD . "v-add-fs-archive {$this->user} {$dst_item} {$items}", $output, $return_var); $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -205,18 +179,16 @@ class FileManager { } function backupItem($item) { - $src_item = $this->formatFullPath($item); - + $dst_item_name = $item . '~' . date('Ymd_His'); $dst_item = $this->formatFullPath($dst_item_name); -//print VESTA_CMD . "v-add-fs-archive {$this->user} {$item} {$dst_item}";die(); exec (VESTA_CMD . "v-copy-fs-file {$this->user} {$src_item} {$dst_item}", $output, $return_var); $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true, @@ -231,7 +203,7 @@ class FileManager { } $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -244,7 +216,7 @@ class FileManager { ); } } - + function unpackItem($item, $dir, $target_dir, $filename) { $item = $this->formatFullPath($item); $dst_item = $this->formatFullPath($target_dir); @@ -252,7 +224,7 @@ class FileManager { exec (VESTA_CMD . "v-extract-fs-archive {$this->user} {$item} {$dst_item}", $output, $return_var); $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -265,17 +237,18 @@ class FileManager { ); } } - - function renameFile($dir, $item, $target_name) { - $item = $this->formatFullPath($dir . '/' . $item); - $dst_item = $this->formatFullPath($dir . '/' . $target_name); - -// var_dump(VESTA_CMD . "v-move-fs-file {$this->user} {$item} {$dst_item}");die(); + + function renameFile($item, $target_name) { +// $item = $this->formatFullPath($dir . '/' . $item); +// $dst_item = $this->formatFullPath($dir . '/' . $target_name); + + $item = $this->formatFullPath($item); + $dst_item = $this->formatFullPath($target_name); exec (VESTA_CMD . "v-move-fs-file {$this->user} {$item} {$dst_item}", $output, $return_var); $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -288,9 +261,10 @@ class FileManager { ); } } - function renameDirectory($dir, $item, $target_name) { - $item = $this->formatFullPath($dir . $item); - $dst_item = $this->formatFullPath($dir . $target_name); + + function renameDirectory($item, $target_name) { + $item = $this->formatFullPath($item); + $dst_item = $this->formatFullPath($target_name); if ($item == $dst_item) { return array( @@ -298,11 +272,10 @@ class FileManager { ); } - exec (VESTA_CMD . "v-move-fs-directory {$this->user} {$item} {$dst_item}", $output, $return_var); $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -315,14 +288,14 @@ class FileManager { ); } } - + function createDir($dir, $dirname) { $dir = $this->formatFullPath($dir . '/' . $dirname); exec (VESTA_CMD . "v-add-fs-directory {$this->user} {$dir}", $output, $return_var); $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -335,14 +308,36 @@ class FileManager { ); } } - + + function chmodItem($dir, $item, $permissions) { + $item = $this->formatFullPath($dir . $item); + $permissions = escapeshellarg($permissions); + + exec (VESTA_CMD . "v-change-fs-file-permission {$this->user} {$item} {$permissions}", $output, $return_var); + + $error = self::check_return_code($return_var, $output); + + if (empty($error)) { + return array( + 'result' => true + ); + } + else { + return array( + 'result' => false, + 'message' => $error + ); + } + } + function getDirectoryListing($dir = '') { $dir = $this->formatFullPath($dir); + exec (VESTA_CMD . "v-list-fs-directory {$this->user} {$dir}", $output, $return_var); return $this->parseListing($output); } - + public function ls($dir = '') { $listing = $this->getDirectoryListing($dir); @@ -351,7 +346,7 @@ class FileManager { 'listing' => $listing ); } - + public function open_file($dir = '') { $listing = $this->getDirectoryListing($dir); @@ -360,14 +355,14 @@ class FileManager { 'listing' => $listing ); } - + public function parseListing($raw) { $data = array(); foreach ($raw as $o) { $info = explode($this->delimeter, $o); $data[] = array( 'type' => $info[$this->info_positions['TYPE']], - 'permissions' => $info[$this->info_positions['PERMISSIONS']], + 'permissions' => str_pad($info[$this->info_positions['PERMISSIONS']], 3, "0", STR_PAD_LEFT), 'date' => $info[$this->info_positions['DATE']], 'time' => $info[$this->info_positions['TIME']], 'owner' => $info[$this->info_positions['OWNER']], @@ -376,7 +371,7 @@ class FileManager { 'name' => $info[$this->info_positions['NAME']] ); } - + return $data; } diff --git a/web/generate/ssl/index.php b/web/generate/ssl/index.php index 5ccc2f29..990fbc66 100644 --- a/web/generate/ssl/index.php +++ b/web/generate/ssl/index.php @@ -1,16 +1,10 @@ ', $output); if (empty($error)) $error = __('Error code:',$return_var); $_SESSION['error_msg'] = $error; - include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/generate_ssl.html'); - include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); + render_page($user, $TAB, 'generate_ssl'); unset($_SESSION['error_msg']); - exit(); + exit; } // OK message @@ -106,6 +97,7 @@ $v_csr = $data[$v_domain]['CSR']; // Back uri $_SESSION['back'] = $_SERVER['REQUEST_URI']; -include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_ssl.html'); -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); +// Render page +render_page($user, $TAB, 'list_ssl'); + unset($_SESSION['ok_msg']); diff --git a/web/images/flat_icons.png b/web/images/flat_icons.png index b226a00a..f4060938 100644 Binary files a/web/images/flat_icons.png and b/web/images/flat_icons.png differ diff --git a/web/inc/i18n.php b/web/inc/i18n.php index 1dab4cae..8b8abf3a 100644 --- a/web/inc/i18n.php +++ b/web/inc/i18n.php @@ -1,112 +1,128 @@ -1) { - $args[0] = $text; - return call_user_func_array("sprintf",$args); - } else { - return $text; - } -} - -/** - * Translates string by a given key in first parameter to current session language. Works like sprintf - * @global array $LANG Associative array of language pharses - * @return string Translated string - * @see _translate() - */ -function __() { - $args = func_get_args(); - array_unshift($args,$_SESSION['language']); - return call_user_func_array("_translate",$args); -} - -/** - * Detects user language from Accept-Language HTTP header. - * @param string Fallback language (default: 'en') - * @return string Language code (such as 'en' and 'ja') - */ -function detect_user_language($fallback='en') { - static $user_lang = ''; - - // Already detected - if (!empty($user_lang)) return $user_lang; - - // Check if Accept-Language header is available - if (!isset($_SERVER) || - !isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) || - !is_string($_SERVER['HTTP_ACCEPT_LANGUAGE']) - ) { - // Store result for reusing - $user_lang = $fallback; - return $user_lang; - } - - // Sort Accept-Language by `q` value - $accept_langs = explode(',', preg_replace('/\s/', '', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']))); - $accept_langs_sorted = []; - foreach ($accept_langs as $lang) { - $div = explode(';q=', $lang, 2); - if (count($div) < 2) { - // `q` value was not specfied - // -> Set default `q` value (1) - $div[] = '1'; - } - list($code, $q) = $div; - if (preg_match('/^[\w\-]+$/', $code)) { - // Acceptable language code - $accept_langs_sorted[$code] = (double)$q; - } - } - arsort($accept_langs_sorted); - - // List languages - exec (VESTA_CMD."v-list-sys-languages json", $output, $return_var); - $languages = json_decode(implode('', $output), true); - unset($output); - - // Find best matching language - foreach ($accept_langs_sorted as $user_lang => $dummy) { - $decision = ''; - foreach ($languages as $prov_lang) { - if (strlen($decision) > strlen($prov_lang)) continue; - if (strpos($user_lang, $prov_lang) !== false) { - $decision = $prov_lang; - } - } - if (!empty($decision)) { - // Store result for reusing - $user_lang = $decision; - return $user_lang; - } - } - - // Store result for reusing - $user_lang = $fallback; - return $user_lang; -} \ No newline at end of file + 1) { + $args[0] = $text; + return call_user_func_array('sprintf', $args); + } else { + return $text; + } +} + +/** + * Translates string by a given key in first parameter to current session language. Works like sprintf + * @global array $LANG Associative array of language pharses + * @return string Translated string + * @see _translate() + */ +function __() { + $args = func_get_args(); + array_unshift($args, $_SESSION['language']); + return call_user_func_array('_translate', $args); +} + +/** + * Detects user language from Accept-Language HTTP header. + * @param string Fallback language (default: 'en') + * @return string Language code (such as 'en' and 'ja') + */ +function detect_user_language($fallback='en') { + static $user_lang = ''; + + // Already detected + if (!empty($user_lang)) return $user_lang; + + // Check if Accept-Language header is available + if (!isset($_SERVER) || + !isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) || + !is_string($_SERVER['HTTP_ACCEPT_LANGUAGE']) + ) { + // Store result for reusing + $user_lang = $fallback; + return $user_lang; + } + + + // Sort Accept-Language by `q` value + $accept_langs = explode(',', preg_replace('/\s/', '', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']))); + $accept_langs_sorted = array() ; + foreach ($accept_langs as $lang) { + $div = explode(';q=', $lang, 2); + if (count($div) < 2) { + // `q` value was not specfied + // -> Set default `q` value (1) + $div[] = '1'; + } + list($code, $q) = $div; + if (preg_match('/^[\w\-]+$/', $code)) { + // Acceptable language code + $accept_langs_sorted[$code] = (double)$q; + } + } + arsort($accept_langs_sorted); + + // List languages + exec (VESTA_CMD."v-list-sys-languages json", $output, $return_var); + $languages = json_decode(implode('', $output), true); + unset($output); + + // Find best matching language + foreach ($accept_langs_sorted as $user_lang => $dummy) { + $decision = ''; + foreach ($languages as $prov_lang) { + if (strlen($decision) > strlen($prov_lang)) continue; + if (strpos($user_lang, $prov_lang) !== false) { + $decision = $prov_lang; + } + } + if (!empty($decision)) { + // Store result for reusing + $user_lang = $decision; + return $user_lang; + } + } + + // Store result for reusing + $user_lang = $fallback; + return $user_lang; +} + +/** + * Detects user language . + * @param string Fallback language (default: 'en') + * @return string Language code (such as 'en' and 'ja') + */ + +function detect_login_language(){ + +} diff --git a/web/inc/i18n/ar.php b/web/inc/i18n/ar.php index ca9fbb1d..fd7b5c46 100644 --- a/web/inc/i18n/ar.php +++ b/web/inc/i18n/ar.php @@ -5,12 +5,12 @@ */ $LANG['ar'] = array( - 'Packages' => 'الحزم', - 'IP' => 'بروتوكول إنترنت', + 'Packages' => 'حزم الاستضافة', + 'IP' => 'عناوين IP', 'Graphs' => 'رسوم بيانية', 'Statistics' => 'إحصائيات', - 'Log' => 'سجل', - 'Server' => 'نادل', + 'Log' => 'سجل العمليات', + 'Server' => 'المخدم والخدمات', 'Services' => 'خدمات', 'Firewall' => 'جدار الحماية', 'Updates' => 'تحديثات', @@ -18,31 +18,46 @@ $LANG['ar'] = array( 'Log out' => 'تسجيل الخروج', 'USER' => 'المستخدم', - 'WEB' => 'الشبكة', - 'DNS' => 'نظام أسماء النظاقات', + 'WEB' => 'نطاقات الويب', + 'DNS' => 'بيانات DNS', 'MAIL' => 'البريد', - 'DB' => 'قاعدة بيانات', + 'DB' => 'قواعد بيانات', 'CRON' => 'مجدول الوظائف', 'BACKUP' => 'النسخ الإحتياطية', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'إضافة مستخدم', 'Add Domain' => 'إضافة نطاق', - 'Add Web Domain' => 'إضافة نطاق شبكة', - 'Add DNS Domain' => 'تسجيل نطاق في النظام', - 'Add DNS Record' => 'إضافة سجل للنظام', - 'Add Mail Domain' => 'إضافة نطاق بريدي', + 'Add Web Domain' => 'إضافة نطاق', + 'Add DNS Domain' => 'تسجيل نطاق في DNS', + 'Add DNS Record' => 'إضافة سجل DNS', + 'Add Mail Domain' => 'إضافة نطاق للبريد', 'Add Mail Account' => 'إضافة حساب بريدي', 'Add Database' => 'إضافة قاعدة بيانات', 'Add Cron Job' => 'إضافة وظيفة مجدولة', 'Create Backup' => 'إنشاء نسخة احتياطية', - 'Configure' => 'تهيئة', + 'Configure' => 'إعداد', 'Restore All' => 'استرجاع الكل', - 'Add Package' => 'إضافة رزمة', - 'Add IP' => 'إضافة بروتوكول إنترنت', + 'Add Package' => 'إضافة حزمة', + 'Add IP' => 'إضافة أي بي', 'Add Rule' => 'إضافة قاعدة', - 'Ban IP Address' => 'عنوان كتلة', + 'Ban IP Address' => 'العناوين المحجوبة', 'Search' => 'بحث', - 'Add one more FTP Account' => 'إضافة المزيد من حساب واحد', + 'Add one more FTP Account' => 'إضافة حساب FTP إضافي', 'Overall Statistics' => 'إحصائيات عامة', 'Daily' => 'يومي', 'Weekly' => 'أسبوعي', @@ -51,34 +66,34 @@ $LANG['ar'] = array( 'Add' => 'إضافة', 'Back' => 'رجوع', 'Save' => 'حفظ', - 'Submit' => 'تسليم', + 'Submit' => 'موافق', - 'toggle all' => 'تبديل الجميع', - 'apply to selected' => 'تطبيق على ما تم اختياره', - 'rebuild' => 'إعادة إنشاء', - 'rebuild web' => 'إعادة إنشاء الشبكة', - 'rebuild dns' => 'إعادة إنشاء نظام أسماء النطاقات', - 'rebuild mail' => 'إعادة إنشاء البريد', - 'rebuild db' => 'إعادة إنشاء قاعدة البيانات', - 'rebuild cron' => 'إعادة إنشاء مجدول الوظائف', - 'update counters' => 'تحديث العدادات', - 'suspend' => 'تعليق', - 'unsuspend' => 'إلغاء التعليق', + 'toggle all' => 'تحديد الكل', + 'apply to selected' => 'تطبيق على المحدد', + 'rebuild' => 'إعادة بناء', + 'rebuild web' => 'إعادة بناء النطاقات', + 'rebuild dns' => 'إعادة بناء DNS', + 'rebuild mail' => 'إعادة بناء البريد', + 'rebuild db' => 'إعادة بناء قاعدة البيانات', + 'rebuild cron' => 'إعادة بناء مجدول الوظائف', + 'update counters' => 'تحديث الأعداد', + 'suspend' => 'تعطيل', + 'unsuspend' => 'إلغاء التعطيل', 'delete' => 'حذف', 'show per user' => 'عرض حسب المستخدم', 'login as' => 'تسجيل الدخول ك', 'logout' => 'تسجيل الخروج', 'edit' => 'تعديل', - 'open webstats' => 'فتح احصائيات الشبكة', + 'open webstats' => 'فتح الإحصائيات', 'view logs' => 'عرض السجلات', 'list records' => 'عرض السجلات', 'add record' => 'إضافة سجل', 'list accounts' => 'عرض الحسابات', 'add account' => 'إضافة حساب', - 'open webmail' => 'فتح شبكة البريد', - 'list fail2ban' => 'عرض قائمة القائمة', + 'open webmail' => 'فتح برنامج البريد من المتصفح ', + 'list fail2ban' => 'list fail2ban', // please make it as short as "list fail2ban" 'عرض قائمة المحظورين للدخول الخاطئ', 'open %s' => 'فتح %s', - 'download' => 'تحميل', + 'download' => 'تنزيل', 'restore' => 'استرجاع', 'configure restore settings' => 'تهيئة إعدادات الاسترجاع', 'stop' => 'إيقاف', @@ -86,10 +101,12 @@ $LANG['ar'] = array( 'restart' => 'إعادة تشغيل', 'update' => 'تحديث', 'generate' => 'تكوين', - 'Generate CSR' => 'تكوين طلب توقيع شهادة', - 'reread IP' => 'إعادة قراءة بروتوكول الإنترنت', + 'Generate CSR' => 'تكوين طلب توقيع شهادة CSR', + 'reread IP' => 'إعادة قراءة IP', 'enable autoupdate' => 'تمكين التحديث التلقائي', 'disable autoupdate' => 'تعطيل التحديث التلقائي', + 'turn on notifications' => 'turn on notific.', + 'turn off notifications' => 'turn off notific.', 'Adding User' => 'جاري إضافة مستخدم', 'Editing User' => 'جاري تعديل المستخدم', @@ -107,21 +124,21 @@ $LANG['ar'] = array( 'Editing Cron Job' => 'جاري تعديل وظيفة مجدولة', 'Adding Cron Job' => 'جاري إضافة وظيفة مجدولة', 'Editing Database' => 'جاري تعديل قاعدة البيانات', - 'Adding Package' => 'جاري إضافة رزمة', - 'Editing Package' => 'جاري تعديل الرزمة', - 'Adding IP address' => 'جاري إضافة عنوان بروتوكول إنترنت', - 'Editing IP Address' => 'جاري تعديل عنوان بروتوكول إنترنت', + 'Adding Package' => 'جاري إضافة حزمة', + 'Editing Package' => 'جاري تعديل الحزمة', + 'Adding IP address' => 'جاري إضافة IP', + 'Editing IP Address' => 'جاري تعديل IP', 'Editing Backup Exclusions' => 'جاري تعديل استثناءات النسخة الاحتياطية', - 'Generating CSR' => 'جاري إنشاء طلب توقيع شهادة', + 'Generating CSR' => 'جاري إنشاء طلب توقيع شهادة CSR', 'Listing' => 'قائمة', 'Search Results' => 'نتائج البحث', - 'Adding Firewall Rule' => 'مضيفا القاعدة جدار الحماية', - 'Editing Firewall Rule' => 'جدار حماية القاعدة التحرير', + 'Adding Firewall Rule' => 'جاري إضافة قاعدة لجدار الحماية', + 'Editing Firewall Rule' => 'جاري تعديل قاعدة لجدار الحماية', 'Adding IP Address to Banlist' => 'مضيفا عنوان IP إلى القائمة السوداء', 'active' => 'نشط', - 'spnd' => 'معلق', - 'suspended' => 'معلق', + 'spnd' => 'معطل', + 'suspended' => 'تم تعطيله', 'running' => 'يعمل', 'stopped' => 'متوقف', 'outdated' => 'نسخة قديمة', @@ -131,9 +148,9 @@ $LANG['ar'] = array( 'no' => 'لا', 'none' => 'لا شيء', 'pb' => 'pb', - 'tb' => 'tb', - 'gb' => 'gb', - 'mb' => 'mb', + 'tb' => 'تيرا', + 'gb' => 'غيغا', + 'mb' => 'ميغا', 'minute' => 'دقيقة', 'hour' => 'ساعة', 'day' => 'يوم', @@ -141,58 +158,71 @@ $LANG['ar'] = array( 'hours' => 'ساعات', 'minutes' => 'دقائق', 'month' => 'شهر', - 'package' => 'رزمة', - 'Bandwidth' => 'عرض النطاق', - 'Disk' => 'إسطوانة', - 'Web' => 'شبكة', - 'Mail' => 'بريد', - 'Databases' => 'قواعد بيانات', + 'package' => 'حزمة', + 'Bandwidth' => 'تبادل البيانات', + 'Disk' => 'التخزين', + 'Web' => 'الويب', + 'Mail' => 'البريد', + 'Databases' => 'قواعد البيانات', 'User Directories' => 'مجلدات المستخدم', 'Template' => 'نموذج', 'Web Template' => 'أباتشي نموذج', 'Backend Template' => 'Backend نموذج', 'Proxy Template' =>'Proxy نموذج', - 'DNS Template' => 'نظام أسماء النطاقات نموذج', - 'Web Domains' => 'نطاقات الشبكة', - 'SSL Domains' => 'نطاقات آمنة', - 'Web Aliases' => 'اختصارات الشبكة', + 'DNS Template' => 'نموذج DNS', + 'Web Domains' => 'نطاقات ويب', + 'SSL Domains' => 'نطاقات آمنة SSL', + 'Web Aliases' => 'الأسماء البديلة', 'per domain' => 'لكل نطاق', - 'DNS Domains' => 'نطاقات النظام', - 'DNS Domains' => 'نطاقات النظام', - 'DNS records' => 'سجلات النظام' , - 'Name Servers' => 'خوادم الأسماء', + 'DNS Domains' => 'نطاقات DNS', + 'DNS domains' => 'نطاقات DNS', + 'DNS records' => 'سجلات DNS', + 'Name Servers' => 'خوادم الأسماء
Name Servers', 'Mail Domains' => 'نطاقات البريد', 'Mail Accounts' => 'حسابات البريد', 'Cron Jobs' => 'الوظائق المجدولة', - 'SSH Access' => 'وصول بعيد آمن', - 'IP Addresses' => 'عنوان بروتوكول انترنت', + 'SSH Access' => 'دخول SSH', + 'IP Address' => 'عناوين الأي بي', + 'IP Addresses' => 'عنوان IP', 'Backups' => 'نسخ احتياطية', 'Backup System' => 'نظام النسخ الاحتياطي', 'backup exclusions' => 'استثناءات النسخ الاحتياطي', 'template' => 'نموذج', - 'SSL Support' => 'دعم طبقة المقبض الآمن', - 'SSL Home Directory' => 'المجلد الرئيسي لطبقة المقبض الآمن', - 'Proxy Support' => 'Proxy دعم', - 'Proxy Extensions' => 'Proxy إمتدادات', - 'Web Statistics' => 'إحصائيات الشبكة', - 'Additional FTP Account' => 'حساب بروتوكول نقل الملفات إضافي', - 'SOA' => 'هيكلية الخدمات الموجهة', - 'TTL' => 'الوقت المتبقي للخروج', + 'SSL Support' => 'دعم SSL', + 'SSL Home Directory' => 'المجلد الرئيسي لـ SSL', + 'Proxy Support' => 'دغم بروكسي', + 'Proxy Extensions' => 'توسعات بروكسي', + 'Web Statistics' => 'إحصائيات الوب', + 'Additional FTP Account' => 'حساب FTP إضافي
لا تحتاج حساب إضافي عادة ويتم الدخول باسم المستخدم نفسه', + 'Path' => 'المسار', + 'SOA' => 'SOA', + 'TTL' => 'TTL', 'Expire' => 'تنقضي', 'Records' => 'سجلات', - 'Catchall email' => 'حصل كل البريد', + 'Serial' => 'رقم متسلسل', + 'Catchall email' => 'استقبل أي بريد', 'AntiVirus Support' => 'دعم مضاد الفيروسات', - 'AntiSpam Support' => 'دعم مضاد البريد المزعج', - 'DKIM Support' => 'دعم مفاتيح النطاقات', + 'AntiSpam Support' => 'دعم مضاد البريد المزعج (سبام)', + 'DKIM Support' => 'دعم مفاتيح DKIM لمحاربة السبام', 'Accounts' => 'حسابات', - 'Quota' => 'حصة', + 'Quota' => 'الحجم المخصص', 'Autoreply' => 'الرد الآلي', - 'Forward to' => 'إعادة توجيه ل', - 'Do not store forwarded mail' => 'لا تحتفظ بنسخة من البريد المعاد توجيهه', + 'Forward to' => 'إعادة توجيه إلى', + 'Do not store forwarded mail' => 'عدم الاحتفاظ بنسخة البريد المعاد توجيهه', + 'IMAP hostname' => 'مضيف IMAP', + 'IMAP port' => 'منفذ IMAP', + 'IMAP security' => 'أمان IMAP', + 'IMAP auth method' => 'طريقة تسجيل الدخول IMAP', + 'SMTP hostname' => 'مضيف SMTP', + 'SMTP port' => 'منفذ SMTP', + 'SMTP security' => 'أمان SMTP', + 'SMTP auth method' => 'طريقة تسجيل الدخول SMTP', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'كلمة مرور طبيعية', 'database' => 'قاعدة بيانات', - 'User' => 'مستخدم', - 'Host' => 'مضيف', - 'Charset' => 'حزمة نص', + 'User' => 'المستخدم', + 'Host' => 'المضيف', + 'Charset' => 'تنسيق النص', 'Min' => 'دقيقة', 'Hour' => 'ساعة', 'Day' => 'يوم', @@ -210,94 +240,97 @@ $LANG['ar'] = array( 'Users' => 'مستخدمين', 'Load Average' => 'متوسط التحميل', 'Memory Usage' => 'استخدام الذاكرة', + 'APACHE2 Usage' => 'استخدام APACHE2', 'HTTPD Usage' => 'استخدام نظام بروتوكول نقل النص التشعبي', 'NGINX Usage' => 'NGINX استخدام', 'MySQL Usage on localhost' => 'استخدام قاعدة بيانات MySql على المضيف المحلي', 'PostgreSQL Usage on localhost' => 'PostgreSQL استخدام قاعدة بيانات على المضيف المحلي', 'Bandwidth Usage eth0' => 'eth0 استخدام سعة النطاق على منفذ', - 'FTP Usage' => 'استخدام بروتوكول نقل الملفات', - 'SSH Usage' => 'استخدام الوصول البعيد الآمن', - 'reverse proxy' => 'الوكيل العكسي', - 'web server' => 'خادم الشبكة', - 'dns server' => 'خادم نظام أسماء النطاقات', - 'mail server' => 'خادم البريد', - 'pop/imap server' => 'pop/imap خادم', + 'Exim Usage' => 'استخدام Exim', + 'FTP Usage' => 'استخدام FTP', + 'SSH Usage' => 'استخدام SSH', + 'reverse proxy' => 'بروكسي عكسي', + 'web server' => 'مخدم الويب', + 'dns server' => 'مخدم DNS', + 'mail server' => 'مخدم البريد', + 'pop/imap server' => 'pop/imap مخدم', 'email antivirus' => 'مضاد فيروسات البريد', 'email antispam' => 'مضاد البريد المزعج', - 'database server' => 'خادم قاعدة البيانات', - 'ftp server' => 'خادم بروتوكول نقل الملفات', + 'database server' => 'مخدم قاعدة البيانات', + 'ftp server' => 'مخدم FTP', 'job scheduler' => 'مجدول الوظائف', - 'CPU' => 'وحدة المعالجة المركزية', + 'firewall' => 'جدار النار', + 'brute-force monitor' => 'brute-force monitor', + 'CPU' => 'المعالج', 'Memory' => 'الذاكرة', 'Uptime' => 'وقت التشغيل', - 'core package' => 'الرزمة الأساسية', + 'core package' => 'الحزمة الأساسية', 'php interpreter' => 'php مترجم', - 'internal web server' => 'خادم الشبكة الداخلي', + 'internal web server' => 'مخدم الويب الداخلي', 'Version' => 'إصدار', 'Release' => 'نسخة', 'Architecture' => 'هيكلية', 'Object' => 'عنصر', - 'Owner' => 'مالك', 'Username' => 'اسم المستخدم', 'Password' => 'كلمة المرور', - 'Email' => 'بريد', - 'Package' => 'رزمة', - 'Language' => 'لغة', + 'Email' => 'البريد الالكتروني', + 'Package' => 'حزمة الاستضافة', + 'Language' => 'اللغة', 'First Name' => 'الإسم الأول', 'Last Name' => 'الإسم الأخير', 'Send login credentials to email address' => 'إرسال معلومات الدخول لعنوان البريد', 'Default Template' => 'نموذج افتراضي', - 'Default Name Servers' => 'أسماء الخوادم الافتراضية', - 'Domain' => 'نطاق', - 'DNS Support' => 'دعم نظام أسماء النطاقات', - 'Mail Support' => 'دعم البريد', - 'Advanced options' => 'خيارات متقدمة', - 'Aliases' => 'اختصارات', - 'SSL Certificate' => 'شهادة طبقة مقبس آمن', - 'SSL Key' => 'مفتاح طبقة المقبس الآمن', - 'SSL Certificate Authority / Intermediate' => 'سلطة / متوسط شهادة طبقة المقبس الآمن ', - 'SSL CSR' => 'طلب توقيع شهادة باستخدام طبقة المقبس الآمن', + 'Default Name Servers' => 'أسماء خوادم(NS) الافتراضية', + 'Domain' => 'النطاق (الدومين)', + 'DNS Support' => 'إضافةإلى بيانات DNS (افتراضي)', + 'Mail Support' => 'إضافة إلى نطاقات البريد (افتراضي)', + 'Advanced options' => 'المزيد من الخيارات المتقدمة', + 'Aliases' => 'الأسماء البديلة (تعمل عمل الاسم الرئيسي)', + 'SSL Certificate' => 'شهادة أمان SSL', + 'SSL Key' => 'مفتاح شهادة أمان SSL', + 'SSL Certificate Authority / Intermediate' => 'سلطة / متوسط شهادة شهادة أمان SSL ', + 'SSL CSR' => 'طلب توقيع شهادة باستخدام شهادة أمان SSL', 'optional' => 'اختياري', 'internal' => 'داخلي', - 'Statistics Authorization' => 'احصائيات الصلاحيات', + 'Statistics Authorization' => 'الدخول للإحصائيات بكلمة مرور', 'Statistics Auth' => 'إحصائيات الصلاحيات', 'Account' => 'حساب', 'Prefix will be automaticaly added to username' => 'سيضاف بشكل آلي لأسم المستخدم %s اختصار', - 'Send FTP credentials to email' => 'إرسال معلومات الاعتماد لبروتوكول نقل الملفات للبريد', + 'Send FTP credentials to email' => 'إرسال معلومات اعتماد FTP للبريد الالكتروني', 'Expiration Date' => 'تاريخ الانتهاء', 'YYYY-MM-DD' => 'YYYY-MM-DD', - 'Name servers' => 'خوادم الأسماء', + 'Name servers' => 'خوادم الأسماء Name Servers', 'Record' => 'سجل', - 'IP or Value' => 'بروتوكول إنترنت أو قيمة', + 'IP or Value' => 'عنوان IP أو القيمة', 'Priority' => 'أولوية', 'Record Number' => 'عدد السجلات', 'in megabytes' => 'ب ميجا بابت', 'Message' => 'رسالة', - 'use local-part' => 'استخدم جزء محلي', + 'use local-part' => 'دون كتابة اسم النطاق الرئيسي', 'one or more email addresses' => 'عنوان بريدي واحد أو أكثر', - 'Prefix will be automaticaly added to database name and database user' => 'الاختصار سيتم إضافته بشكل آلي لإسم قاعدة البيانات واسم المستخدم %s', - 'Database' => 'قاعدة بيانات', + 'Prefix will be automaticaly added to database name and database user' => 'البادئة %s ستتم إضافتها بشكل آلي لإسم قاعدة البيانات واسم المستخدم', + 'Database' => 'قاعدة البيانات', 'Type' => 'نوع', 'Minute' => 'دقيقة', 'Command' => 'أمر', - 'Package Name' => 'إسم الرزمة', + 'Package Name' => 'إسم الحزمة', 'Netmask' => 'قناع الشبكة', 'Interface' => 'واجهة', - 'Shared' => 'مشارك', + 'Shared' => 'مشارَك', 'Assigned user' => 'المستخدم المعين', 'Assigned domain' => 'النطاق المعين', 'NAT IP association' => 'جمعية ترجمة عناوين بروتوكول الانترنت', - 'shell' => 'منصب', + 'shell' => 'shell', 'web domains' => 'نطاقات شبكة', - 'web aliases' => 'اسماء الشبكة المستعارة', - 'dns records' => 'سجلات نظام أسماء النطاقات', - 'mail domains' => 'نطاقات البريد', + 'web aliases' => 'الاسماء المستعارة', + 'dns records' => 'سجلات نظام أسماء النطاقات DNS', + 'mail domains' => 'النطاقات المستخدمة للبريد', 'mail accounts' => 'حسابات البريد', 'accounts' => 'حسابات', 'databases' => 'قواعد بيانات', 'cron jobs' => 'وظائف مجدولة', 'backups' => 'نسخ احتياطية', - 'quota' => 'حصة', + 'quota' => 'الحجم المخصص', 'day of week' => 'اليوم من الإسبوع', 'cmd' => 'أمر', 'users' => 'مستخدمين', @@ -307,47 +340,67 @@ $LANG['ar'] = array( 'jobs' => 'وظائف', 'username' => 'اسم المستخدم', 'password' => 'كلمة المرور', - 'type' => 'نوع', - 'charset' => 'حزمة نص', + 'type' => 'النوع', + 'charset' => 'تنسيق النص', 'domain' => 'نطاق', - 'ip' => 'بروتوكول إنترنت', - 'ip address' => 'عنوان بروتوكول إنترنت', - 'IP address' => 'عنوان بروتوكول إنترنت', + 'ip' => 'IP', + 'ip address' => 'عنوان IP', + 'IP address' => 'عنوان IP', 'netmask' => 'قناع شبكة', 'interface' => 'واجهة', 'assigned user' => 'المستخدم المعين', - 'ns1' => 'مساحة اسم 1', - 'ns2' => 'مساحة اسم 2', + 'ns1' => 'ns1', + 'ns2' => 'ns2', 'user' => 'مستخدم', 'email' => 'بريد', 'first name' => 'الإسم الأول', 'last name' => 'الاسم الأخير', 'account' => 'حساب', - 'ssl certificate' => 'شهادة طبقة مقبس آمن', - 'ssl key' => 'مفتاح طبقة مقبس آمن', + 'ssl certificate' => 'شهادة طبقة مقبس آمن SSL', + 'ssl key' => 'مفتاح طبقة مقبس آمن SSL', 'stats user password' => 'كلمة مرور مستخدم الإحصائيات', 'stats username' => 'مستخدم الإحصائيات', 'stats password' => 'كلمة مرور الإحصائيات', - 'ftp user password' => 'كلمة مرور مستخدم بروتوكول نقل الملفات', - 'ftp user' => 'مستخدم بروتوكول نقل الملفات', + 'ftp user password' => 'كلمة مرور FTP', + 'ftp user' => 'مستخدم FTP', 'Last 70 lines of %s.%s.log' => 'آخر 70 سطر في %s.%s.log', - 'Download AccessLog' => 'تحميل سجلات الوصول', - 'Download ErrorLog' => 'تحميل سجلات الأخطاء', + 'AccessLog' => 'سجلات الدخول', + 'ErrorLog' => 'سجلات الأخطاء', + 'Download AccessLog' => 'تنزيل سجلات الوصول', + 'Download ErrorLog' => 'تنزيل سجلات الأخطاء', 'Country' => 'البلد', - '2 letter code' => 'كود من رسالتين', + '2 letter code' => 'كود من حرفين', 'State / Province' => 'ولاية / مقاطعة', 'City / Locality' => 'المدينة / المنطقة', 'Organization' => 'مؤسسة', 'Action' => 'إجراء', - 'Protocol' => 'Protocol', - 'Port' => 'بروتوكول', + 'Protocol' => 'بروتوكول', + 'Port' => 'منفذ', 'Comment' => 'تعليق', - 'Banlist' => 'قائمة ممنوعة', + 'Banlist' => 'قائمة الحجب', 'ranges are acceptable' => 'نطاقات مقبولة', 'CIDR format is supported' => 'ويدعم صيغة CIDR', - 'Add one more Name Server' => 'Add one more Name Server', + 'ACCEPT' => 'موافق', + 'DROP' => 'حذف', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'فيستا', + 'Add one more Name Server' => 'إضافة مخدم أسماء (NS) جديد', - 'unlimited' => 'unlimited', + 'web domain' => 'نطاق ويب', + 'dns domain' => 'نطاق dns', + 'dns record' => 'سجل dns', + 'mail domain' => 'نطاق بريد الكتروني', + 'mail account' => 'حساب بريد الكتروني', + 'cron job' => 'الأعمال المجدولة', + + 'cron' => 'جدولة', + 'user dir' => 'مجلد المستخدم', + + 'unlimited' => 'غير محدود', '1 account' => '1 حساب', '%s accounts' => 'حسابات %s', '1 domain' => '1 نطاق', @@ -362,7 +415,9 @@ $LANG['ar'] = array( '%s cron jobs' => 'وظائف مجدولة %s', '1 archive' => '1 أرشيف', '%s archives' => 'أرشيف %s', - '1 package' => '1 رزمة', + '1 item' => '1 عنصر', + '%s items' => '%s عناصر', + '1 package' => '1 حزمة', '%s packages' => 'رزم %s', '1 IP address' => '1 عنوان بروتوكول إنترنت', '%s IP addresses' => 'عناوين بروتوكول إنترنت %s', @@ -373,8 +428,8 @@ $LANG['ar'] = array( '1 object' => '1 عنصر', '%s objects' => 'عناصر %s', 'no exclusions' => 'لا استثناءات', - '1 rule' => '1 عنصر', - '%s rule' => 'عناصر %s', + '1 rule' => '1 قاعدة', + '%s rules' => '%s قواعد', 'There are no currently banned IP' => 'لا يوجد عناوين IP المحظورة حاليالا يوجد عناوين IP المحظورة حاليا', 'USER_CREATED_OK' => 'المستخدم %s تم إنشائه بنجاح', @@ -386,9 +441,10 @@ $LANG['ar'] = array( 'DATABASE_CREATED_OK' => 'قاعدة البيانات %s تم إنشائها بنجاح', 'CRON_CREATED_OK' => 'الوظيفة المجدولة تم إنشائها بنجاح.', 'IP_CREATED_OK' => 'عنوان بروتوكول الإنترنت %s تم إنشائه بنجاح.', - 'PACKAGE_CREATED_OK' => 'الرزمة %s تم إنشائها بنجاح.', + 'PACKAGE_CREATED_OK' => 'الحزمة %s تم إنشائها بنجاح.', 'SSL_GENERATED_OK' => 'تم إنشاء الشهادة بنجاح.', 'RULE_CREATED_OK' => 'تم إنشاء القاعدة بنجاح.', + 'BANLIST_CREATED_OK' => 'تم حجب عنوان الأي بي بنجاح', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'تم تفيعل التحديث التلقائي بنجاح', 'Autoupdate has been successfully disabled' => 'تم تعطيل التحديث التلقائي بنجاح', 'Cronjob email reporting has been successfully enabled' => 'تم تمكين إعداد التقارير البريد الإلكتروني بنجاح', @@ -396,32 +452,31 @@ $LANG['ar'] = array( 'Changes has been saved.' => 'تم حفظ التغييرات بنجاح.', 'Confirmation' => 'Confirmation', 'DELETE_USER_CONFIRMATION' => 'هل تريد فعلا حذف المستخدم %s?', - 'SUSPEND_USER_CONFIRMATION' => 'هل تريد فعلا تعليق المستخدم %s?', + 'SUSPEND_USER_CONFIRMATION' => 'هل تريد فعلا تعطيل المستخدم %s?', 'UNSUSPEND_USER_CONFIRMATION' => 'هل تريد فعلا إلغاء تعليق المستخدم %s?', 'DELETE_DOMAIN_CONFIRMATION' => 'هل تريد فعلا حذف النطاق %s?', - 'SUSPEND_DOMAIN_CONFIRMATION' => 'هل تريد فعلا تعليق النطاق %s?', - 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'هل تريد فعلا إلغاء تعليق النطاق %s?', + 'SUSPEND_DOMAIN_CONFIRMATION' => 'هل تريد فعلا تعطيل النطاق %s?', + 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'هل تريد فعلا إلغاء تعطيل النطاق %s?', 'DELETE_RECORD_CONFIRMATION' => 'هل تريد فعلا حذف السجل %s?', - 'SUSPEND_RECORD_CONFIRMATION' => 'هل تريد فعلا تعليق السجل %s?', - 'UNSUSPEND_RECORD_CONFIRMATION' => 'هل تريد فعلا إلغاء تعليق السجل %s?', + 'SUSPEND_RECORD_CONFIRMATION' => 'هل تريد فعلا تعطيل السجل %s?', + 'UNSUSPEND_RECORD_CONFIRMATION' => 'هل تريد فعلا إلغاء تعطيل السجل %s?', 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'هل تريد فعلا حذف %s?', - 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'هل تريد فعلا تعليق %s?', - 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'هل تريد فعلا إلغاء تعليق %s?', + 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'هل تريد فعلا تعطيل %s?', + 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'هل تريد فعلا إلغاء تعطيل %s?', 'DELETE_DATABASE_CONFIRMATION' => 'هل تريد فعلا حذف قاعدة البيانات %s?', - 'SUSPEND_DATABASE_CONFIRMATION' => 'هل تريد فعلا تعليق قاعدة البيانات %s?', - 'UNSUSPEND_DATABASE_CONFIRMATION' => 'هل تريد فعلا إلغاء تعليق قاعدة البيانات %s?', + 'SUSPEND_DATABASE_CONFIRMATION' => 'هل تريد فعلا تعطيل قاعدة البيانات %s?', + 'UNSUSPEND_DATABASE_CONFIRMATION' => 'هل تريد فعلا إلغاء تعطيل قاعدة البيانات %s?', 'DELETE_CRON_CONFIRMATION' => 'هل تريد فعلا حذف الوظيفة المجدولة?', - 'SUSPEND_CRON_CONFIRMATION' => 'هل تريد فعلا تعليق الوظيفة المجدولة?', - 'UNSUSPEND_CRON_CONFIRMATION' => 'هل تريد فعلا إلغاء تعليق الوظيفة المجدولة?', + 'SUSPEND_CRON_CONFIRMATION' => 'هل تريد فعلا تعطيل الوظيفة المجدولة?', + 'UNSUSPEND_CRON_CONFIRMATION' => 'هل تريد فعلا إلغاء تعطيل الوظيفة المجدولة?', 'DELETE_BACKUP_CONFIRMATION' => 'هل تريد فعلا حذف التسخة الاحتياطية %s ?', 'DELETE_EXCLUSION_CONFIRMATION' => 'هل تريد فعلا حذف الاستثناء %s?', - 'DELETE_PACKAGE_CONFIRMATION' => 'هل تريد فعلا حذف الرزمة %s?', + 'DELETE_PACKAGE_CONFIRMATION' => 'هل تريد فعلا حذف الحزمة %s?', 'DELETE_IP_CONFIRMATION' => 'هل تريد فعلا حذف عنوان بروتوكول الإنترنت %s?', - 'DELETE_RULE_CONFIRMATION' => 'هل أنت متأكد أنك تريد حذف حكم %s?', - 'SUSPEND_RULE_CONFIRMATION' => 'هل أنت متأكد أنك تريد تعليق حكم %s?', - 'UNSUSPEND_RULE_CONFIRMATION' => 'هل أنت متأكد أنك تريد إلغاء تعليق حكم %s?', + 'DELETE_RULE_CONFIRMATION' => 'هل أنت متأكد أنك تريد حذف قاعدة %s?', + 'SUSPEND_RULE_CONFIRMATION' => 'هل أنت متأكد أنك تريد تعطيل قاعدة %s?', + 'UNSUSPEND_RULE_CONFIRMATION' => 'هل أنت متأكد أنك تريد إلغاء تعليق قاعدة %s?', 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', - 'RESTART_CONFIRMATION' => 'هل أنت متأكد من أنك تريد إعادة تشغيل %s?', 'Welcome' => 'أهلا وسهلا', 'LOGGED_IN_AS' => 'تم تسجيل الدخول ك %s', @@ -440,12 +495,12 @@ $LANG['ar'] = array( 'RESTORE_SCHEDULED' => ' تم إضافة الوظيفة لطابور المهام. سيتم إرسال بريد إلكتروني لك عندما تجهز النسخة الاحتياطية للتحميل.', 'RESTORE_EXISTS' =>'يوجد عملية استعادة تعمل حاليا. برجاء الانتظار حتى تنتهي عملية الاستعادة قبل البدء بعملية جديدة.', - 'WEB_EXCLUSIONS' => "اكتب اسم النطاق. واحد في كل سطر. لاستثناء جميع النطاقات استخدم *.. لاستثناء جميع مجالات النطاق استخدم الصيغة التالية: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "اكتب اسم النطاق, واحد في كل سطر. لاستثناء جميع النطاقات استخدم *", - 'MAIL_EXCLUSIONS' => "اكتب اسم النطاق, واحد في كل سطر. لاستثناء جميع النطاقات استخدم *. لاستثناء حسابات معينة استخدم الصيغة: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "اكتب اسم قاعدة البيانات بالكامل, واحدة في كل سطر. لاستثناء جميع قواعد البيانات استخدم *", - 'CRON_EXCLUSIONS' => "لاستثناء جميع الوظائف المجدولة استخدم *", - 'USER_EXCLUSIONS' => "اكتب اسم المجلد, واحد في كل سطر. لاستثناء جميع المجلدات استخدم *", + 'WEB_EXCLUSIONS' => 'اكتب اسم النطاق. واحد في كل سطر. لاستثناء جميع النطاقات استخدم *.. لاستثناء جميع مجالات النطاق استخدم الصيغة التالية: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'اكتب اسم النطاق, واحد في كل سطر. لاستثناء جميع النطاقات استخدم *', + 'MAIL_EXCLUSIONS' => 'اكتب اسم النطاق, واحد في كل سطر. لاستثناء جميع النطاقات استخدم *. لاستثناء حسابات معينة استخدم الصيغة: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'اكتب اسم قاعدة البيانات بالكامل, واحدة في كل سطر. لاستثناء جميع قواعد البيانات استخدم *', + 'CRON_EXCLUSIONS' => 'لاستثناء جميع الوظائف المجدولة استخدم *', + 'USER_EXCLUSIONS' => 'اكتب اسم المجلد, واحد في كل سطر. لاستثناء جميع المجلدات استخدم *', 'Welcome to Vesta Control Panel' => 'Vesta أهلا بكم في لوحة تحكم', 'MAIL_FROM' => 'Vesta لوحة تحكم ', @@ -464,141 +519,217 @@ $LANG['ar'] = array( 'New Password' => 'كلمة مرور جديدة', 'Confirm Password' => 'تأكيد كلمة المرور', 'Reset' => 'إعادة تعيين', - 'Reset Code' => 'إعادة تعيين الكود', - 'RESET_NOTICE' => '', + 'Reset Code' => 'كود إعادة تعيين', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'لقد تم إرسال كود إعادة تعيين كلمة المرور لعنوان بريدك الإلكتروني
', 'MAIL_RESET_SUBJECT' => 'تم إعادة تعيين كلمة المرور %s', 'PASSWORD_RESET_REQUEST' => "لإعادة تعيين كلمة مرور لوحة التحكم , برجاء اتباع الرابط التالي link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternatively, بامكانك أيضا اتباع الرابط التالي https://%s/reset/?action=code&user=%s وادخال كود إعادة التعيين التالي code:\n%s\n\n إذا لم تطلب إعادة تعيين كلمة المرور, برجاء تجاهل هذه الرسالة وتقبل اعتذارنا.\n\n--\nVesta Control Panel\n", - 'Jan' => 'Jan', - 'Feb' => 'Feb', - 'Mar' => 'Mar', - 'Apr' => 'Apr', - 'May' => 'May', - 'Jun' => 'Jun', - 'Jul' => 'Jul', - 'Aug' => 'Aug', - 'Sep' => 'Sep', - 'Oct' => 'Oct', - 'Nov' => 'Nov', - 'Dec' => 'Dec', + 'Jan' => 'كانون الثاني', + 'Feb' => 'شباط', + 'Mar' => 'آذار', + 'Apr' => 'نيسان', + 'May' => 'أيار', + 'Jun' => 'حزيران', + 'Jul' => 'تموز', + 'Aug' => 'آب', + 'Sep' => 'أيلول', + 'Oct' => 'تشرين الأول', + 'Nov' => 'تشرين الثاني', + 'Dec' => 'كانون الأول', - 'Configuring Server' => 'Configuring Server', - 'Hostname' => 'Hostname', - 'Time Zone' => 'Time Zone', - 'Default Language' => 'Default Language', - 'FileSystem Disk Quota' => 'FileSystem Disk Quota', - 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', - 'preview' => 'preview', - 'Reseller Role' => 'Reseller Role', - 'Web Config Editor' => 'Web Config Editor', - 'Template Manager' => 'Template Manager', - 'Backup Migration Manager' => 'Backup Migration Manager', - 'FileManager' => 'FileManager', - 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', + 'Configuring Server' => 'إعداد المخدم', + 'Hostname' => 'اسم المضيف (host)', + 'Time Zone' => 'المنطقة الزمنية', + 'Default Language' => 'اللغة الافتراضية', + 'Proxy Server' => 'المخدم الوكيل (بروكسي)', + 'Web Server' => 'مخدم الويب', + 'Backend Server' => 'المخدم النهائي', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'مخدم DNS', + 'DNS Cluster' => 'عناقيد DNS', + 'MAIL Server' => 'مخدم البريد الالكتروني', + 'Antivirus' => 'مضاد الفيروسات', + 'AntiSpam' => 'مضاد البريد المزعج سبام', + 'Webmail URL' => 'رابط WebMail', + 'MySQL Support' => 'دعم MySQL', + 'phpMyAdmin URL' => 'رابط phpMyAdmin', + 'PostgreSQL Support' => 'دعم PostgreSQL', + 'phpPgAdmin URL' => 'رابط phpPgAdmin', + 'Maximum Number Of Databases' => 'العدد الأقصى لقواعد البيانات', + 'Current Number Of Databases' => 'العدد الحالي لقواعد البيانات', + 'Local backup' => 'نسخ احتياطي محلي', + 'Compression level' => 'مستوى الضغط', + 'Directory' => 'المجلد', + 'Remote backup' => 'نسخ احتياطي على مخدم بعيد', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => 'نظام تخصيص حجوم الملفات (Quota)', + 'Vesta Control Panel Plugins' => 'إضافات لوحة التحكم فيستا', + 'preview' => 'معاينة', + 'Reseller Role' => 'ميزة الريسيلر', + 'Web Config Editor' => 'محرر إعدادات الويب', + 'Template Manager' => 'مدير القوالب', + 'Backup Migration Manager' => 'مدير ترحيل النسخ الاحتياطي', + 'FileManager' => 'مدير الملفات', + 'show: CPU / MEM / NET / DISK' => 'أظهر بيانات المعالجة / الذاكرة / الشبكة / القرص', - 'sort by' => 'sort by', - 'Date' => 'Date', - 'Starred' => 'Starred', - 'Name' => 'Name', + 'sort by' => 'ترتيب حسب', + 'Date' => 'التاريخ', + 'Starred' => 'المحدد بنجمة', + 'Name' => 'الاسم', + 'File Manager' => 'مدير الملفات', + 'size' => 'الحجم', + 'date' => 'التاريخ', + 'name' => 'الاسم', + 'Initializing' => 'البدء', + 'UPLOAD' => 'رفع', + 'NEW FILE' => 'ملف جديد', + 'NEW DIR' => 'مجلد جديد', + 'DELETE' => 'حذف', + 'RENAME' => 'إعادة تسمية', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'الحقوق', + 'COPY' => 'نسخ', + 'ARCHIVE' => 'ضغط', + 'EXTRACT' => 'فك ضغط', + 'DOWNLOAD' => 'تنزيل', + 'Are you sure?' => 'هل أنت متأكد ?', // unused? + 'Hit' => 'نقر', + 'to reload the page' => 'لإعادة تحميل الصفحة', + 'Directory name cannot be empty' => 'اسم المجلد يجب ان لايكون فارغ', + 'File name cannot be empty' => 'اسم الملف يجب ان لايكون فارغ', + 'No file selected' => 'لم يتم اختيار أي ملف', + 'No file or folder selected' => 'لم يتم اختيار اي ملفأو مجلد', + 'File type not supported' => 'نوع الملف غير مدعوم', + 'Directory download not available in current version' => 'تنزيل مجلد غير متوفر في الإصدارة الحالية', + 'Directory not available' => 'المجلد غير متوفر', + 'Done' => 'تم', + 'Close' => 'إغلاق', + 'Copy' => 'نسخ', + 'Cancel' => 'إلغاء', + 'Rename' => 'إعادة تسمية', + 'Move' => 'Move', + 'Change Rights' => 'تغيير الحقوق', + 'Delete' => 'حذف', + 'Extract' => 'فك ضغط', + 'Create' => 'إنشاء', + 'Compress' => 'ضغط', + 'OK' => 'موافق', + 'YOU ARE COPYING' => 'تقوم بالنسخ ', // unused? + 'YOU ARE REMOVING' => 'تقوم بالحذف', + 'Delete items' => 'حذف العناصر', + 'Copy files' => 'نسخ الملفات', + 'Move files' => 'Move files', + 'Are you sure you want to copy' => 'هل أنت متأكد أنك تريد نسخ', + 'Are you sure you want to move' => 'Are you sure you want to move', + 'Are you sure you want to delete' => 'هل انت متأكد أنك تريد حذف', + 'into' => 'إلى', + 'existing files will be replaced' => 'الملفات الموجودة مسبقاً سوف تستبدل', + 'Original name' => 'الاسم الأصلي', + 'File' => 'ملف', + 'already exists' => 'موجود مسبقاً', + 'Create file' => 'إنشاء ملف', + 'Create directory' => 'إنشاء مجلد', + 'read by owner' => 'القراءة من المالك', + 'write by owner' => 'الكتابة من المالك', + 'execute/search by owner' => 'التنفيذ والبحث من المالك', + 'read by group' => 'القراءة من المجموعة', + 'write by group' => 'الكتابة من المجموعة', + 'execute/search by group' => 'التنفيذ والبحث من المجموعة', + 'read by others' => 'القراءة من الآخرين', + 'write by others' => 'الكتابة من الآخرين', + 'execute/search by others' => 'التنفيذ والبحث من الآخرين', - 'File Manager' => 'File Manager', - 'type' => 'type', - 'size' => 'size', - 'date' => 'date', - 'name' => 'name', - 'Initializing' => 'Initializing', - 'UPLOAD' => 'UPLOAD', - 'NEW FILE' => 'NEW FILE', - 'NEW DIR' => 'NEW DIR', - 'DELETE' => 'DELETE', - 'RENAME' => 'RENAME', - 'COPY' => 'COPY', - 'ARCHIVE' => 'ARCHIVE', - 'EXTRACT' => 'EXTRACT', - 'DOWNLOAD' => 'DOWNLOAD', - 'Hit' => 'Hit', - 'to reload the page' => 'to reload the page', - 'Directory name cannot be empty' => 'Directory name cannot be empty', - 'File name cannot be empty' => 'File name cannot be empty', - 'No file selected' => 'No file selected', - 'No file or folder selected' => 'No file or folder selected', - 'File type not supported' => 'File type not supported', - 'Directory download not available in current version' => 'Directory download not available in current version', - 'Directory not available' => 'Directory not available', - 'Done' => 'Done', - 'Close' => 'Close', - 'Copy' => 'Copy', - 'Cancel' => 'Cancel', - 'Rename' => 'Rename', - 'Delete' => 'Delete', - 'Extract' => 'Extract', - 'Create' => 'Create', - 'Compress' => 'Compress', - 'OK' => 'OK', - 'Are you sure you want to copy' => 'Are you sure you want to copy', - 'Are you sure you want to delete' => 'Are you sure you want to delete', - 'into' => 'into', - 'existing files will be replaced' => 'existing files will be replaced', - 'Original name' => 'Original name', - 'File' => 'File', - 'already exists' => 'already exists', - 'Create file' => 'Create file', - 'Create directory' => 'Create directory', + 'Shortcuts' => 'اختصارات', + 'Add New object' => 'إضافة جديد', + 'Save Form' => 'نموذج الحفظ', + 'Cancel saving form' => 'إلغاء نموذج الحفظ', + 'Go to USER list' => 'إذهب إلى قائمة المستخدم', + 'Go to WEB list' => 'إذهب إلى قائمة الويب', + 'Go to DNS list' => 'إذهب إلى قائمة DNS', + 'Go to MAIL list' => 'إذهب إلى قائمة البريد', + 'Go to DB list' => 'إذهب إلى قائمة قواعد البيانات', + 'Go to CRON list' => 'إذهب إلى قائمة مجدول الأعمال', + 'Go to BACKUP list' => 'إذهب إلى قائمة النسخ الاحتياطي', + 'Focus on search' => 'ضع التحديد على البحث', + 'Display/Close shortcuts' => 'إظهار وإخفاء اختصارات المفاتيح', + 'Move backward through top menu' => 'التحرك للخلف في القائمة العلوية', + 'Move forward through top menu' => 'التحرك للأمام في القائمة العلوية', + 'Enter focused element' => 'إذهب إلى العنصر المحدد', + 'Move up through elements list' => 'انتقل للأعلى خلال لائحة العناصر', + 'Move down through elements list' => 'انتقل للأسفل خلال لائحة العناصر', - 'Add New object' => 'Add New object', - 'Save Form' => 'Save Form', - 'Cancel saving form' => 'Cancel saving form', - 'Go to USER list' => 'Go to USER list', - 'Go to WEB list' => 'Go to WEB list', - 'Go to DNS list' => 'Go to DNS list', - 'Go to MAIL list' => 'Go to MAIL list', - 'Go to DB list' => 'Go to DB list', - 'Go to CRON list' => 'Go to CRON list', - 'Go to BACKUP list' => 'Go to BACKUP list', - 'Focus on search' => 'Focus on search', - 'Display/Close shortcuts' => 'Display/Close shortcuts', - 'Move backward through top menu' => 'Move backward through top menu', - 'Move forward through top menu' => 'Move forward through top menu', - 'Enter focused element' => 'Enter focused element', + 'Upload' => 'رفع', + 'New File' => 'ملف جديد', + 'New Folder' => 'مجلد جديد', + 'Download' => 'تنزيل', + 'Archive' => 'ضغط', + 'Save File (in text editor)' => 'حفظ الملف(محرر النصوص)', + 'Close Popup / Cancel' => 'أغلق القائمة المنبثقة/إلغاء', + 'Move Cursor Up' => 'حرك المؤشر للأعلى', + 'Move Cursor Down' => 'حرك المؤشر للأسفل', + 'Switch to Left Tab' => 'بدل إلى التبويب الأيسر', + 'Switch to Right Tab' => 'بدل إلى التبويب الأيمن', + 'Switch Tab' => 'تبديل التبويبات', + 'Go to the Top of the File List' => 'إذهب إلى أعلى قائمة الملفات', + 'Go to the Last File' => 'إذهب إلى آخر ملف', + 'Open File / Enter Directory' => 'فتح ملف / مجلد', + 'Edit File' => 'Edit File', + 'Go to Parent Directory' => 'الذهاب للمجلد الأب', + 'Select Current File' => 'حدد الملف الحالي', + 'Select Bunch of Files' => 'حدد مجموعة ملفات', + 'Add File to the Current Selection' => 'أضف ملف إلى قائمة التحديد الحالي', + 'Select All Files' => 'حدد كل الملفات', + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'الاختصارات الهمت من قبل ال GNU الرائعةMidnight Commander file manager', - 'Upload' => 'Upload', - 'New File' => 'New File', - 'New Folder' => 'New Folder', - 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', - 'Archive' => 'Archive', - 'Delete' => 'Delete', - 'Save File (in text editor)' => 'Save File (in text editor)', - 'Close Popup / Cancel' => 'Close Popup / Cancel', - 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', - 'Switch to Left Tab' => 'Switch to Left Tab', - 'Switch to Right Tab' => 'Switch to Right Tab', - 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', - 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', - 'Go to Parent Directory' => 'Go to Parent Directory', - 'Select Current File' => 'Select Current File', - 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', - 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', - - 'Licence Key' => 'Licence Key', - 'Enter License Key' => 'Enter License Key', - 'Buy Licence' => 'Buy Licence', - 'Buy Lifetime License' => 'Buy Lifetime License', - 'Disable and Cancel Licence' => 'Disable and Cancel Licence', - 'Licence Activated' => 'Licence Activated', - 'Licence Deactivated' => 'Licence Deactivated', + 'Licence Key' => 'مفتاح الترخيص', + 'Enter License Key' => 'أدخل مفتاح الترخيص', + 'Buy Licence' => 'شراء ترخيص', + 'Buy Lifetime License' => 'شراء ترخيص مدى الحياة', + 'Disable and Cancel Licence' => 'تعطيل وإلغاء الترخيص', + 'Licence Activated' => 'الترخيص تم تفعيله', + 'Licence Deactivated' => 'الترخيص تم تعطيله', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'دقائق', + 'Hourly' => 'ساعي', + 'Run Command' => 'أمر التنفيذ', + 'every month' => 'كل شهر', + 'every odd month' => 'كل شهر فردي', + 'every even month' => 'كل شهر زوجي', + 'every day' => 'كل يوم', + 'every odd day' => 'كل يوم فردي', + 'every even day' => 'كل يوم زوجي', + 'weekdays (5 days)' => 'أيام الاسبوع (5 أيام)', + 'weekend (2 days)' => 'العطلة (2 يومين)', + 'Monday' => 'الإثنين', + 'Tuesday' => 'الثلاثاء', + 'Wednesday' => 'الأربعاء', + 'Thursday' => 'الخميس', + 'Friday' => 'الجمعة', + 'Saturday' => 'السبت', + 'Sunday' => 'الأحد', + 'every hour' => 'كل ساعة', + 'every two hours' => 'كل ساعتين', + 'every minute' => 'كل دقيقة', + 'every two minutes' => 'كل دقيقتين', + 'every' => 'كل', + 'Generate' => 'توليد', + + 'webalizer' => 'محلل الويب webalizer', + 'awstats' => 'احصائيات الويب awstats', + + +// Texts below doesn't exist in en.php + '%s rule' => 'قواعد %s', + 'MainDomain' => 'النطاق الرئيسي', + 'SubDomain' => 'النطاق الفرعي (الجزء الاول الذي يضاف إلى النطاق الرئيسي)', + 'Add Sub Domain' => 'إضافة نطاق فرعي' +); diff --git a/web/inc/i18n/bs.php b/web/inc/i18n/bs.php index 10c4c94d..2801e41b 100644 --- a/web/inc/i18n/bs.php +++ b/web/inc/i18n/bs.php @@ -12,6 +12,7 @@ $LANG['bs'] = array( 'Log' => 'Log', 'Server' => 'Server', 'Services' => 'Servisi', + 'Firewall' => 'Firewall', 'Updates' => 'Novo', 'Log in' => 'Ulaz', 'Log out' => 'Izlaz', @@ -24,6 +25,21 @@ $LANG['bs'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Dodaj korisnika', 'Add Domain' => 'Dodaj domenu', 'Add Web Domain' => 'Dodaj web domenu', @@ -38,6 +54,8 @@ $LANG['bs'] = array( 'Restore All' => 'Vrati sve', 'Add Package' => 'Dodaj paket', 'Add IP' => 'Dodaj IP', + 'Add Rule' => 'Add Rule', + 'Ban IP Address' => 'Ban IP Address', 'Search' => 'Traži', 'Add one more FTP Account' => 'Dodaj još jednu FTP račun', 'Overall Statistics' => 'Globalna statistika', @@ -73,6 +91,7 @@ $LANG['bs'] = array( 'list accounts' => 'ukupno %s računa', 'add account' => 'dodaj račun', 'open webmail' => 'otvori webmail', + 'list fail2ban' => 'list fail2ban', 'open %s' => 'otvori %s', 'download' => 'preuzmi', 'restore' => 'vrati', @@ -86,6 +105,8 @@ $LANG['bs'] = array( 'reread IP' => 'obnovi IP', 'enable autoupdate' => 'uključuju autoupdate', 'disable autoupdate' => 'onemogućiti autoupdate', + 'turn on notifications' => 'turn on notifications', + 'turn off notifications' => 'turn off notifications', 'Adding User' => 'Dodavanje korisnika', 'Editing User' => 'Izmjena korisnika', @@ -111,7 +132,6 @@ $LANG['bs'] = array( 'Generating CSR' => 'Generisanje CSR-a', 'Listing' => 'Spisak', 'Search Results' => 'Rezultati pretrage', - 'Search Results' => 'Rezultati pretrage', 'Adding Firewall Rule' => 'Dodavanje Firewall pravila', 'Editing Firewall Rule' => 'Izmjena Firewall pravila', 'Adding IP Address to Banlist' => 'Dodavanje IP adrese', @@ -155,13 +175,14 @@ $LANG['bs'] = array( 'Web Aliases' => 'Web aliasi', 'per domain' => 'po domeni', 'DNS Domains' => 'DNS Domene', - 'DNS Domains' => 'DNS domene', - 'DNS records' => 'DNS zapisi' , + 'DNS domains' => 'DNS domene', + 'DNS records' => 'DNS zapisi', 'Name Servers' => 'Name Serveri', 'Mail Domains' => 'Mail domene', 'Mail Accounts' => 'Mail računi', 'Cron Jobs' => 'Cron Jobi', 'SSH Access' => 'SSH pristup', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP adrese', 'Backups' => 'Backups', 'Backup System' => 'Backup sistema', @@ -173,10 +194,12 @@ $LANG['bs'] = array( 'Proxy Extensions' => 'Proxy ekstenzije', 'Web Statistics' => 'Web statistika', 'Additional FTP Account' => 'Dodatni FTP', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Istek', 'Records' => 'Zapisi', + 'Serial' => 'Serial', 'Catchall email' => 'Preusmeravanje email-a', 'AntiVirus Support' => 'AntiVirus ', 'AntiSpam Support' => 'AntiSpam ', @@ -186,6 +209,16 @@ $LANG['bs'] = array( 'Autoreply' => 'Automatski odgovor', 'Forward to' => 'Proslijediti za', 'Do not store forwarded mail' => 'Proslijeđen mail se ne pohranjue', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'baza podataka', 'User' => 'Korisnik', 'Host' => 'Host', @@ -207,11 +240,13 @@ $LANG['bs'] = array( 'Users' => 'Korisnici', 'Load Average' => 'Prosječno opterećenje', 'Memory Usage' => 'Upotreba memorije', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD upotreba', 'NGINX Usage' => 'NGINX upotreba', 'MySQL Usage on localhost' => 'MySQL na localhostu', 'PostgreSQL Usage on localhost' => 'PostgreSQL na localhostu', 'Bandwidth Usage eth0' => 'Bandwidth na eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP upotreba', 'SSH Usage' => 'SSH upotreba', 'reverse proxy' => 'preokrenut proxy', @@ -224,9 +259,11 @@ $LANG['bs'] = array( 'database server' => 'database server', 'ftp server' => 'ftp server', 'job scheduler' => 'planer poslova', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Memorija', - 'Uptime' => 'Radno vrijeme', + 'Uptime' => 'Vrijeme rada', 'core package' => 'glavni paket', 'php interpreter' => 'php interpreter', 'internal web server' => 'interni web server', @@ -234,7 +271,6 @@ $LANG['bs'] = array( 'Release' => 'Distribucija', 'Architecture' => 'Arhitektura', 'Object' => 'Predmet', - 'Owner' => 'Vlasnik', 'Username' => 'Korisničko ime', 'Password' => 'Šifra', 'Email' => 'Email', @@ -253,8 +289,9 @@ $LANG['bs'] = array( 'SSL Certificate' => 'SSL certifikat', 'SSL Key' => 'SSL Key', 'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediate', + 'SSL CSR' => 'SSL CSR', 'optional' => 'izborno', - 'internal' => 'internal', + 'internal' => 'interno', 'Statistics Authorization' => 'Ovlaštenje za statistiku', 'Statistics Auth' => 'Pristup statistici', 'Account' => 'Račun', @@ -327,9 +364,10 @@ $LANG['bs'] = array( 'ftp user password' => 'ftp šifra', 'ftp user' => 'ftp korisnik', 'Last 70 lines of %s.%s.log' => 'Zadnjih 70. redova od %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Skini AccessLog', 'Download ErrorLog' => 'Skini ErrorLog', - 'SSL CSR' => 'SSL CSR', 'Country' => 'Zemlja', '2 letter code' => 'samo 2. slova', 'State / Province' => 'Država / Predio', @@ -342,8 +380,26 @@ $LANG['bs'] = array( 'Banlist' => 'Lista banovanih', 'ranges are acceptable' => 'rasponi su prihvatljivi', 'CIDR format is supported' => 'CIDR format je podržan', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unlimited', '1 account' => '1 račun', '%s accounts' => '%s računa', @@ -359,6 +415,8 @@ $LANG['bs'] = array( '%s cron jobs' => '%s cron jobs', '1 archive' => '1 arhiva', '%s archives' => '%s arhive', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 paket', '%s packages' => '%s paketa', '1 IP address' => '1 IP adresa', @@ -386,6 +444,7 @@ $LANG['bs'] = array( 'PACKAGE_CREATED_OK' => 'Paket %s je uspješno napravljen.', 'SSL_GENERATED_OK' => 'Certifikat je uspješno generisan.', 'RULE_CREATED_OK' => 'Pravilo je uspješno kreiran.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Automatsko ažuriranje uspješno omogućeno', 'Autoupdate has been successfully disabled' => 'Automatsko ažuriranje je onemogućeno', 'Cronjob email reporting has been successfully enabled' => 'Cronjob izvještavanje je uspješno omogućen', @@ -436,18 +495,18 @@ $LANG['bs'] = array( 'RESTORE_SCHEDULED' => 'Zadatak je dodan u red. Primit ćete email obavijest kada je vaš backup je spremna za preuzimanje.', 'RESTORE_EXISTS' => 'Postojeći zadatak obnova je već pokrenut. Pričekajte da se završi prije nego što ga ponovno pokrenete.', - 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *", - 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *", - 'CRON_EXCLUSIONS' => "To exclude all jobs use *", - 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *", + 'WEB_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *', + 'MAIL_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Type full database name, one per line. To exclude all databases use *', + 'CRON_EXCLUSIONS' => 'To exclude all jobs use *', + 'USER_EXCLUSIONS' => 'Type directory name, one per line. To exlude all dirs use *', 'Welcome to Vesta Control Panel' => 'Dobrodošli u Vesta kontrolni panel', 'MAIL_FROM' => 'Vesta kontrolni panel ', 'GREETINGS_GORDON_FREEMAN' => "Đe si, %s %s,\n", 'GREETINGS' => "Đe si, šta ima,\n", - 'ACCOUNT_READY' => "Vaš račun je uspješno kreiran i spreman je za upotrebu.\n\nhttps://%s/login/\Korisničko ime: %s\nŠifra: %s\n\n--\nVesta kontrolni panel\n", + 'ACCOUNT_READY' => "Vaš račun je uspješno kreiran i spreman je za upotrebu.\n\nhttps://%s/login/\nKorisničko ime: %s\nŠifra: %s\n\n--\nVesta kontrolni panel\n", 'FTP login credentials' => 'FTP podaci', 'FTP_ACCOUNT_READY' => "FTP račun je uspješno kreiran. Koristite sljedeće podatke kako biste ga ispravno koristili:\n\nHostname: %s\nKorisničko ime: %s_%s\nŠifra: %s\n\n--\nVesta kontrolni panel\n", @@ -461,7 +520,7 @@ $LANG['bs'] = array( 'Confirm Password' => 'Potvrdi šifru', 'Reset' => 'Reset', 'Reset Code' => 'Resetuj kod', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Kod resetovane šifre je poslan na vašu mail adresu
', 'MAIL_RESET_SUBJECT' => 'Šifra je resetovan %s', 'PASSWORD_RESET_REQUEST' => "Za resetovanje šifre slijedite link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nIli, možete ići na https://%s/reset/?action=code&user=%s i unijeti kod:\n%s\n\nAko niste resetovali šifru, ignorišite ovu poruku i prihvatite naše izvinjenje.\n\n--\nVesta kontrolni panel\n", @@ -470,22 +529,45 @@ $LANG['bs'] = array( 'Feb' => 'Feb', 'Mar' => 'Mar', 'Apr' => 'Apr', - 'May' => 'May', + 'May' => 'Maj', 'Jun' => 'Jun', 'Jul' => 'Jul', - 'Aug' => 'Aug', + 'Aug' => 'Avg', 'Sep' => 'Sep', - 'Oct' => 'Oct', + 'Oct' => 'Okt', 'Nov' => 'Nov', 'Dec' => 'Dec', - 'Configuring Server' => 'Configuring Server', + 'Configuring Server' => 'Konfiguracija Servera', 'Hostname' => 'Hostname', - 'Time Zone' => 'Time Zone', - 'Default Language' => 'Default Language', + 'Time Zone' => 'Vremenska zona', + 'Default Language' => 'Jezik', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', - 'preview' => 'preview', + 'preview' => 'pregled', 'Reseller Role' => 'Reseller Role', 'Web Config Editor' => 'Web Config Editor', 'Template Manager' => 'Template Manager', @@ -498,8 +580,8 @@ $LANG['bs'] = array( 'Starred' => 'Starred', 'Name' => 'Name', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -509,10 +591,13 @@ $LANG['bs'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -522,17 +607,25 @@ $LANG['bs'] = array( 'File type not supported' => 'File type not supported', 'Directory download not available in current version' => 'Directory download not available in current version', 'Directory not available' => 'Directory not available', - 'Done' => 'Done', - 'Close' => 'Close', - 'Copy' => 'Copy', - 'Cancel' => 'Cancel', - 'Rename' => 'Rename', - 'Delete' => 'Delete', - 'Extract' => 'Extract', - 'Create' => 'Create', - 'Compress' => 'Compress', + 'Done' => 'Završeno', + 'Close' => 'Zatvoriti', + 'Copy' => 'Kopirati', + 'Cancel' => 'Odustati', + 'Rename' => 'Izmijeniti', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', + 'Delete' => 'Izbrisati', + 'Extract' => 'Ekstraktovati', + 'Create' => 'Napraviti', + 'Compress' => 'Kompresovati', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -541,7 +634,17 @@ $LANG['bs'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -557,31 +660,31 @@ $LANG['bs'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -593,6 +696,34 @@ $LANG['bs'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/cn.php b/web/inc/i18n/cn.php index 2f4d89be..0e3b89cd 100644 --- a/web/inc/i18n/cn.php +++ b/web/inc/i18n/cn.php @@ -1,133 +1,148 @@ '预设方案', - 'IP' => 'IP 地址', - 'Graphs' => '资源图表', - 'Statistics' => '统计信息', - 'Log' => '系统日志', - 'Server' => '服务器', - 'Services' => '系统服务', - 'Firewall' => '防火墙', - 'Updates' => '系统更新', - 'Log in' => '登录', - 'Log out' => '登出', + 'Packages' => '预设方案', + 'IP' => 'IP管理', + 'Graphs' => '流量统计', + 'Statistics' => '统计分析', + 'Log' => '日志', + 'Server' => '服务器', + 'Services' => '系统服务', + 'Firewall' => '防火牆', + 'Updates' => '更新升级', + 'Log in' => '登录', + 'Log out' => '退出', - 'USER' => '用户账户', - 'WEB' => 'Web 服务', - 'DNS' => 'DNS 服务', - 'MAIL' => '邮箱服务', - 'DB' => '数据库', - 'CRON' => '定时任务', - 'BACKUP' => '数据备份', + 'USER' => '用户管理', + 'WEB' => '网站管理 ', + 'DNS' => 'DNS管理', + 'MAIL' => '邮箱管理', + 'DB' => '数据库', + 'CRON' => '计划任务', + 'BACKUP' => '备份管理', - 'Add User' => '添加用户', - 'Add Domain' => '添加域名', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + + 'Add User' => '添加用户', + 'Add Domain' => '添加域名', 'Add Web Domain' => '添加网站域名', - 'Add DNS Domain' => '添加DNS域名', - 'Add DNS Record' => '添加DNS记录', - 'Add Mail Domain' => '添加邮箱域名', - 'Add Mail Account' => '添加邮箱账户', - 'Add Database' => '添加数据库', - 'Add Cron Job' => '添加定时任务', - 'Create Backup' => '创建备份', - 'Configure' => '配置', - 'Restore All' => '全部恢复', - 'Add Package' => '添加方案', - 'Add IP' => '添加IP地址', - 'Add Rule' => '添加规则', - 'Ban IP Address' => '封锁IP地址', - 'Search' => '搜索', - 'Add one more FTP Account' => '增加一个FTP账户', - 'Overall Statistics' => '整体统计信息', - 'Daily' => '按天', - 'Weekly' => '按周', - 'Monthly' => '按月', - 'Yearly' => '按年', - 'Add' => '添加', - 'Back' => '返回', - 'Save' => '保存', - 'Submit' => '提交', + 'Add DNS Domain' => '添加DNS域名', + 'Add DNS Record' => '添加DNS记录', + 'Add Mail Domain' => '添加邮箱域名', + 'Add Mail Account' => '添加邮箱账户', + 'Add Database' => '添加数据库', + 'Add Cron Job' => '添加定时任务', + 'Create Backup' => '创建备份', + 'Configure' => '要配置', + 'Restore All' => '恢复所有', + 'Add Package' => '增加预设方案', + 'Add IP' => '添加IP', + 'Add Rule' => '添加規則', + 'Ban IP Address' => '潘基文的IP地址', + 'Search' => '搜索', + 'Add one more FTP Account' => '增加一個FTP賬號', + 'Overall Statistics' => '总体统计', + 'Daily' => '日', + 'Weekly' => '周', + 'Monthly' => '月', + 'Yearly' => '年', + 'Add' => '增加', + 'Back' => '返回', + 'Save' => '保存', + 'Submit' => '提交', - 'toggle all' => '批量操作', - 'apply to selected' => '应用于选中项的操作', - 'rebuild' => '重建', - 'rebuild web' => '重建网站', - 'rebuild dns' => '重建DNS', - 'rebuild mail' => '重建邮箱', - 'rebuild db' => '重建数据库', - 'rebuild cron' => '重建定时任务', - 'update counters' => '更新计数器', - 'suspend' => '暂停', - 'unsuspend' => '解除暂停', - 'delete' => '删除', - 'show per user' => '按用户显示', - 'login as' => '登录至账户', - 'logout' => '登出', - 'edit' => '编辑', - 'open webstats' => '打开网站统计', - 'view logs' => '查看日志', - 'list records' => '列出 %s 条记录', - 'add record' => '添加记录', - 'list accounts' => '列出 %s 个账户', - 'add account' => '添加账户', - 'open webmail' => '打开网页邮箱', - 'list fail2ban' => 'fail2ban 封锁名单', - 'open %s' => '打开 %s', - 'download' => '下载', - 'restore' => '恢复', - 'configure restore settings' => '配置恢复设置', - 'stop' => '停止', - 'start' => '启动', - 'restart' => '重新启动', - 'update' => '更新', - 'generate' => '生成', + 'toggle all' => '批量执行', + 'apply to selected' => '应用到已选择', + 'rebuild' => '重建', + 'rebuild web' => '重建网站', + 'rebuild dns' => '重建DNS', + 'rebuild mail' => '重建邮箱', + 'rebuild db' => '重建数据库', + 'rebuild cron' => '重建定时任务', + 'update counters' => '更新计数器', + 'suspend' => '暂停', + 'unsuspend' => '解除暂停', + 'delete' => '删除', + 'show per user' => '显示每个用户', + 'login as' => '登录为', + 'logout' => '退出', + 'edit' => '修改', + 'open webstats' => '打开webstats', + 'view logs' => '查看日志', + 'list records' => '列表 %s 记录', + 'add record' => '增加记录', + 'list accounts' => '列表 %s 账户', + 'add account' => '添加账户', + 'open webmail' => '打开网页邮箱', + 'list fail2ban' => 'fail2ban的名單', + 'open %s' => '打开 %s', + 'download' => '下载', + 'restore' => '恢复', + 'configure restore settings' => '配置欢迎设置', + 'stop' => '停止', + 'start' => '开始', + 'restart' => '重启', + 'update' => '更新', + 'generate' => '生成', 'Generate CSR' => '生成CSR', 'reread IP' => '重新读取IP', 'enable autoupdate' => '启用自动更新', - 'disable autoupdate' => '停用自动更新', - 'turn on notifications' => '启用通知', - 'turn off notifications' => '停用通知', + 'disable autoupdate' => '禁用自动更新', + 'turn on notifications' => '開啟通知', + 'turn off notifications' => '關閉通知', - 'Adding User' => '添加用户', - 'Editing User' => '编辑用户', - 'Adding Domain' => '添加域名', - 'Editing Domain' => '编辑域名', - 'Adding DNS Domain' => '添加DNS域名', - 'Editing DNS Domain' => '编辑DNS域名', - 'Adding DNS Record' => '添加DNS记录', - 'Editing DNS Record' => '编辑DNS记录', - 'Adding Mail Domain' => '添加邮箱域名', - 'Editing Mail Domain' => '编辑邮箱域名', - 'Adding Mail Account' => '添加邮箱账户', - 'Editing Mail Account' => '编辑邮箱账户', - 'Adding database' => '添加数据库', - 'Editing Cron Job' => '编辑定时任务', - 'Adding Cron Job' => '添加定时任务', - 'Editing Database' => '编辑数据库', - 'Adding Package' => '添加方案', - 'Editing Package' => '编辑方案', - 'Adding IP address' => '添加IP地址', - 'Editing IP Address' => '编辑IP地址', - 'Editing Backup Exclusions' => '配置备份排除项目', - 'Generating CSR' => '生成CSR', - 'Listing' => '列出', - 'Search Results' => '搜索结果', - 'Adding Firewall Rule' => '添加防火墙规则', - 'Editing Firewall Rule' => '编辑防火墙规则', - 'Adding IP Address to Banlist' => '添加IP至封锁名单', + 'Adding User' => '添加用户', + 'Editing User' => '修改用过', + 'Adding Domain' => '添加域名', + 'Editing Domain' => '修改域名', + 'Adding DNS Domain' => '添加DNS域名', + 'Editing DNS Domain' => '修改DNS域名', + 'Adding DNS Record' => '添加DNS记录', + 'Editing DNS Record' => '修改DNS记录', + 'Adding Mail Domain' => '添加邮局域名', + 'Editing Mail Domain' => '修改邮局域名', + 'Adding Mail Account' => '添加邮箱账户', + 'Editing Mail Account' => '修改邮箱账户', + 'Adding database' => '添加数据', + 'Editing Cron Job' => '修改定时任务', + 'Adding Cron Job' => '添加定时任务', + 'Editing Database' => '修改数据库', + 'Adding Package' => '添加预设方案', + 'Editing Package' => '修改预设方案', + 'Adding IP address' => '添加IP地址', + 'Editing IP Address' => '修改IP地址', + 'Editing Backup Exclusions' => '编辑排除', + 'Generating CSR' => '生成的CSR', + 'Listing' => '列表', + 'Search Results' => '搜索结果', + 'Adding Firewall Rule' => '添加防火牆規則', + 'Editing Firewall Rule' => '編輯防火牆規則', + 'Adding IP Address to Banlist' => '添加IP地址黑名單', - 'active' => '正常', - 'spnd' => '暂停', - 'suspended' => '已暂停', - 'running' => '运行中', - 'stopped' => '已停止', - 'outdated' => '可升级新版本', - 'updated' => '已是最新版本', + 'active' => '活跃', + 'spnd' => '暂停', + 'suspended' => '暂停', + 'running' => '运行', + 'stopped' => '停止', + 'outdated' => '过期', + 'updated' => '更新', 'yes' => '是', 'no' => '否', @@ -159,14 +174,15 @@ $LANG['cn'] = array( 'SSL Domains' => 'SSL域名', 'Web Aliases' => '网站别名', 'per domain' => '每域名', - 'DNS domains' => 'DNS域名', 'DNS Domains' => 'DNS域名', - 'DNS records' => 'DNS记录' , + 'DNS domains' => 'DNS域名', + 'DNS records' => 'DNS记录', 'Name Servers' => 'DNS服务器', 'Mail Domains' => '邮箱域名', 'Mail Accounts' => '邮箱账户', 'Cron Jobs' => '定时任务', 'SSH Access' => 'SSH权限', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP地址', 'Backups' => '备份', 'Backup System' => '备份系统', @@ -176,13 +192,14 @@ $LANG['cn'] = array( 'SSL Home Directory' => 'SSL主目录', 'Proxy Support' => '代理支持', 'Proxy Extensions' => '代理扩展名', - 'Proxy Extentions' => '代理扩展名', 'Web Statistics' => '网站统计', 'Additional FTP Account' => '额外的FTP账户', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => '过期', 'Records' => '记录', + 'Serial' => 'Serial', 'Catchall email' => '收取未知邮件的邮箱', 'AntiVirus Support' => '防病毒支持', 'AntiSpam Support' => '防垃圾邮件支持', @@ -192,6 +209,16 @@ $LANG['cn'] = array( 'Autoreply' => '自动回复', 'Forward to' => '转发到', 'Do not store forwarded mail' => '不保留已转发的邮件', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => '数据库', 'User' => '用户', 'Host' => '主机', @@ -210,426 +237,493 @@ $LANG['cn'] = array( 'shared' => '共享', 'dedicated' => '独立', 'Owner' => '归属', - 'Users' => '用户', - 'Load Average' => '平均负载', - 'LoadAverage' => '平均负载', - 'Memory Usage' => '内存用量', - 'HTTPD Usage' => 'Apache用量', - 'APACHE2 Usage' => 'Apache2用量', - 'NGINX Usage' => 'NGINX用量', - 'MySQL Usage on localhost' => 'MySQL用量 (localhost)', - 'PostgreSQL Usage on localhost' => 'PostgreSQL用量 (localhost)', - 'Bandwidth Usage eth0' => '网络流量 (eth0)', - 'Bandwidth Usage eth1' => '网络流量 (eth1)', - 'Bandwidth Usage eth2' => '网络流量 (eth2)', - 'Exim Usage' => 'Exim用量', - 'FTP Usage' => 'FTP用量', - 'SSH Usage' => 'SSH用量', - 'reverse proxy' => '反向代理', - 'web server' => 'Web服务', - 'dns server' => 'DNS服务', - 'mail server' => '邮箱服务', - 'pop/imap server' => 'POP/IMAP服务', - 'email antivirus' => '邮箱防病毒', - 'email antispam' => '防垃圾邮件', - 'database server' => '数据库服务', - 'ftp server' => 'FTP服务', - 'job scheduler' => '执行定时任务', - 'firewall' => '防火墙', - 'brute-force monitor' => '监控暴力破解', - 'CPU' => 'CPU', - 'Memory' => '内存', - 'Uptime' => '已运行时间', - 'core package' => '核心系统', - 'php interpreter' => 'PHP解释器', - 'internal web server' => '内部Web服务', - 'Version' => '版本', - 'Release' => '发布号', - 'Architecture' => '架构', - 'Object' => '对象', - 'Owner' => '归属', - 'Username' => '用户名称', - 'Password' => '密码', - 'Email' => '电子邮箱', - 'Package' => '方案', - 'Language' => '语言', - 'First Name' => '名字', - 'Last Name' => '姓氏', - 'Send login credentials to email address' => '将登录信息发送到邮箱', - 'Default Template' => '默认模板', - 'Default Name Servers' => '默认DNS服务器', - 'Domain' => '域名', - 'DNS Support' => 'DNS支持', - 'Mail Support' => '邮箱支持', - 'Advanced options' => '高级选项', - 'Aliases' => '别名', - 'SSL Certificate' => 'SSL证书', - 'SSL Key' => 'SSL密钥', - 'SSL Certificate Authority / Intermediate' => 'SSL签发机构 / 中级', + 'Users' => '用户', + 'Load Average' => '平均负载', + 'Memory Usage' => '内存使用', + 'APACHE2 Usage' => 'APACHE2 Usage', + 'HTTPD Usage' => 'apache使用', + 'NGINX Usage' => 'nginx使用', + 'MySQL Usage on localhost' => '本地Mysql使用', + 'PostgreSQL Usage on localhost' => '本地PostgreSQL使用', + 'Bandwidth Usage eth0' => 'eth0流量使用', + 'Exim Usage' => 'Exim Usage', + 'FTP Usage' => 'FTP使用', + 'SSH Usage' => 'SSH使用', + 'reverse proxy' => '反向代理', + 'web server' => '网页服务器', + 'dns server' => 'dns服务器', + 'mail server' => '邮件服务器', + 'pop/imap server' => 'pop/imap服务器', + 'email antivirus' => '邮件杀毒', + 'email antispam' => '反垃圾邮件', + 'database server' => '数据库服务器', + 'ftp server' => 'FTP服务器', + 'job scheduler' => '定时调度', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', + 'CPU' => '处理器', + 'Memory' => '内存', + 'Uptime' => '在线时间', + 'core package' => '核心方案', + 'php interpreter' => 'php 解释器', + 'internal web server' => '内网网页服务器', + 'Version' => '版本', + 'Release' => '发布', + 'Architecture' => 'Architecture', + 'Object' => '兑现', + 'Username' => '用户名', + 'Password' => '密码', + 'Email' => '邮箱', + 'Package' => '预设方案', + 'Language' => '语言', + 'First Name' => '姓', + 'Last Name' => '名', + 'Send login credentials to email address' => '发送登录凭据到电子邮件地址', + 'Default Template' => '默认模板', + 'Default Name Servers' => '默认NS服务器', + 'Domain' => '域名', + 'DNS Support' => 'DNS支持', + 'Mail Support' => 'Mail支持', + 'Advanced options' => '高级选项', + 'Aliases' => '别名', + 'SSL Certificate' => 'SSL证书', + 'SSL Key' => 'SSL Key', + 'SSL Certificate Authority / Intermediate' => 'SSL证书颁发机构 / 中级', 'SSL CSR' => 'SSL CSR', - 'optional' => '可选', + 'optional' => '可选', 'internal' => '内部', - 'Statistics Authorization' => '统计授权', - 'Statistics Auth' => '统计验证', - 'Account' => '账户', - 'Prefix will be automaticaly added to username' => '前缀 %s 将会自动加入用户名称', - 'Send FTP credentials to email' => '将FTP登录信息发送到邮箱', - 'Expiration Date' => '到期日期', - 'YYYY-MM-DD' => 'YYYY-MM-DD', - 'Name servers' => 'DNS服务器', - 'Record' => '记录', - 'IP or Value' => 'IP或值', - 'Priority' => '优先级', + 'Statistics Authorization' => '统计授权', + 'Statistics Auth' => '统计验证', + 'Account' => '账户', + 'Prefix will be automaticaly added to username' => '前缀 %s 会自动添加到用户名', + 'Send FTP credentials to email' => '发送FTP凭证到邮箱', + 'Expiration Date' => '到期日期', + 'YYYY-MM-DD' => 'YYYY-MM-DD', + 'Name servers' => 'NS服务器', + 'Record' => '记录', + 'IP or Value' => 'IP或值', + 'Priority' => '优先级', 'Record Number' => '记录编号', - 'in megabytes' => '以MB为单位', - 'Message' => '信息', - 'use local-part' => '使用本地部分', - 'one or more email addresses' => '一个或更多邮箱地址', - 'Prefix will be automaticaly added to database name and database user' => '前缀 %s 将会自动加入数据库名称及用户名称', - 'Database' => '数据库', - 'Type' => '类型', - 'Minute' => '分钟', - 'Command' => '指令', - 'Package Name' => '方案名称', - 'Netmask' => '子网掩码', - 'Interface' => '网络接口', - 'Shared' => '共享', - 'Assigned user' => '指定用户', - 'Assigned domain' => '指定域名', - 'NAT IP association' => 'NAT IP 连接', - 'shell' => '脚本', - 'web domains' => '网站域名', - 'web aliases' => '网站别名', - 'dns records' => 'DNS记录', - 'mail domains' => '邮箱域名', - 'mail accounts' => '邮箱账户', - 'accounts' => '账户', - 'databases' => '数据库', - 'cron jobs' => '定时任务', - 'backups' => '备份', - 'quota' => '配额', - 'day of week' => '星期几', - 'cmd' => '指令', - 'users' => '用户', - 'domains' => '域名', - 'aliases' => '别名', - 'records' => '记录', - 'jobs' => '任务', - 'username' => '用户名称', - 'password' => '密码', - 'type' => '类型', - 'charset' => '编码', - 'domain' => '域名', - 'ip' => 'IP', - 'ip address' => 'IP地址', - 'IP address' => 'IP地址', - 'IP Address' => 'IP地址', - 'netmask' => '子网掩码', - 'interface' => '网络接口', - 'assigned user' => '指定用户', - 'ns1' => 'ns1', - 'ns2' => 'ns2', - 'user' => '用户', - 'email' => '邮箱', - 'first name' => '名字', - 'last name' => '姓氏', - 'account' => '账户', - 'ssl certificate' => 'SSL证书', - 'ssl key' => 'SSL密钥', - 'stats user password' => '统计用户账户密码', - 'stats username' => '统计用户名称', - 'stats password' => '统计密码', - 'ftp user password' => 'FTP用户账户密码', - 'ftp user' => 'FTP用户', - 'Last 70 lines of %s.%s.log' => '最后70行的 %s.%s.日志', + 'in megabytes' => '以MB为单位', + 'Message' => '信息', + 'use local-part' => '使用本地部分', + 'one or more email addresses' => '一个或者更多邮箱地址', + 'Prefix will be automaticaly added to database name and database user' => '前缀 %s 会自动增加到数据库用户名', + 'Database' => '数据库', + 'Type' => '类型', + 'Minute' => '分钟', + 'Command' => '命令', + 'Package Name' => '方案名称', + 'Netmask' => '子网掩码', + 'Interface' => '接口', + 'Shared' => '共享', + 'Assigned user' => '分配用户', + 'Assigned domain' => '分配域名', + 'NAT IP association' => 'NAT IP association', + 'shell' => '脚本', + 'web domains' => '网站域名', + 'web aliases' => '网站别名', + 'dns records' => 'dns记录', + 'mail domains' => '邮局域名', + 'mail accounts' => '邮箱账户', + 'accounts' => '账户', + 'databases' => '数据库', + 'cron jobs' => '定时任务', + 'backups' => '备份', + 'quota' => '配额', + 'day of week' => '星期几', + 'cmd' => 'cmd', + 'users' => '用户', + 'domains' => '域名', + 'aliases' => '别名', + 'records' => '记录', + 'jobs' => '定时任务', + 'username' => '用户名', + 'password' => '密码', + 'type' => '类型', + 'charset' => '字符集编码', + 'domain' => '域名', + 'ip' => 'ip', + 'ip address' => 'IP地址', + 'IP address' => 'IP 地址', + 'netmask' => '子网掩码', + 'interface' => '网络接口', + 'assigned user' => '分配用户', + 'ns1' => 'ns1', + 'ns2' => 'ns2', + 'user' => '用户', + 'email' => '邮箱', + 'first name' => '姓', + 'last name' => '名', + 'account' => '账户', + 'ssl certificate' => 'ssl证书', + 'ssl key' => 'ssl密匙', + 'stats user password' => '统计用户密码', + 'stats username' => '统计用户名', + 'stats password' => '统计密码', + 'ftp user password' => 'ftp用户密码', + 'ftp user' => 'ftp用户', + 'Last 70 lines of %s.%s.log' => '最后70行 %s.%s.日志', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => '下载访问日志', 'Download ErrorLog' => '下载错误日志', - 'Country' => '国家', - '2 letter code' => '2位国家简码 (中国为CN / 美国为US)', - 'State / Province' => '州 / 省', - 'City / Locality' => '市 / 地区', + 'Country' => '国家‘', + '2 letter code' => '2位短码:例如中国是CN/美国是US', + 'State / Province' => '州/省', + 'City / Locality' => '市/地区', 'Organization' => '组织名称', - 'Action' => '操作', - 'Protocol' => '协议', - 'Port' => '端口', - 'Comment' => '备注', - 'Banlist' => '需封锁', - 'ranges are acceptable' => '可使用范围 (如: 21-22)', + 'Action' => '動作', + 'Protocol' => '協議', + 'Port' => '港口', + 'Comment' => '評論', + 'Banlist' => '黑名單', + 'ranges are acceptable' => '範圍是可以接受的', 'CIDR format is supported' => '支持CIDR格式', - 'CDIR format is supported' => '支持CIDR格式', - 'Add one more Name Server' => '增加一个DNS服务器', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', + 'Add one more Name Server' => 'Add one more Name Server', - 'unlimited' => '无限', - '1 account' => '1 个账户', - '%s accounts' => '%s 个账户', - '1 domain' => '1 个域名', - '%s domains' => '%s 个域名', - '1 record' => '1 条记录', - '%s records' => '%s 条记录', - '1 mail account' => '1 个邮箱账户', - '%s mail accounts' => '%s 个邮箱账户', - '1 database' => '1 个数据库', - '%s databases' => '%s 个数据库', - '1 cron job' => '1 个任务', - '%s cron jobs' => '%s 个任务', - '1 archive' => '1 个存档', - '%s archives' => '%s 个存档', - '1 package' => '1 个方案', - '%s packages' => '%s 个方案', - '1 IP address' => '1 个IP地址', - '%s IP addresses' => '%s 个IP地址', - '1 month' => '1 个月', - '%s months' => '%s 个月', - '1 log record' => '1 条日志记录', - '%s log records' => '%s 条日志记录', - '1 object' => '1 个对象', - '%s objects' => '%s 个对象', - 'no exclusions' => '未排除', - '1 rule' => '1 条规则', - '%s rules' => '%s 条规则', - '1 items' => '1 个项目', - '%s items' => '%s 个项目', - 'There are no currently banned IP' => '目前没有已暂停的IP地址', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', - 'USER_CREATED_OK' => '用户 %s 已添加成功', - 'WEB_DOMAIN_CREATED_OK' => '网站域名 %s 已添加成功', - 'DNS_DOMAIN_CREATED_OK' => 'DNS域名 %s 已添加成功', - 'DNS_RECORD_CREATED_OK' => '记录 %s.%s 已添加成功', - 'MAIL_DOMAIN_CREATED_OK' => '邮箱域名 %s 已添加成功', - 'MAIL_ACCOUNT_CREATED_OK' => '邮箱账户 %s@%s 已添加成功', - 'DATABASE_CREATED_OK' => '数据库 %s 已添加成功', - 'CRON_CREATED_OK' => '定时任务已添加成功', - 'IP_CREATED_OK' => 'IP地址 %s 已添加成功', - 'PACKAGE_CREATED_OK' => '方案 %s 已添加成功', - 'SSL_GENERATED_OK' => 'SSL证书已生成', - 'RULE_CREATED_OK' => '规则已创建成功', - 'Autoupdate has been successfully enabled' => '自动更新已成功启用', - 'Autoupdate has been successfully disabled' => '自动更新已成功关闭', - 'Cronjob email reporting has been successfully enabled' => '定时任务的电子邮件报告已成功启用', - 'Cronjob email reporting has been successfully disabled' => '定时任务的电子邮件报告已成功关闭', - 'Changes has been saved.' => '已保存更改', - 'Confirmation' => '确认', - 'DELETE_USER_CONFIRMATION' => '确定要删除用户 %s 吗?', - 'SUSPEND_USER_CONFIRMATION' => '确定要暂停用户 %s 吗?', - 'UNSUSPEND_USER_CONFIRMATION' => '确定要解除暂停用户 %s 吗?', - 'DELETE_DOMAIN_CONFIRMATION' => '确定要删除域名 %s 吗?', - 'SUSPEND_DOMAIN_CONFIRMATION' => '确定要暂停域名 %s 吗?', - 'UNSUSPEND_DOMAIN_CONFIRMATION' => '确定要解除暂停域名 %s 吗?', - 'DELETE_RECORD_CONFIRMATION' => '确定要删除记录 %s 吗?', - 'SUSPEND_RECORD_CONFIRMATION' => '确定要暂停记录 %s 吗?', - 'UNSUSPEND_RECORD_CONFIRMATION' => '确定要解除暂停记录 %s 吗?', - 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => '确定要删除 %s 吗?', - 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '确定要暂停 %s 吗?', - 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '确定要解除暂停 %s 吗?', - 'DELETE_DATABASE_CONFIRMATION' => '确定要删除数据库 %s 吗?', - 'SUSPEND_DATABASE_CONFIRMATION' => '确定要暂停数据库 %s 吗?', - 'UNSUSPEND_DATABASE_CONFIRMATION' => '确定要解除暂停数据库 %s 吗?', - 'DELETE_CRON_CONFIRMATION' => '确定要删除定时任务吗?', - 'SUSPEND_CRON_CONFIRMATION' => '确定要暂停定时任务吗?', - 'UNSUSPEND_CRON_CONFIRMATION' => '确定要解除暂停定时任务吗?', - 'DELETE_BACKUP_CONFIRMATION' => '确定要删除 %s 备份吗?', - 'DELETE_EXCLUSION_CONFIRMATION' => '确定要删除 %s 例外吗?', - 'DELETE_PACKAGE_CONFIRMATION' => '确定要删除方案 %s 吗?', - 'DELETE_IP_CONFIRMATION' => '确定要删除IP地址 %s 吗?', - 'DELETE_RULE_CONFIRMATION' => '确定要删除规则 #%s 吗?', - 'SUSPEND_RULE_CONFIRMATION' => '确定要暂停规则 #%s 吗?', - 'UNSUSPEND_RULE_CONFIRMATION' => '确定要解除暂停规则 #%s 吗?', - 'LEAVE_PAGE_CONFIRMATION' => '确定要离开当前页吗?', - 'RESTART_CONFIRMATION' => '确定要重新启动 %s 吗?', - 'Welcome' => '欢迎', - 'LOGGED_IN_AS' => '以用户身份 %s 登录', - 'Error' => '错误', - 'Invalid username or password' => '无效的用户名称或密码', - 'Invalid username or code' => '无效的用户名称或验证码.', - 'Passwords not match' => '密码错误', - 'Please enter valid email address.' => '请输入正确的邮箱', - 'Field "%s" can not be blank.' => '"%s" 不能为空', - 'Password is too short.' => '密码太短 (至少为6个数字+字母)', - 'Error code:' => '错误代码: %s', - 'SERVICE_ACTION_FAILED' => '"%s" "%s" 失败', - 'IP address is in use' => 'IP地址在使用中', - 'BACKUP_SCHEDULED' => '您的要求已加入队列中,备份完成后会以电子邮件通知您 ', - 'BACKUP_EXISTS' => '已经有一个备份正在执行,请等待备份完成后再操作', - 'RESTORE_SCHEDULED' => '您的要求已加入队列中,恢复完成后会以电子邮件通知您', - 'RESTORE_EXISTS' => '已经有一个恢复正在执行,请等待恢复完成后再操作', + 'cron' => 'cron', + 'user dir' => 'user dir', - 'WEB_EXCLUSIONS' => "输入域名,每行一个。要排除所有域名请使用 *。要排除特定目录使用以下格式: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "输入域名,每行一个。要排除所有域名请使用 *", - 'MAIL_EXCLUSIONS' => "输入域名,每行一个。要排除所有域名请使用 *。要排除特定帐户使用以下格式: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "输入完整数据库名称,每行一个。要排除所有数据库请使用 *", - 'CRON_EXCLUSIONS' => "要排除所有任务请使用 *", - 'USER_EXCLUSIONS' => "输入目录名称,每行一个。要排除所有目录请使用 *", + 'unlimited' => 'unlimited', + '1 account' => '1 账户', + '%s accounts' => '%s 账户', + '1 domain' => '1 域名', + '%s domains' => '%s 域名', + '1 record' => '1 记录', + '%s records' => '%s 记录', + '1 mail account' => '1 邮箱账户', + '%s mail accounts' => '%s 邮箱账户', + '1 database' => '1 数据库', + '%s databases' => '%s 数据库', + '1 cron job' => '1 定时任务', + '%s cron jobs' => '%s 定时任务', + '1 archive' => '1 档案', + '%s archives' => '%s 档案', + '1 item' => '1 item', + '%s items' => '%s items', + '1 package' => '1 预设方案', + '%s packages' => '%s 预设方案', + '1 IP address' => '1 IP地址', + '%s IP addresses' => '%s IP地址', + '1 month' => '1 月', + '%s months' => '%s 月', + '1 log record' => '1 日志记录', + '%s log records' => '%s 日志记录', + '1 object' => '1 对象', + '%s objects' => '%s 对象', + 'no exclusions' => '不排除', + '1 rule' => '1規則', + '%s rules' => '%s 規則', + 'There are no currently banned IP' => '目前尚無禁止的IP地址', - 'Welcome to Vesta Control Panel' => '欢迎来到 Vesta 管理系统', - 'MAIL_FROM' => 'Vesta 管理系统 ', + 'USER_CREATED_OK' => 'User %s 已创建成功', + 'WEB_DOMAIN_CREATED_OK' => 'Domain %s 已创建成功.', + 'DNS_DOMAIN_CREATED_OK' => 'DNS domain %s 已创建成功.', + 'DNS_RECORD_CREATED_OK' => 'Record %s.%s 已创建成功.', + 'MAIL_DOMAIN_CREATED_OK' => 'Mail domain %s 已创建成功.', + 'MAIL_ACCOUNT_CREATED_OK' => 'Mail account %s@%s 已创建成功', + 'DATABASE_CREATED_OK' => 'Database %s 已创建成功', + 'CRON_CREATED_OK' => 'Cron job 已创建成功.', + 'IP_CREATED_OK' => 'IP address %s 已创建成功.', + 'PACKAGE_CREATED_OK' => 'Package %s 已创建成功.', + 'SSL_GENERATED_OK' => '证书已成功生成.', + 'RULE_CREATED_OK' => '規則已成功創建', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text + 'Autoupdate has been successfully enabled' => 'Autoupdate has been successfully enabled', + 'Autoupdate has been successfully disabled' => 'Autoupdate has been successfully disabled', + 'Cronjob email reporting has been successfully enabled' => '的cronjob電子郵件報告已成功啟用', + 'Cronjob email reporting has been successfully disabled' => '的cronjob電子郵件報告已成功關閉', + 'Changes has been saved.' => '更改已保存.', + 'Confirmation' => 'Confirmation', + 'DELETE_USER_CONFIRMATION' => '您确定删除用户 %s?', + 'SUSPEND_USER_CONFIRMATION' => '你确定暂停用户 %s?', + 'UNSUSPEND_USER_CONFIRMATION' => '您确定解除暂停用户 %s?', + 'DELETE_DOMAIN_CONFIRMATION' => '您确定删除域名 %s?', + 'SUSPEND_DOMAIN_CONFIRMATION' => '你确定暂停域名 %s?', + 'UNSUSPEND_DOMAIN_CONFIRMATION' => '你确定解除暂停域名 %s?', + 'DELETE_RECORD_CONFIRMATION' => '你确定删除记录 %s?', + 'SUSPEND_RECORD_CONFIRMATION' => '你确定暂停记录 %s?', + 'UNSUSPEND_RECORD_CONFIRMATION' => '你确定解除暂停记录 %s?', + 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => '你确定删除 %s?', + 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '你确定暂停 %s?', + 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '你确定解除暂停 %s?', + 'DELETE_DATABASE_CONFIRMATION' => '你确定删除数据库 %s?', + 'SUSPEND_DATABASE_CONFIRMATION' => '你确定暂停数据 %s?', + 'UNSUSPEND_DATABASE_CONFIRMATION' => '你确定解除暂停数据库 %s?', + 'DELETE_CRON_CONFIRMATION' => '你确定删除定时任务?', + 'SUSPEND_CRON_CONFIRMATION' => '你确定暂停定时任务?', + 'UNSUSPEND_CRON_CONFIRMATION' => '你确定解除暂停定时任务?', + 'DELETE_BACKUP_CONFIRMATION' => '你确定删除 %s 备份?', + 'DELETE_EXCLUSION_CONFIRMATION' => 'Are you sure to delete %s exclusion?', + 'DELETE_PACKAGE_CONFIRMATION' => '你确定删除方案 %s?', + 'DELETE_IP_CONFIRMATION' => '你确定删除IP地址 %s?', + 'DELETE_RULE_CONFIRMATION' => '您確定要刪除規則 #%s?', + 'SUSPEND_RULE_CONFIRMATION' => '您確定要暫停規則 #%s?', + 'UNSUSPEND_RULE_CONFIRMATION' => '您確定要取消掛起規則 #%s?', + 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', + 'RESTART_CONFIRMATION' => 'Are you sure you want to restart %s?', + 'Welcome' => '欢迎光临', + 'LOGGED_IN_AS' => '以用户身份 %s 登录', + 'Error' => '错误', + 'Invalid username or password' => '无效账号或密码', + 'Invalid username or code' => '无效账户或者验证码', + 'Passwords not match' => '密码不正确', + 'Please enter valid email address.' => '请输入有效的邮箱.', + 'Field "%s" can not be blank.' => '字段 "%s" 不能为空.', + 'Password is too short.' => '密码太短 (最少为6位数大小写字母+数字)', + 'Error code:' => '错误代码: %s', + 'SERVICE_ACTION_FAILED' => '"%s" "%s" 字段', + 'IP address is in use' => 'IP地址已被使用', + 'BACKUP_SCHEDULED' => '任务已经被添加到队列中。当备份完成将会电子邮件通知您.', + 'BACKUP_EXISTS' => '现有的备份已在运行,请等待该备份完成.', + 'RESTORE_SCHEDULED' => '任务已经被添加到队列中。当备份完成将会电子邮件通知您.', + 'RESTORE_EXISTS' => '现有的修复工作已在执行,请等待完成后再执行.', + + 'WEB_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *', + 'MAIL_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Type full database name, one per line. To exclude all databases use *', + 'CRON_EXCLUSIONS' => 'To exclude all jobs use *', + 'USER_EXCLUSIONS' => 'Type directory name, one per line. To exlude all dirs use *', + + 'Welcome to Vesta Control Panel' => '欢迎来到Vesta管理面板', + 'MAIL_FROM' => 'Vesta管理面板 ', 'GREETINGS_GORDON_FREEMAN' => "您好, %s %s,\n", 'GREETINGS' => "您好,\n", - 'ACCOUNT_READY' => "您的账户已创建成功,并可以开始使用了!\n\nhttps://%s/login/\n用户名称: %s\n密码: %s\n\n--\nVesta Control Panel\n", + 'ACCOUNT_READY' => "您的帐户已创建可以使用.\n\nhttps://%s/login/\n用户名: %s\n密码: %s\n\n", - 'FTP login credentials' => 'FTP 登录信息', - 'FTP_ACCOUNT_READY' => "FTP账户已创建成功,并可以开始使用了!\n\n主机名称: %s\n用户名称: %s_%s\n密码: %s\n\n--\nVesta Control Panel\n", + 'FTP login credentials' => 'FTP登录资料', + 'FTP_ACCOUNT_READY' => "FTP帐户已创建可以使用.\n\n主机名: %s\n用户名: %s_%s\n密码: %s\n\n", - 'Database Credentials' => "数据库登录信息", - 'DATABASE_READY' => "数据库已添加成功!\n\n数据库名称: %s\n用户名称: %s\n密码: %s\n%s\n\n--\nVesta Control Panel\n", + 'Database Credentials' => '数据库账户资料', + 'DATABASE_READY' => "数据库已创建成功.\n\n数据库名: %s\n用户: %s\n密码: %s\n%s\n\n", - 'forgot password' => '忘记密码', - 'Confirm' => '确认', - 'New Password' => '新密码', - 'Confirm Password' => '确认密码', - 'Reset' => '重置', - 'Reset Code' => '重置代码', - 'RESET_NOTICE' => '', - 'RESET_CODE_SENT' => '密码重置代码已发送到您的邮箱
', - 'MAIL_RESET_SUBJECT' => '密码重置在 %s', - 'PASSWORD_RESET_REQUEST' => '重置密码请点击链接:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n或者您可以到 https://%s/reset/?action=code&user=%s 输入密码重置代码:\n%s\n\n如果您没有要求重置密码,请忽略此邮件\n\n--\nVesta Control Panel\n', + 'forgot password' => '忘记密码', + 'Confirm' => '确认', + 'New Password' => '新密码', + 'Confirm Password' => '确认密码', + 'Reset' => '重置', + 'Reset Code' => '重置代码', + 'RESET_NOTICE' => '', // should we add something here? + 'RESET_CODE_SENT' => '密码重置代码已发送到您的邮箱
', + 'MAIL_RESET_SUBJECT' => '密码重置在 %s', + 'PASSWORD_RESET_REQUEST' => "重置面板密码请点击链接:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n或者您可以到 https://%s/reset/?action=code&user=%s 输入重置验证代码:\n%s\n\n如果您没有要求重设密码,请忽略此消息.", - 'Jan' => '01月', - 'Feb' => '02月', - 'Mar' => '03月', - 'Apr' => '04月', - 'May' => '05月', - 'Jun' => '06月', - 'Jul' => '07月', - 'Aug' => '08月', - 'Sep' => '09月', - 'Oct' => '10月', - 'Nov' => '11月', - 'Dec' => '12月', + 'Jan' => 'Jan', + 'Feb' => 'Feb', + 'Mar' => 'Mar', + 'Apr' => 'Apr', + 'May' => 'May', + 'Jun' => 'Jun', + 'Jul' => 'Jul', + 'Aug' => 'Aug', + 'Sep' => 'Sep', + 'Oct' => 'Oct', + 'Nov' => 'Nov', + 'Dec' => 'Dec', - 'Configuring Server' => '配置服务器', - 'Hostname' => '主机名称', - 'Time Zone' => '时区', - 'Default Language' => '默认语言', - 'FileSystem Disk Quota' => '文件系统磁盘配额', - 'Vesta Control Panel Plugins' => 'Vesta 管理系统的插件', - 'Proxy Server' => '代理服务器', - 'Web Server' => 'Web服务器', - 'DNS Server' => 'DNS服务器', - 'DNS Cluster' => 'DNS集群', - 'MAIL Server' => '邮箱服务器', - 'Antivirus' => '防病毒引擎', - 'AntiSpam' => '防垃圾邮件', - 'Webmail URL' => '设置网页邮箱网址', - 'MySQL Support' => 'MySQL 支持', - 'phpMyAdmin URL' => '设置 phpMyAdmin 网址', - 'Maximum Number Of Databases' => '数据库最大数量', - 'Current Number Of Databases' => '数据库当前数量', - 'PostgreSQL Support' => 'PostgreSQL 支持', - 'Local backup' => '本地备份', - 'Compression level' => '压缩级别', - 'Directory' => '目录', - 'Remote backup' => '远程备份', - 'preview' => '预览', - 'Reseller Role' => '作为经销商', - 'Web Config Editor' => '网络配置编辑器', - 'Template Manager' => '模板管理', - 'Backup Migration Manager' => '备份迁移管理', - 'FileManager' => '文件管理', - 'show: CPU / MEM / NET / DISK' => '显示: CPU / MEM / NET / DISK', - 'MEMORY' => '内存', - 'DISK' => '磁盘', - 'NETWORK' => '网络', + 'Configuring Server' => 'Configuring Server', + 'Hostname' => 'Hostname', + 'Time Zone' => 'Time Zone', + 'Default Language' => 'Default Language', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => 'FileSystem Disk Quota', + 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', + 'preview' => 'preview', + 'Reseller Role' => 'Reseller Role', + 'Web Config Editor' => 'Web Config Editor', + 'Template Manager' => 'Template Manager', + 'Backup Migration Manager' => 'Backup Migration Manager', + 'FileManager' => 'FileManager', + 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', - 'sort by' => '排序方式', - 'Date' => '日期', - 'Starred' => '星标', - 'Name' => '名称', + 'sort by' => 'sort by', + 'Date' => 'Date', + 'Starred' => 'Starred', + 'Name' => 'Name', - 'File Manager' => '文件管理', - 'type' => '类型', - 'size' => '大小', - 'date' => '日期', - 'name' => '名称', - 'Initializing' => '初始化中', - 'UPLOAD' => '上传', - 'NEW FILE' => '新建文件', - 'NEW DIR' => '新建目录', - 'DELETE' => '删除', - 'RENAME' => '重命名', - 'COPY' => '复制', - 'ARCHIVE' => '存档', - 'EXTRACT' => '提取', - 'DOWNLOAD' => '下载', - 'Hit' => '再次按下', - 'to reload the page' => '键则刷新此页面', - 'Directory name cannot be empty' => '目录名称不能为空', - 'File name cannot be empty' => '文件名称不能为空', - 'No file selected' => '没有文件被选中', - 'No file or folder selected' => '没有文件或目录被选中', - 'File type not supported' => '不支持的文件类型', - 'Directory download not available in current version' => '目录下载在当前版本中不可用', - 'Directory not available' => '目录不可用', - 'Done' => '完成', - 'Close' => '关闭', - 'Copy' => '复制', - 'Cancel' => '取消', - 'Rename' => '重命名', - 'Delete' => '删除', - 'Extract' => '提取', - 'Create' => '创建', - 'Compress' => '压缩', + + 'File Manager' => 'File Manager', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', 'OK' => 'OK', - 'Are you sure you want to copy' => '你确定要复制', - 'Are you sure you want to delete' => '你确定要删除', - 'into' => '到', - 'existing files will be replaced' => '现有文件将被替换', - 'Original name' => '原有名称', - 'File' => '文件', - 'already exists' => '已经存在', - 'Create file' => '创建文件', - 'Create directory' => '创建目录', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', + 'Add New object' => 'Add New object', + 'Save Form' => 'Save Form', + 'Cancel saving form' => 'Cancel saving form', + 'Go to USER list' => 'Go to USER list', + 'Go to WEB list' => 'Go to WEB list', + 'Go to DNS list' => 'Go to DNS list', + 'Go to MAIL list' => 'Go to MAIL list', + 'Go to DB list' => 'Go to DB list', + 'Go to CRON list' => 'Go to CRON list', + 'Go to BACKUP list' => 'Go to BACKUP list', + 'Focus on search' => 'Focus on search', + 'Display/Close shortcuts' => 'Display/Close shortcuts', + 'Move backward through top menu' => 'Move backward through top menu', + 'Move forward through top menu' => 'Move forward through top menu', + 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', - 'Add New object' => '添加新对象', - 'Save Form' => '保存表单', - 'Cancel saving form' => '取消保存表单', - 'Go to USER list' => '转到用户账户', - 'Go to WEB list' => '转到Web服务', - 'Go to DNS list' => '转到DNS服务', - 'Go to MAIL list' => '转到邮箱服务', - 'Go to DB list' => '转到数据库', - 'Go to CRON list' => '转到定时任务', - 'Go to BACKUP list' => '转到数据备份', - 'Focus on search' => '光标定位到搜索栏', - 'Display/Close shortcuts' => '显示/关闭 快捷键', - 'Move backward through top menu' => '在顶部菜单栏向前定位光标', - 'Move forward through top menu' => '在顶部菜单栏向后定位光标', - 'Enter focused element' => '转到被光标定位的菜单项', + 'Upload' => 'Upload', + 'New File' => 'New File', + 'New Folder' => 'New Folder', + 'Download' => 'Download', + 'Archive' => 'Archive', + 'Save File (in text editor)' => 'Save File (in text editor)', + 'Close Popup / Cancel' => 'Close Popup / Cancel', + 'Move Cursor Up' => 'Move Cursor Up', + 'Move Cursor Down' => 'Move Cursor Down', + 'Switch to Left Tab' => 'Switch to Left Tab', + 'Switch to Right Tab' => 'Switch to Right Tab', + 'Switch Tab' => 'Switch Tab', + 'Go to the Top of the File List' => 'Go to the Top of the File List', + 'Go to the Last File' => 'Go to the Last File', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', + 'Go to Parent Directory' => 'Go to Parent Directory', + 'Select Current File' => 'Select Current File', + 'Select Bunch of Files' => 'Select Bunch of Files', + 'Add File to the Current Selection' => 'Add File to the Current Selection', + 'Select All Files' => 'Select All Files', + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', - 'Upload' => '上传', - 'New File' => '新建文件', - 'New Folder' => '新建目录', - 'Download' => '下载', - 'Rename' => '重命名', - 'Copy' => '复制', - 'Archive' => '存档', - 'Delete' => '删除', - 'Save File (in text editor)' => '保存文件 (在文本编辑器内)', - 'Close Popup / Cancel' => '关闭弹窗 / 取消', - 'Move Cursor Up' => '上移光标', - 'Move Cursor Down' => '下移光标', - 'Switch to Left Tab' => '切换到左标签', - 'Switch to Right Tab' => '切换到右标签', - 'Switch Tab' => '切换标签', - 'Go to the Top of the File List' => '转至文件列表顶部', - 'Go to the Last File' => '转至最后一个文件', - 'Open File / Enter Directory' => '打开文件 / 进入目录', - 'Go to Parent Directory' => '转至父目录', - 'Select Current File' => '选中当前文件', - 'Select Bunch of Files' => '选择多个文件', - 'Add File to the Current Selection' => '将文件添加到当前选中区内', - 'Select All Files' => '选择所有文件', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => '快捷键的灵感来自旖旎的 GNU Midnight Commander 文件管理器', + 'Licence Key' => 'Licence Key', + 'Enter License Key' => 'Enter License Key', + 'Buy Licence' => 'Buy Licence', + 'Buy Lifetime License' => 'Buy Lifetime License', + 'Disable and Cancel Licence' => 'Disable and Cancel Licence', + 'Licence Activated' => 'Licence Activated', + 'Licence Deactivated' => 'Licence Deactivated', + 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', + '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.', + '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.', - 'Licence Key' => '许可密匙', - 'Enter License Key' => '输入许可密匙', - 'Buy Licence' => '购买许可', - 'Buy Lifetime License' => '购买终身许可', - 'Disable and Cancel Licence' => '停用并取消许可', - 'Licence Activated' => '许可已激活', - 'Licence Deactivated' => '许可已停用', - 'Restrict users so that they cannot use SSH and access only their home directory.' => '限制用户,使他们不能使用 SSH 只能访问自己的主目录。', - 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => '功能全面的文件管理器,浏览,复制,编辑,查看和检索你的 Web 文件。', - 'This is a commercial module, you would need to purchace license key to enable it.' => '这是商业模块,你需要购买许可密匙来启用它。' + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', ); diff --git a/web/inc/i18n/cz.php b/web/inc/i18n/cz.php index a8a8b078..29e728c9 100644 --- a/web/inc/i18n/cz.php +++ b/web/inc/i18n/cz.php @@ -26,6 +26,21 @@ $LANG['cz'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Přidat uživatele', 'Add Domain' => 'Přidat doménu', 'Add Web Domain' => 'Přidat web. doménu', @@ -161,13 +176,14 @@ $LANG['cz'] = array( 'Web Aliases' => 'Webové aliasy', 'per domain' => 'podle domény', 'DNS Domains' => 'DNS Domény', - 'DNS Domains' => 'DNS domény', - 'DNS records' => 'DNS evidence' , + 'DNS domains' => 'DNS domény', + 'DNS records' => 'DNS evidence', 'Name Servers' => 'Name servery', 'Mail Domains' => 'Mailové domény', 'Mail Accounts' => 'Mailové účty', 'Cron Jobs' => 'Cron Jobs', 'SSH Access' => 'SSH přístup', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP Adresy', 'Backups' => 'Zálohy', 'Backup System' => 'Zálohovací systém', @@ -179,11 +195,13 @@ $LANG['cz'] = array( 'Proxy Extensions' => 'Proxy rozšíření', 'Web Statistics' => 'Webové statistiky', 'Additional FTP Account' => 'další FTP účet', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'expirace', 'Records' => 'záznamy', - 'Catchall email' => 'Catchall email', // neznam + 'Serial' => 'Serial', + 'Catchall email' => 'Catchall email', // neznam 'AntiVirus Support' => 'AntiVirus podpora', 'AntiSpam Support' => 'AntiSpam podpora', 'DKIM Support' => 'DKIM podpora', @@ -192,6 +210,16 @@ $LANG['cz'] = array( 'Autoreply' => 'Autoreply', 'Forward to' => 'Předat dál', 'Do not store forwarded mail' => 'neukládat odeslané e-maily', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'databáze', 'User' => 'Uživatel', 'Host' => 'Host', @@ -213,11 +241,13 @@ $LANG['cz'] = array( 'Users' => 'Uživatelé', 'Load Average' => 'Průměrné zatížení', 'Memory Usage' => 'Využití paměti', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD využití', 'NGINX Usage' => 'NGINX využití', 'MySQL Usage on localhost' => 'MySQL využití on localhost', 'PostgreSQL Usage on localhost' => 'PostgreSQL využití on localhost', 'Bandwidth Usage eth0' => 'Bandwidth využití eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP využití', 'SSH Usage' => 'SSH využití', 'reverse proxy' => 'reverse proxy', @@ -230,6 +260,8 @@ $LANG['cz'] = array( 'database server' => 'databázový server', 'ftp server' => 'ftp server', 'job scheduler' => 'plánovač úkolů', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Pamět', 'Uptime' => 'Uptime', @@ -240,7 +272,6 @@ $LANG['cz'] = array( 'Release' => 'Release', 'Architecture' => 'Architektura', 'Object' => 'Objekt', - 'Owner' => 'Vlastník', 'Username' => 'Uživatelské jméno', 'Password' => 'Heslo', 'Email' => 'Email', @@ -334,6 +365,8 @@ $LANG['cz'] = array( 'ftp user password' => 'ftp uživatelské heslo', 'ftp user' => 'ftp uživatel', 'Last 70 lines of %s.%s.log' => 'Posledních 70 řádků %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Stáhnout AccessLog', 'Download ErrorLog' => 'Stáhnout ErrorLog', 'Country' => 'Země', @@ -348,8 +381,26 @@ $LANG['cz'] = array( 'Banlist' => 'Banlist', 'ranges are acceptable' => 'rozsahy jsou přijatelné', 'CIDR format is supported' => 'Formát CIDR je podporován', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unlimited', '1 account' => '1 účet', '%s accounts' => '%s účtů', @@ -365,6 +416,8 @@ $LANG['cz'] = array( '%s cron jobs' => '%s cron jobů', '1 archive' => '1 archiv', '%s archives' => '%s archivů', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 balíček', '%s packages' => '%s balíčků', '1 IP address' => '1 IP adresa', @@ -392,6 +445,7 @@ $LANG['cz'] = array( 'PACKAGE_CREATED_OK' => 'Package %s byl úspěšně vytvořen.', 'SSL_GENERATED_OK' => 'SSL certifikát byl úspěšně vygenerován.', 'RULE_CREATED_OK' => 'Pravidlo byla úspěšně vytvořena.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Autoupdate has been successfully enabled', 'Autoupdate has been successfully disabled' => 'Autoupdate has been successfully disabled', 'Cronjob email reporting has been successfully enabled' => 'Cronjob email hlášení byla úspěšně aktivována', @@ -442,12 +496,12 @@ $LANG['cz'] = array( 'RESTORE_SCHEDULED' => 'Úkol byl přidán do fronty. Obdržíte e-mail oznámení, když vaše záloha je připravena ke stažení.', 'RESTORE_EXISTS' => 'Stávající úkol je již spuštěn. Prosím, vyčkejte na jeho dokončení před spuštěním znovu.', - 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *", - 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *", - 'CRON_EXCLUSIONS' => "To exclude all jobs use *", - 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *", + 'WEB_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *', + 'MAIL_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Type full database name, one per line. To exclude all databases use *', + 'CRON_EXCLUSIONS' => 'To exclude all jobs use *', + 'USER_EXCLUSIONS' => 'Type directory name, one per line. To exlude all dirs use *', 'Welcome to Vesta Control Panel' => 'Vítejte na Vesta Control Panel', 'MAIL_FROM' => 'Vesta Control Panel ', @@ -467,7 +521,7 @@ $LANG['cz'] = array( 'Confirm Password' => 'Potvrdit heslo', 'Reset' => 'Obnovit', 'Reset Code' => 'Obnovit kód', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Resetování hesla. Kód byl odeslán na vaši e-mailovou adresu
', 'MAIL_RESET_SUBJECT' => 'Obnovení hesla na %s', 'PASSWORD_RESET_REQUEST' => "Chcete-li obnovit heslo ovládacího panelu, prosím následujte tento odkaz:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nPřípadně, můžete se obrátit na https://%s/reset/?action=code&user=%s a zadejte následující resetovací kód:\n%s\n\nPokud jste si nevyžádali resetování hesla, prosím, tuto zprávu ignorovat a přijmout naši omluvu.\n\n--\nVesta Control Panel\n", @@ -489,6 +543,29 @@ $LANG['cz'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Time Zone', 'Default Language' => 'Default Language', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'preview', @@ -504,8 +581,8 @@ $LANG['cz'] = array( 'Starred' => 'Starred', 'Name' => 'Name', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -515,10 +592,13 @@ $LANG['cz'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -533,12 +613,20 @@ $LANG['cz'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -547,7 +635,17 @@ $LANG['cz'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -563,31 +661,31 @@ $LANG['cz'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -599,6 +697,34 @@ $LANG['cz'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/da.php b/web/inc/i18n/da.php index 57544843..2650e694 100644 --- a/web/inc/i18n/da.php +++ b/web/inc/i18n/da.php @@ -27,6 +27,21 @@ $LANG['da'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => '', 'Add Domain' => 'Tilføj Domæne', 'Add Web Domain' => 'Tilføj Web Domæne', @@ -162,13 +177,14 @@ $LANG['da'] = array( 'Web Aliases' => 'Web Aliaser', 'per domain' => 'per domæne', 'DNS Domains' => 'DNS Domæner', - 'DNS Domains' => 'DNS Domæner', - 'DNS records' => 'DNS Records' , + 'DNS domains' => 'DNS domæner', + 'DNS records' => 'DNS records', 'Name Servers' => 'Name Servers', 'Mail Domains' => 'Mail Domæner', 'Mail Accounts' => 'Mail Accounts', 'Cron Jobs' => 'Cron Jobs', 'SSH Access' => 'SSH Adgang', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP Addresser', 'Backups' => 'Backups', 'Backup System' => 'Backup System', @@ -180,10 +196,12 @@ $LANG['da'] = array( 'Proxy Extensions' => 'Proxy Tilføjelser', 'Web Statistics' => 'Web Statistik', 'Additional FTP Account' => 'Ekstra FTP', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Udløber', 'Records' => 'Records', + 'Serial' => 'Serial', 'Catchall email' => 'Catchall email', 'AntiVirus Support' => 'AntiVirus Support', 'AntiSpam Support' => 'AntiSpam Support', @@ -193,6 +211,16 @@ $LANG['da'] = array( 'Autoreply' => 'Autosvar', 'Forward to' => 'Vidersend til', 'Do not store forwarded mail' => 'Gem ikke vidersendte mails', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'database', 'User' => 'Bruger', 'Host' => 'Host', @@ -214,11 +242,13 @@ $LANG['da'] = array( 'Users' => 'Brugere', 'Load Average' => 'Load Gennemsnit', 'Memory Usage' => 'Hukommelsesforbrug', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD Forbrug', 'NGINX Usage' => 'NGINX Forbrug', 'MySQL Usage on localhost' => 'MySQL Forbrug på localhost', 'PostgreSQL Usage on localhost' => 'PostgreSQL Forbrug på localhost', 'Bandwidth Usage eth0' => 'Båndbredde Forbrug eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP Forbrug', 'SSH Usage' => 'SSH Forbrug', 'reverse proxy' => 'reverse proxy', @@ -231,6 +261,8 @@ $LANG['da'] = array( 'database server' => 'database server', 'ftp server' => 'ftp server', 'job scheduler' => 'job scheduler', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Hukommelse', 'Uptime' => 'Oppetid', @@ -241,7 +273,6 @@ $LANG['da'] = array( 'Release' => 'Udgivelse', 'Architecture' => 'Arkitektur', 'Object' => 'Object', - 'Owner' => 'Ejer', 'Username' => 'Brugernavn', 'Password' => 'Adgangskode', 'Email' => 'Email', @@ -335,6 +366,8 @@ $LANG['da'] = array( 'ftp user password' => 'ftp-bruger adgangskode', 'ftp user' => 'ftp bruger', 'Last 70 lines of %s.%s.log' => 'De sidste 70 linier af %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Hent AccessLog', 'Download ErrorLog' => 'Hent ErrorLog', 'Country' => 'Land', @@ -349,8 +382,26 @@ $LANG['da'] = array( 'Banlist' => 'Banliste', 'ranges are acceptable' => 'intervallerne er acceptable', 'CIDR format is supported' => 'CIDR format er understøttet', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'ubegrænset', '1 account' => '1 konto', '%s accounts' => '%s konti', @@ -366,6 +417,8 @@ $LANG['da'] = array( '%s cron jobs' => '%s cronjobs', '1 archive' => '1 arkiv', '%s archives' => '%s arkiver', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 pakke', '%s packages' => '%s pakker', '1 IP address' => '1 IP addresse', @@ -379,7 +432,7 @@ $LANG['da'] = array( 'no exclusions' => 'ingen ekslusioner', '1 rule' => '1 regel', '%s rules' => '%s regler', - 'There are no currently banned IP' => 'Der er ingen bannede IP\'er i øjeblikket', + 'There are no currently banned IP' => "Der er ingen bannede IP'er i øjeblikket", 'USER_CREATED_OK' => 'Bruger %s blev oprettet med succes.', 'WEB_DOMAIN_CREATED_OK' => 'Domænet %s blev oprettet med succes.', @@ -393,6 +446,7 @@ $LANG['da'] = array( 'PACKAGE_CREATED_OK' => 'Pakke %s blev oprettet med succes.', 'SSL_GENERATED_OK' => 'Certifikat blev genereret med succes.', 'RULE_CREATED_OK' => 'Regel blev oprettet med succes.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Autoupdate blev aktiveret med succes.', 'Autoupdate has been successfully disabled' => 'Autoupdate blev deaktiveret med succes.', 'Cronjob email reporting has been successfully enabled' => 'Cronjob email rapportering blev aktiveret med succes', @@ -443,12 +497,12 @@ $LANG['da'] = array( 'RESTORE_SCHEDULED' => 'Opgaven er blevet tilføjet til køen. Du vil modtage en email når din genskabelse er færdig.', 'RESTORE_EXISTS' => 'En eksisterende genskabelse kører allerede. Vent venligst til den er færdig før du kører den igen.', - 'WEB_EXCLUSIONS' => "Indtast domænenavn, et per linie. For at udelukke alle domæner, brug *. Benyt følgende format for at udelukke specifikke mapper: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Indtast domænenavn, et per linie. For at udelukke alle domæner, brug *", - 'MAIL_EXCLUSIONS' => "Indtast domænenavn, et per linie. For at udelukke alle domæner, brug *. Benyt følgende format for at udelukke specifikke konti: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Indtast det fulde databasenavn, et per linie. To exclude all databases use *", - 'CRON_EXCLUSIONS' => "For at udelukke alle opgaver, brug *", - 'USER_EXCLUSIONS' => "Indtast mappenavn, et per linie. For at udelukke alle mapper, brug *", + 'WEB_EXCLUSIONS' => 'Indtast domænenavn, et per linie. For at udelukke alle domæner, brug *. Benyt følgende format for at udelukke specifikke mapper: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Indtast domænenavn, et per linie. For at udelukke alle domæner, brug *', + 'MAIL_EXCLUSIONS' => 'Indtast domænenavn, et per linie. For at udelukke alle domæner, brug *. Benyt følgende format for at udelukke specifikke konti: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Indtast det fulde databasenavn, et per linie. To exclude all databases use *', + 'CRON_EXCLUSIONS' => 'For at udelukke alle opgaver, brug *', + 'USER_EXCLUSIONS' => 'Indtast mappenavn, et per linie. For at udelukke alle mapper, brug *', 'Welcome to Vesta Control Panel' => 'Velkommen til Vesta Kontrolpanel', 'MAIL_FROM' => 'Vesta Kontrolpanel ', @@ -468,7 +522,7 @@ $LANG['da'] = array( 'Confirm Password' => 'Bekræft Adgangskode', 'Reset' => 'Nulstil', 'Reset Code' => 'Nulstillingskode', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Kode til at nultille adgangskode er blevet sendt til din email-adresse
', 'MAIL_RESET_SUBJECT' => 'Adgangskode Nulstillet %s', 'PASSWORD_RESET_REQUEST' => "Følg dette link for at nulstille din adgangskode:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternativt, kan du også gå til https://%s/reset/?action=code&user=%s og indtast følgende nulstillingskode:\n%s\n\nHvis du ikke selv har bedt om at få nulstillet din adgangskode, bedes du ignorere denne besked - vi beklager.\n\n--\nVesta Kontrolpanel\n", @@ -490,7 +544,30 @@ $LANG['da'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Tidszone', 'Default Language' => 'Standard Sprog', - 'FileSystem Disk Quota ' => 'FilSystem Disk Quota ', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => 'FilSystem Disk Quota ', 'Vesta Control Panel Plugins' => 'Vesta Kontrolpanel Plugins', 'preview' => 'preview', 'Reseller Role' => 'Forhandlerrolle', @@ -505,8 +582,8 @@ $LANG['da'] = array( 'Starred' => 'Starred', 'Name' => 'Navn', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -516,10 +593,13 @@ $LANG['da'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -534,12 +614,20 @@ $LANG['da'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -548,7 +636,17 @@ $LANG['da'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -564,29 +662,29 @@ $LANG['da'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', @@ -600,6 +698,34 @@ $LANG['da'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', ); diff --git a/web/inc/i18n/de.php b/web/inc/i18n/de.php index f86b23f9..32511012 100644 --- a/web/inc/i18n/de.php +++ b/web/inc/i18n/de.php @@ -25,6 +25,21 @@ $LANG['de'] = array( 'CRON' => 'CRONS', 'BACKUP' => 'BACKUPS', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Benutzer anlegen', 'Add Domain' => 'Domain hinzufügen', 'Add Web Domain' => 'Domain hinzufügen', @@ -53,7 +68,7 @@ $LANG['de'] = array( 'Save' => 'Speichern', 'Submit' => 'Übermitteln', - 'toggle all' => 'Alle wählen/abwählen', + 'toggle all' => 'alle', // please make it as short as "toggle all" 'Alle wählen/abwählen', 'apply to selected' => 'Auswählen', 'rebuild' => 'Erneuern', 'rebuild web' => 'Web erneuern', @@ -90,8 +105,8 @@ $LANG['de'] = array( 'reread IP' => 'IP aktualisieren', 'enable autoupdate' => 'Autoupdate aktivieren', 'disable autoupdate' => 'Autoupdate deaktivieren', - 'turn on notifications' => 'Benachrichtigungen aktivieren', - 'turn off notifications' => 'Benachrichtigungen deaktivieren', + 'turn on notifications' => 'turn on notifications', // please make it as short as "turn on notifications" 'Benachrichtigungen aktivieren', + 'turn off notifications' => 'turn off notifications', // please make it as short as "turn off notifications" 'Benachrichtigungen deaktivieren', 'Adding User' => 'Benutzer anlegen', 'Editing User' => 'Benutzer bearbeiten', @@ -160,12 +175,14 @@ $LANG['de'] = array( 'Web Aliases' => 'Web Aliase', 'per domain' => 'pro Domain', 'DNS Domains' => 'DNS Domains', - 'DNS records' => 'DNS Einträge' , + 'DNS domains' => 'DNS domains', + 'DNS records' => 'DNS Einträge', 'Name Servers' => 'Name Server', 'Mail Domains' => 'Mail Domain', 'Mail Accounts' => 'Mail Konten', 'Cron Jobs' => 'Cron Jobs', 'SSH Access' => 'SSH Zugriff', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP-Adressen', 'Backups' => 'Backups', 'Backup System' => 'Backup System', @@ -177,10 +194,12 @@ $LANG['de'] = array( 'Proxy Extensions' => 'Proxy Erweiterungen', 'Web Statistics' => 'Web Statistiken', 'Additional FTP Account' => 'Zusätzliche FTP Accounts', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Ablauf', 'Records' => 'Einträge', + 'Serial' => 'Serial', 'Catchall email' => 'Alle E-Mails auffangen in', 'AntiVirus Support' => 'AntiVirus Unterstützung', 'AntiSpam Support' => 'AntiSpam Unterstützung', @@ -190,6 +209,16 @@ $LANG['de'] = array( 'Autoreply' => 'Autoreply', 'Forward to' => 'Weiterleiten zu', 'Do not store forwarded mail' => 'Weiterleitungs Adresse nicht speichern', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'Datenbank', 'User' => 'Benutzer', 'Host' => 'Host', @@ -211,11 +240,13 @@ $LANG['de'] = array( 'Users' => 'Benutzer', 'Load Average' => 'Durchschnittliche Last', 'Memory Usage' => 'Arbeitsspeichernutzung', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD Benutzung', 'NGINX Usage' => 'NGINX Benutzung', 'MySQL Usage on localhost' => 'MySQL Benutzung auf localhost', 'PostgreSQL Usage on localhost' => 'PostgreSQL Benutzung on localhost', 'Bandwidth Usage eth0' => 'Bandbreitennutzung eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP Benutzung', 'SSH Usage' => 'SSH Benutzung', 'reverse proxy' => 'Reverse Proxy', @@ -228,6 +259,8 @@ $LANG['de'] = array( 'database server' => 'Datenbank Server', 'ftp server' => 'FTP Server', 'job scheduler' => 'Job-Scheduler', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Arbeitsspeicher', 'Uptime' => 'Betriebszeit', @@ -238,7 +271,6 @@ $LANG['de'] = array( 'Release' => 'Release', 'Architecture' => 'Architektur', 'Object' => 'Objekt', - 'Owner' => 'Besitzer', 'Username' => 'Bentzername', 'Password' => 'Passwort', 'Email' => 'E-Mail', @@ -332,6 +364,8 @@ $LANG['de'] = array( 'ftp user password' => 'FTP Benutzer Passwort', 'ftp user' => 'FTP Benutzer', 'Last 70 lines of %s.%s.log' => 'Die letzten 70 Zeilen von %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'AccessLog herunterladen', 'Download ErrorLog' => 'ErrorLog herunterladen', 'Country' => 'Land', @@ -346,8 +380,26 @@ $LANG['de'] = array( 'Banlist' => 'schwarze Liste', 'ranges are acceptable' => 'Bereiche sind erlaubt', 'CIDR format is supported' => 'CIDR-Format wird unterstützt', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unbegrenzt', '1 account' => '1 Konto', '%s accounts' => '%s Konten', @@ -363,6 +415,8 @@ $LANG['de'] = array( '%s cron jobs' => '%s Cron Jobs', '1 archive' => '1 Archiv', '%s archives' => '%s Archive', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 Paket', '%s packages' => '%s Pakete', '1 IP address' => '1 IP Adresse', @@ -390,6 +444,7 @@ $LANG['de'] = array( 'PACKAGE_CREATED_OK' => 'Packet %s wurde erfolgreich angelegt.', 'SSL_GENERATED_OK' => 'SSL Zertifikat wurde erfolgreich angelegt.', 'RULE_CREATED_OK' => 'Regel wurde erfolgreich erstellt.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Autoupdate wurde erfolgreich aktiviert', 'Autoupdate has been successfully disabled' => 'Autoupdate wurde erfolgreich deaktiviert', 'Cronjob email reporting has been successfully enabled' => 'Cronjob E-Mail-Berichterstattung wurde erfolgreich aktiviert', @@ -465,7 +520,7 @@ $LANG['de'] = array( 'Confirm Password' => 'Passwort bestätigen', 'Reset' => 'Zurücksetzen', 'Reset Code' => 'Rücksetz-Code', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Passwort Rücksetz-Code wurde an Ihre Adresse gesandt
', 'MAIL_RESET_SUBJECT' => 'Passwort Reset für %s', 'PASSWORD_RESET_REQUEST' => "Zum Zurücksetzen Ihres Passwortes, besuchen Sie bitte folgenden Link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternativ, können Sie auf https://%s/reset/?action=code&user=%s gehen und dort folgenden Reset Code eingeben:\n%s\n\nWenn Sie Ihr Passwort nicht zurücksetzen wollten, ignorieren Sie diese Nachricht und entschuldigen Sie uns die Unannehmlichkeiten.\n\n--\nVesta Control Panel\n", @@ -487,6 +542,29 @@ $LANG['de'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Zeitzone', 'Default Language' => 'Standardsprache', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'Dateisystem Nutzungskontingent', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'vorschau', @@ -502,8 +580,8 @@ $LANG['de'] = array( 'Starred' => 'Starred', 'Name' => 'Name', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -513,10 +591,13 @@ $LANG['de'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -531,12 +612,20 @@ $LANG['de'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -545,7 +634,17 @@ $LANG['de'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -561,31 +660,31 @@ $LANG['de'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -597,6 +696,34 @@ $LANG['de'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/el.php b/web/inc/i18n/el.php index 068cc559..4413cca0 100644 --- a/web/inc/i18n/el.php +++ b/web/inc/i18n/el.php @@ -10,7 +10,7 @@ $LANG['el'] = array( 'IP' => 'IP', 'Graphs' => 'Γραφήματα', 'Statistics' => 'Στατιστικά', - 'Log' => 'Αρχείο Καταγραφής', + 'Log' => 'Αρχείο', 'Server' => 'Διακομιστής', 'Services' => 'Υπηρεσίες', 'Firewall' => 'Firewall', @@ -26,6 +26,21 @@ $LANG['el'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Προσθέστε χρήστη', 'Add Domain' => 'Προσθέστε domain', 'Add Web Domain' => 'Προσθέστε Web Domain', @@ -91,8 +106,8 @@ $LANG['el'] = array( 'reread IP' => 'Ενημέρωση IP', 'enable autoupdate' => 'ενεργοποίηση autoupdate', 'disable autoupdate' => 'απενεργοποίηση autoupdate', - 'turn on notifications' => 'ενεργοποίηση ειδοποιήσεων', - 'turn off notifications' => 'απενεργοποίηση ειδοποιήσεων', + 'turn on notifications' => 'ενεργοποίηση ειδοπ.', + 'turn off notifications' => 'απενεργοποίηση ειδοπ.', 'Adding User' => 'Προσθήκη Χρήστη', 'Editing User' => 'Επεξεργασία Χρήστη', @@ -161,13 +176,14 @@ $LANG['el'] = array( 'Web Aliases' => 'Ψευδώνυμα Web', 'per domain' => 'ανά domain', 'DNS Domains' => 'DNS Domains', - 'DNS Domains' => 'DNS Domains', - 'DNS records' => 'Εγγραφές DNS' , + 'DNS domains' => 'DNS domains', + 'DNS records' => 'Εγγραφές DNS', 'Name Servers' => 'Διακομιστές Ονομάτων', 'Mail Domains' => 'Mail Domains', 'Mail Accounts' => 'Λογαριασμοί Mail', 'Cron Jobs' => 'Cron Jobs', 'SSH Access' => 'Πρόσβαση SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'Διευθύνσεις IP', 'Backups' => 'Αντίγραφα Ασφαλείας', 'Backup System' => 'Σύστημα Αντιγράφων Ασφαλείας', @@ -179,10 +195,12 @@ $LANG['el'] = array( 'Proxy Extensions' => 'Πρόσθετα Proxy', 'Web Statistics' => 'Στατιστικά Web', 'Additional FTP Account' => 'Επιπρόσθετος Λογαριασμός FTP', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Λήγει', 'Records' => 'Εγγραφές', + 'Serial' => 'Serial', 'Catchall email' => 'Catchall email', 'AntiVirus Support' => 'Υποστήριξη AntiVirus', 'AntiSpam Support' => 'Υποστήριξη AntiSpam', @@ -192,6 +210,16 @@ $LANG['el'] = array( 'Autoreply' => 'Αυτόματη απάντηση', 'Forward to' => 'Προώθηση σε', 'Do not store forwarded mail' => 'Μη αποθήκευση των προωθημένων mail', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'βάση δεδομένων', 'User' => 'Χρήστης', 'Host' => 'Host', @@ -213,11 +241,13 @@ $LANG['el'] = array( 'Users' => 'Χρήστες', 'Load Average' => 'Μέσος Όρος Φόρτου', 'Memory Usage' => 'Χρήση Μνήμης', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'Χρήση HTTPD', 'NGINX Usage' => 'Χρήση NGINX', 'MySQL Usage on localhost' => 'Χρήση της MySQL στο localhost', 'PostgreSQL Usage on localhost' => 'Χρήση της PostgreSQL στο localhost', 'Bandwidth Usage eth0' => 'Χρήση Bandwidth eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'Χρήση FTP ', 'SSH Usage' => 'Χρήση SSH', 'reverse proxy' => 'reverse proxy', @@ -230,6 +260,8 @@ $LANG['el'] = array( 'database server' => 'διακομιστής βάσης δεδομένων', 'ftp server' => 'διακομιστής ftp', 'job scheduler' => 'job scheduler', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Μνήμη', 'Uptime' => 'χρόνος λειτουργίας', @@ -240,7 +272,6 @@ $LANG['el'] = array( 'Release' => 'Κυκλοφορία', 'Architecture' => 'Αρχιτεκτονική', 'Object' => 'Αντικείμενο', - 'Owner' => 'Ιδιοκτήτης', 'Username' => 'Όνομα Χρήστη', 'Password' => 'Κωδικός', 'Email' => 'Email', @@ -334,6 +365,8 @@ $LANG['el'] = array( 'ftp user password' => 'κωδικός πρόσβασης χρήστη ftp', 'ftp user' => 'χρήστης ftp', 'Last 70 lines of %s.%s.log' => 'Τελευταίες 70 γραμμές του %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Λήψη AccessLog', 'Download ErrorLog' => 'Λήψη ErrorLog', 'Country' => 'Χώρα', @@ -348,8 +381,26 @@ $LANG['el'] = array( 'Banlist' => 'Λίστα απαγόρευσης', 'ranges are acceptable' => 'εύρος είναι αποδεκτό', 'CIDR format is supported' => 'To format CIDR υποστηρίζεται', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unlimited', '1 account' => '1 λογαριασμός', '%s accounts' => '%s λογαριασμοί', @@ -365,6 +416,8 @@ $LANG['el'] = array( '%s cron jobs' => '%s cron jobs', '1 archive' => '1 αρχείο', '%s archives' => '%s αρχεία', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 πακέτο', '%s packages' => '%s πακέτα', '1 IP address' => '1 διεύθυνση IP', @@ -392,6 +445,7 @@ $LANG['el'] = array( 'PACKAGE_CREATED_OK' => 'Το πακέτο a href="/edit/package/?package=%s">%s έχει δημιουργηθεί επιτυχώς.', 'SSL_GENERATED_OK' => 'Το πιστοποιητικό έχει δημιουργηθεί επιτυχώς.', 'RULE_CREATED_OK' => 'Ο κανόνας έχει δημιουργηθεί επιτυχώς.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Η αυτόματη ενημέρωση έχει ενεργοποιηθεί επιτυχώς.', 'Autoupdate has been successfully disabled' => 'Η αυτόματη ενημέρωση έχει απενεργοποιηθεί επιτυχώς.', 'Cronjob email reporting has been successfully enabled' => 'Το Cronjob αναφοράς email έχει ενεργοποιηθεί επιτυχώς', @@ -442,12 +496,12 @@ $LANG['el'] = array( 'RESTORE_SCHEDULED' => 'Η διεργασία έχει προστεθεί στην ουρά. Θα λάβετε ειδοποίηση ηλεκτρονικού ταχυδρομείου όταν η επαναφορά σας έχει ολοκληρωθεί.', 'RESTORE_EXISTS' => 'Μια υπάρχουσα διεργασία επαναφοράς εκτελείται ήδη. Παρακαλώ περιμένετε να ολοκληρωθεί πριν την εκκινήσετε ξανά.', - 'WEB_EXCLUSIONS' => "Πληκτρολογήστε το όνομα domain, ένα ανά σειρά. Για να εξαιρέσετε όλα τα ονόματα domain χρησιμοποιήστε *. Για να εξαιρέσετε συγκεκριμένους καταλόγους χρησιμοποιήστε την ακόλουθη μορφή: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Πληκτρολογήστε το όνομα της διεύθυνσης DNS, ένα ανά σειρά. Για να εξαιρέσετε όλα τα ονόματα διεύθυνσης DNS χρησιμοποιήστε *", - 'MAIL_EXCLUSIONS' => "Πληκτρολογήστε το όνομα της διεύθυνσης mail, ένα ανά σειρά. Για να εξαιρέσετε όλα τα ονόματα διεύθυνσης mail χρησιμοποιήστε *. Για να εξαιρέσετε συγκεκριμένους λογαριασμούς χρησιμοποιήσετε την ακόλουθη μορφή: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Πληκτρολογήστε το πλήρες όνομα της βάσης δεδομένων, ένα ανά σειρά. Για να εξαιρέσετε όλες τις βάσεις δεδομένων χρησιμοποιήστε *", - 'CRON_EXCLUSIONS' => "Για να εξαιρέσετε όλα τα jobs χρησιμοποιήστε *", - 'USER_EXCLUSIONS' => "Πληκτρολογήστε το όνομα καταλόγου, ένα ανά σειρά. Για να εξαιρέσετε όλους τους καταλόγους χρησιμοποιήστε *", + 'WEB_EXCLUSIONS' => 'Πληκτρολογήστε το όνομα domain, ένα ανά σειρά. Για να εξαιρέσετε όλα τα ονόματα domain χρησιμοποιήστε *. Για να εξαιρέσετε συγκεκριμένους καταλόγους χρησιμοποιήστε την ακόλουθη μορφή: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Πληκτρολογήστε το όνομα της διεύθυνσης DNS, ένα ανά σειρά. Για να εξαιρέσετε όλα τα ονόματα διεύθυνσης DNS χρησιμοποιήστε *', + 'MAIL_EXCLUSIONS' => 'Πληκτρολογήστε το όνομα της διεύθυνσης mail, ένα ανά σειρά. Για να εξαιρέσετε όλα τα ονόματα διεύθυνσης mail χρησιμοποιήστε *. Για να εξαιρέσετε συγκεκριμένους λογαριασμούς χρησιμοποιήσετε την ακόλουθη μορφή: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Πληκτρολογήστε το πλήρες όνομα της βάσης δεδομένων, ένα ανά σειρά. Για να εξαιρέσετε όλες τις βάσεις δεδομένων χρησιμοποιήστε *', + 'CRON_EXCLUSIONS' => 'Για να εξαιρέσετε όλα τα jobs χρησιμοποιήστε *', + 'USER_EXCLUSIONS' => 'Πληκτρολογήστε το όνομα καταλόγου, ένα ανά σειρά. Για να εξαιρέσετε όλους τους καταλόγους χρησιμοποιήστε *', 'Welcome to Vesta Control Panel' => 'Καλωσήρθατε στον Πίνακα Ελέγχου Vesta', 'MAIL_FROM' => 'Vesta Control Panel ', @@ -467,7 +521,7 @@ $LANG['el'] = array( 'Confirm Password' => 'Επιβεβαίωση κωδικού πρόσβασης', 'Reset' => 'Επαναφορά', 'Reset Code' => 'Επαναφορά κωδικού', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Ο κωδικός επαναφοράς του κωδικού πρόσβασης έχει αποσταλεί στη διεύθυνση ταχυδρομείου σας
', 'MAIL_RESET_SUBJECT' => 'Επαναφορά κωδικού πρόσβασης στο %s', 'PASSWORD_RESET_REQUEST' => "Για να επαναφέρετε τον κωδικό πρόσβασης του πίνακα ελέγχου σας, παρακαλώ ακολουθήστε το link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nΕναλλακτικά, πλοηγηθείτε στη διεύθυνση https://%s/reset/?action=code&user=%s και εισάγετε τον ακόλουθο κωδικό επαναφοράς:\n%s\n\nΕάν δεν ζητήσατε επαναφορά κωδικού πρόσβασης, παρακαλούμε αγνοείστε το παρόν μήνυμα και δεχθείτε τη συγγνώμη μας.\n\n--\nVesta Control Panel\n", @@ -489,6 +543,29 @@ $LANG['el'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Time Zone', 'Default Language' => 'Default Language', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'preview', @@ -504,8 +581,8 @@ $LANG['el'] = array( 'Starred' => 'Starred', 'Name' => 'Name', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -515,10 +592,13 @@ $LANG['el'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -533,12 +613,20 @@ $LANG['el'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -547,7 +635,17 @@ $LANG['el'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -563,31 +661,31 @@ $LANG['el'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -599,6 +697,34 @@ $LANG['el'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/en.php b/web/inc/i18n/en.php index a421ef41..f40283d7 100644 --- a/web/inc/i18n/en.php +++ b/web/inc/i18n/en.php @@ -25,6 +25,21 @@ $LANG['en'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Add User', 'Add Domain' => 'Add Domain', 'Add Web Domain' => 'Add Web Domain', @@ -90,7 +105,7 @@ $LANG['en'] = array( 'reread IP' => 'reread IP', 'enable autoupdate' => 'enable autoupdate', 'disable autoupdate' => 'disable autoupdate', - 'turn on notifications' => 'turn on notification', + 'turn on notifications' => 'turn on notifications', 'turn off notifications' => 'turn off notifications', 'Adding User' => 'Adding User', @@ -159,14 +174,15 @@ $LANG['en'] = array( 'SSL Domains' => 'SSL Domains', 'Web Aliases' => 'Web Aliases', 'per domain' => 'per domain', - 'DNS domains' => 'DNS Domains', 'DNS Domains' => 'DNS Domains', - 'DNS records' => 'DNS records' , + 'DNS domains' => 'DNS domains', + 'DNS records' => 'DNS records', 'Name Servers' => 'Name Servers', 'Mail Domains' => 'Mail Domains', 'Mail Accounts' => 'Mail Accounts', 'Cron Jobs' => 'Cron Jobs', 'SSH Access' => 'SSH Access', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP Addresses', 'Backups' => 'Backups', 'Backup System' => 'Backup System', @@ -178,10 +194,12 @@ $LANG['en'] = array( 'Proxy Extensions' => 'Proxy Extensions', 'Web Statistics' => 'Web Statistics', 'Additional FTP Account' => 'Additional FTP', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Expire', 'Records' => 'Records', + 'Serial' => 'Serial', 'Catchall email' => 'Catchall email', 'AntiVirus Support' => 'AntiVirus Support', 'AntiSpam Support' => 'AntiSpam Support', @@ -190,7 +208,17 @@ $LANG['en'] = array( 'Quota' => 'Quota', 'Autoreply' => 'Autoreply', 'Forward to' => 'Forward to', - 'Do not store forwarded mail' => 'Do not store forwarded mail', + 'Do not store forwarded mail' => 'Do not store forwarded mail', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'database', 'User' => 'User', 'Host' => 'Host', @@ -212,14 +240,15 @@ $LANG['en'] = array( 'Users' => 'Users', 'Load Average' => 'Load Average', 'Memory Usage' => 'Memory Usage', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD Usage', 'NGINX Usage' => 'NGINX Usage', 'MySQL Usage on localhost' => 'MySQL Usage on localhost', 'PostgreSQL Usage on localhost' => 'PostgreSQL Usage on localhost', 'Bandwidth Usage eth0' => 'Bandwidth Usage eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP Usage', 'SSH Usage' => 'SSH Usage', - 'Exim Usage' => 'Exim Usage', 'reverse proxy' => 'reverse proxy', 'web server' => 'web server', 'dns server' => 'dns server', @@ -230,6 +259,8 @@ $LANG['en'] = array( 'database server' => 'database server', 'ftp server' => 'ftp server', 'job scheduler' => 'job scheduler', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Memory', 'Uptime' => 'Uptime', @@ -240,7 +271,6 @@ $LANG['en'] = array( 'Release' => 'Release', 'Architecture' => 'Architecture', 'Object' => 'Object', - 'Owner' => 'Owner', 'Username' => 'Username', 'Password' => 'Password', 'Email' => 'Email', @@ -334,6 +364,8 @@ $LANG['en'] = array( 'ftp user password' => 'ftp user password', 'ftp user' => 'ftp user', 'Last 70 lines of %s.%s.log' => 'Last 70 lines of %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Download AccessLog', 'Download ErrorLog' => 'Download ErrorLog', 'Country' => 'Country', @@ -348,8 +380,26 @@ $LANG['en'] = array( 'Banlist' => 'Banlist', 'ranges are acceptable' => 'ranges are acceptable', 'CIDR format is supported' => 'CIDR format is supported', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unlimited', '1 account' => '1 account', '%s accounts' => '%s accounts', @@ -365,6 +415,8 @@ $LANG['en'] = array( '%s cron jobs' => '%s cron jobs', '1 archive' => '1 archive', '%s archives' => '%s archives', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 package', '%s packages' => '%s packages', '1 IP address' => '1 IP address', @@ -392,6 +444,7 @@ $LANG['en'] = array( 'PACKAGE_CREATED_OK' => 'Package %s has been created successfully.', 'SSL_GENERATED_OK' => 'Certificate has been generated successfully.', 'RULE_CREATED_OK' => 'Rule has been created successfully.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Autoupdate has been successfully enabled.', 'Autoupdate has been successfully disabled' => 'Autoupdate has been successfully disabled.', 'Cronjob email reporting has been successfully enabled' => 'Cronjob email reporting has been successfully enabled', @@ -442,12 +495,12 @@ $LANG['en'] = array( 'RESTORE_SCHEDULED' => 'Task has been added to the queue. You will receive an email notification when your restore has been completed.', 'RESTORE_EXISTS' => 'An existing restoration task is already running. Please wait for it to finish before launching it again.', - 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *", - 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *", - 'CRON_EXCLUSIONS' => "To exclude all jobs use *", - 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *", + 'WEB_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *', + 'MAIL_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Type full database name, one per line. To exclude all databases use *', + 'CRON_EXCLUSIONS' => 'To exclude all jobs use *', + 'USER_EXCLUSIONS' => 'Type directory name, one per line. To exlude all dirs use *', 'Welcome to Vesta Control Panel' => 'Welcome to Vesta Control Panel', 'MAIL_FROM' => 'Vesta Control Panel ', @@ -467,7 +520,7 @@ $LANG['en'] = array( 'Confirm Password' => 'Confirm Password', 'Reset' => 'Reset', 'Reset Code' => 'Reset Code', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Password reset code has been sent to your email address
', 'MAIL_RESET_SUBJECT' => 'Password Reset at %s', 'PASSWORD_RESET_REQUEST' => "To reset your control panel password, please follow this link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternatively, you may go to https://%s/reset/?action=code&user=%s and enter the following reset code:\n%s\n\nIf you did not request password reset, please ignore this message and accept our apologies.\n\n--\nVesta Control Panel\n", @@ -489,7 +542,30 @@ $LANG['en'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Time Zone', 'Default Language' => 'Default Language', - 'FileSystem Disk Quota ' => 'FileSystem Disk Quota ', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'preview', 'Reseller Role' => 'Reseller Role', @@ -506,7 +582,6 @@ $LANG['en'] = array( 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -516,10 +591,13 @@ $LANG['en'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -534,12 +612,20 @@ $LANG['en'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -548,8 +634,17 @@ $LANG['en'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', - + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -565,32 +660,32 @@ $LANG['en'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', 'Enter License Key' => 'Enter License Key', @@ -601,6 +696,34 @@ $LANG['en'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', ); diff --git a/web/inc/i18n/es.php b/web/inc/i18n/es.php index f15425a8..2e9f7ec9 100644 --- a/web/inc/i18n/es.php +++ b/web/inc/i18n/es.php @@ -25,6 +25,21 @@ $LANG['es'] = array( 'CRON' => 'CRON', 'BACKUP' => 'RESPALDO', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Añadir Usuario', 'Add Domain' => 'Añadir Dominio', 'Add Web Domain' => 'Añadir Web', @@ -53,7 +68,7 @@ $LANG['es'] = array( 'Save' => 'Guardar', 'Submit' => 'Confirmar', - 'toggle all' => 'seleccionar todos', + 'toggle all' => 'todos', 'apply to selected' => 'confirmar selección', 'rebuild' => 'reconstruir', 'rebuild web' => 'reconstruir web', @@ -90,8 +105,8 @@ $LANG['es'] = array( 'reread IP' => 'releer IP', 'enable autoupdate' => 'activar autoupdate', 'disable autoupdate' => 'desactivar autoupdate', - 'turn on notifications' => 'activar la notificación', - 'turn off notifications' => 'desactivar las notificaciones', + 'turn on notifications' => 'activar la notific.', + 'turn off notifications' => 'desactivar las notific.', 'Adding User' => 'Añadiendo Usuario', 'Editing User' => 'Editando Usuario', @@ -160,13 +175,14 @@ $LANG['es'] = array( 'Web Aliases' => 'Alias Web', 'per domain' => 'por dominio', 'DNS Domains' => 'Dominios DNS', - 'DNS Domains' => 'Dominios DNS', - 'DNS records' => 'Registros DNS' , + 'DNS domains' => 'Dominios DNS', + 'DNS records' => 'Registros DNS', 'Name Servers' => 'Servidor de Nombre', 'Mail Domains' => 'Dominios de Correo', 'Mail Accounts' => 'Cuentas de Correo', 'Cron Jobs' => 'Trabajos en Cron', 'SSH Access' => 'Acceso SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'Dirección IP', 'Backups' => 'Respaldos', 'Backup System' => 'Sistema de Respaldo', @@ -178,10 +194,12 @@ $LANG['es'] = array( 'Proxy Extensions' => 'Extensiones Proxy', 'Web Statistics' => 'Estadísticas Web', 'Additional FTP Account' => 'Cuenta Adicional FTP', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Expira', 'Records' => 'Registros', + 'Serial' => 'Serial', 'Catchall email' => 'Correo Catchall', 'AntiVirus Support' => 'Soporte AntiVirus', 'AntiSpam Support' => 'Soporte AntiSpam', @@ -191,6 +209,16 @@ $LANG['es'] = array( 'Autoreply' => 'Respuesta Automática', 'Forward to' => 'Reenviar a', 'Do not store forwarded mail' => 'No guarde correo reenviado', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'base de datos', 'User' => 'Usuario', 'Host' => 'Host', @@ -212,11 +240,13 @@ $LANG['es'] = array( 'Users' => 'Usuarios', 'Load Average' => 'Carga Promedio', 'Memory Usage' => 'Uso de Memoria', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'Uso de HTTPD', 'NGINX Usage' => 'Uso de NGINX', 'MySQL Usage on localhost' => 'Uso de MySQL en localhost', 'PostgreSQL Usage on localhost' => 'Uso de PostgreSQL en localhost', 'Bandwidth Usage eth0' => 'Uso de Ancho de Banda (eth0)', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'Uso de FTP', 'SSH Usage' => 'Uso de SSH', 'reverse proxy' => 'proxy inverso', @@ -229,6 +259,8 @@ $LANG['es'] = array( 'database server' => 'servidor de base de datos', 'ftp server' => 'servidor ftp', 'job scheduler' => 'planificador de trabajos', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Disco', 'Uptime' => 'Tiempo Activo', @@ -239,7 +271,6 @@ $LANG['es'] = array( 'Release' => 'Lanzamiento', 'Architecture' => 'Arquitectura', 'Object' => 'Objeto', - 'Owner' => 'Dueño', 'Username' => 'Nombre de Usuario', 'Password' => 'Contraseña', 'Email' => 'Email', @@ -333,6 +364,8 @@ $LANG['es'] = array( 'ftp user password' => 'contraseña usuario ftp', 'ftp user' => 'usuario ftp', 'Last 70 lines of %s.%s.log' => 'Últimos 70 líneas de %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Descargar AccessLog', 'Download ErrorLog' => 'Descargar ErrorLog', 'Country' => 'País', @@ -347,8 +380,26 @@ $LANG['es'] = array( 'Banlist' => 'Lista negra', 'ranges are acceptable' => 'rangos son aceptables', 'CIDR format is supported' => 'Formato CIDR se admite', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unlimited', '1 account' => '1 cuenta', '%s accounts' => '%s cuentas', @@ -364,6 +415,8 @@ $LANG['es'] = array( '%s cron jobs' => '%s trabajos en cron', '1 archive' => '1 archivo', '%s archives' => '%s archivos', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 plan', '%s packages' => '%s planes', '1 IP address' => '1 dirección IP', @@ -391,6 +444,7 @@ $LANG['es'] = array( 'PACKAGE_CREATED_OK' => 'Plan %s ha sido creado correctamente.', 'SSL_GENERATED_OK' => 'SSL certificado ha sido creado correctamente.', 'RULE_CREATED_OK' => 'Regla ha sido creado correctamente.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Autoupdate has been successfully enabled', 'Autoupdate has been successfully disabled' => 'Autoupdate has been successfully disabled', 'Cronjob email reporting has been successfully enabled' => 'Informes de correo electrónico Cronjob ha permitido correctamente.', @@ -432,21 +486,21 @@ $LANG['es'] = array( 'Passwords not match' => 'Las contraseñas no coinciden', 'Please enter valid email address.' => 'Por favor ingrese un correo válido.', 'Field "%s" can not be blank.' => 'El campo "%s" no puede estar en blanco.', - 'Password is too short.' => "La contraseña es demasiado corta (mínima es de 6 caracteres)", + 'Password is too short.' => 'La contraseña es demasiado corta (mínima es de 6 caracteres)', 'Error code:' => 'Código de Error:', 'SERVICE_ACTION_FAILED' => '"%s" "%s" fallo', 'IP address is in use' => 'La IP esta en uso', - 'BACKUP_SCHEDULED' => "La tarea se ha añadido a la cola. Usted recibirá un correo de notificación cuando el respaldo de seguridad este listo para su descarga.", - 'BACKUP_EXISTS' => "Se esta realizando una copia de seguridad en este momento.Por favor espere a que esta termine.", - 'RESTORE_SCHEDULED' => "La tarea se ha añadido a la cola. Usted recibirá un correo de notificación cuando el respaldo de seguridad este listo para su descarga.", - 'RESTORE_EXISTS' => "Una tarea se está ejecutando. Por favor espere a que esta termine.", + 'BACKUP_SCHEDULED' => 'La tarea se ha añadido a la cola. Usted recibirá un correo de notificación cuando el respaldo de seguridad este listo para su descarga.', + 'BACKUP_EXISTS' => 'Se esta realizando una copia de seguridad en este momento.Por favor espere a que esta termine.', + 'RESTORE_SCHEDULED' => 'La tarea se ha añadido a la cola. Usted recibirá un correo de notificación cuando el respaldo de seguridad este listo para su descarga.', + 'RESTORE_EXISTS' => 'Una tarea se está ejecutando. Por favor espere a que esta termine.', - 'WEB_EXCLUSIONS' => "Ingrese el nombre de dominio, uno por línea. Para excluir a todos utiliza *. Para excluir uno específico utilice el siguiente formato: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Ingrese el nombre de dominio, uno por línea. Para excluir a todos utiliza *", - 'MAIL_EXCLUSIONS' => "Ingrese el nombre del correo, uno por línea. Para excluir a todos utiliza *. Para excluir uno específico utilice el siguiente formato: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Ingrese el nombre completo de la base de datos, una por linea. Para excluir a todos utiliza *", - 'CRON_EXCLUSIONS' => "Para excluir todos los trabajos utiliza *", - 'USER_EXCLUSIONS' => "Ingrese el nombre del directorio, uno por linea. Para excluir todos los firectorios utiliza * To exlude all dirs use *", + 'WEB_EXCLUSIONS' => 'Ingrese el nombre de dominio, uno por línea. Para excluir a todos utiliza *. Para excluir uno específico utilice el siguiente formato: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Ingrese el nombre de dominio, uno por línea. Para excluir a todos utiliza *', + 'MAIL_EXCLUSIONS' => 'Ingrese el nombre del correo, uno por línea. Para excluir a todos utiliza *. Para excluir uno específico utilice el siguiente formato: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Ingrese el nombre completo de la base de datos, una por linea. Para excluir a todos utiliza *', + 'CRON_EXCLUSIONS' => 'Para excluir todos los trabajos utiliza *', + 'USER_EXCLUSIONS' => 'Ingrese el nombre del directorio, uno por linea. Para excluir todos los firectorios utiliza * To exlude all dirs use *', 'Welcome to Vesta Control Panel' => 'Bienvenido al Panel de Control Vesta', 'MAIL_FROM' => 'Panel de Control Vesta ', @@ -466,7 +520,7 @@ $LANG['es'] = array( 'Confirm Password' => 'Confirme Contraseña', 'Reset' => 'Cambiar', 'Reset Code' => 'Ingrese Código', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'El código de cambio de contraseña fue enviado a su correo
', 'MAIL_RESET_SUBJECT' => 'Cambio de Contraseña en %s', 'PASSWORD_RESET_REQUEST' => "Para cambiar su contraseña del panel, por favor siga este link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternativamente, puede dirigirse a https://%s/reset/?action=code&user=%s e ingresar el siguiente código de cambio:\n%s\n\nSi usted no ha solicitado un cambio de contraseña, por favor ignore este mensaje y acepte nuestras disculpas.\n\n--\nPanel de Control Vesta\n", @@ -488,6 +542,29 @@ $LANG['es'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Zona Horaria', 'Default Language' => 'Idioma por Defecto', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'Cuota del disco FileSystem', 'Vesta Control Panel Plugins' => 'Plugins de Vesta Control Panel', 'preview' => 'previsualizar', @@ -496,7 +573,6 @@ $LANG['es'] = array( 'Template Manager' => 'Manejador de PLantilla', 'Backup Migration Manager' => 'Manejador de Migracion de Respaldos', 'FileManager' => 'Manejador de Archivos', - 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', 'sort by' => 'ordenar por', @@ -504,8 +580,8 @@ $LANG['es'] = array( 'Starred' => 'Favorito', 'Name' => 'Nombre', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -515,10 +591,13 @@ $LANG['es'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -533,12 +612,20 @@ $LANG['es'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -547,7 +634,17 @@ $LANG['es'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -563,31 +660,31 @@ $LANG['es'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -599,6 +696,34 @@ $LANG['es'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/fa.php b/web/inc/i18n/fa.php new file mode 100644 index 00000000..9911a601 --- /dev/null +++ b/web/inc/i18n/fa.php @@ -0,0 +1,734 @@ + 'بسته ها', + 'IP' => 'آي پي', + 'Graphs' => 'نمودار ها', + 'Statistics' => 'آمار', + 'Log' => 'گزارش', + 'Server' => 'سرور', + 'Services' => 'خدمات', + 'Firewall' => 'ديوار آتشين', + 'Updates' => 'بروز رساني ها', + 'Log in' => 'ورود', + 'Log out' => 'خروج', + + 'USER' => 'كاربر', + 'WEB' => 'وب', + 'DNS' => 'نام سرور', + 'MAIL' => 'ايميل', + 'DB' => 'پايگاه داده', + 'CRON' => 'خودكار', + 'BACKUP' => 'پشتيبان', + + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + + 'Add User' => 'افزودن كاربر', + 'Add Domain' => 'افزودن دامنه', + 'Add Web Domain' => 'افزودن دامنه وب', + 'Add DNS Domain' => 'افزودن DNS دامنه', + 'Add DNS Record' => 'افزودن ركورد DNS', + 'Add Mail Domain' => 'افزودن ايميل دامنه', + 'Add Mail Account' => 'افزودن حساب ايميل', + 'Add Database' => 'افزودن پايگاه داده', + 'Add Cron Job' => 'افزودن عمل خودكار', + 'Create Backup' => 'ايجاد پشتيبان', + 'Configure' => 'پیکربندی', + 'Restore All' => 'بازيابي همه', + 'Add Package' => 'افزودن بسته', + 'Add IP' => 'افزودن آدرس آي پي', + 'Add Rule' => 'افزودن قانون', + 'Ban IP Address' => 'مسدود كردن آدرس آي پي', + 'Search' => 'جستجو', + 'Add one more FTP Account' => 'افزودن يك حساب FTP ديگر', + 'Overall Statistics' => 'آمار كلي', + 'Daily' => 'روزانه', + 'Weekly' => 'هفتگي', + 'Monthly' => 'ماهانه', + 'Yearly' => 'ساليانه', + 'Add' => 'افزودن', + 'Back' => 'بازگشت', + 'Save' => 'ذخيره', + 'Submit' => 'اعمال', + + 'toggle all' => 'دربرگيري همه', + 'apply to selected' => 'افزودن به موارد انتخاب شده', + 'rebuild' => 'بازسازي', + 'rebuild web' => 'بازسازي وب', + 'rebuild dns' => 'بازسازي dns', + 'rebuild mail' => 'بازسازي اي ميل', + 'rebuild db' => 'بازسازي پايگاه داده', + 'rebuild cron' => 'بازسازي كارهاي خودكار', + 'update counters' => 'بروزرساني شمارنده ها', + 'suspend' => 'تعليق', + 'unsuspend' => 'آزاد سازي', + 'delete' => 'حذف', + 'show per user' => 'نمايش هر كاربر', + 'login as' => 'ورود بجاي', + 'logout' => 'خروج', + 'edit' => 'ويرايش', + 'open webstats' => 'بازكردن وضعيت وب', + 'view logs' => 'مشاهده وقايع', + 'list records' => 'فهرست ركوردهاي %s', + 'add record' => 'افزودن ركورد', + 'list accounts' => 'فهرست حسابهاي %s', + 'add account' => 'افزودن حساب', + 'open webmail' => 'بازگردن وب ميل', + 'list fail2ban' => 'فهرست fail2ban', + 'open %s' => 'بازگشايي %s', + 'download' => 'بارگيري', + 'restore' => 'بازيابي', + 'configure restore settings' => 'پيكربندي تنظيمات بازيابي', + 'stop' => 'پايان', + 'start' => 'آغاز', + 'restart' => 'آغاز دوباره', + 'update' => 'بروزرساني', + 'generate' => 'ايجاد', + 'Generate CSR' => 'ايجاد CSR', + 'reread IP' => 'بازخواني IP', + 'enable autoupdate' => 'فعال كردن بروزرساني خودكار', + 'disable autoupdate' => 'غير فعال كردن بروزرساني خودكار', + 'turn on notifications' => 'نمايش اعلان ها', + 'turn off notifications' => 'مخفي سازي اعلان ها', + + 'Adding User' => 'افزودن كاربر', + 'Editing User' => 'ويرايش كاربر', + 'Adding Domain' => 'افزودندامنه', + 'Editing Domain' => 'ويرايش دامنه', + 'Adding DNS Domain' => 'افزودن DNS دامنه', + 'Editing DNS Domain' => 'ويرايش DNS دامنه', + 'Adding DNS Record' => 'افزودن ركورد DNS', + 'Editing DNS Record' => 'ويرايش ركورد DNS', + 'Adding Mail Domain' => 'افزودن دامنه ايميل', + 'Editing Mail Domain' => 'ويرايش دامنه ايميل', + 'Adding Mail Account' => 'افزودن حساب ايميل', + 'Editing Mail Account' => 'ويرايش حساب ايميل', + 'Adding database' => 'افزودن پايگاه داده', + 'Editing Cron Job' => 'ويرايش عمل خودكار', + 'Adding Cron Job' => 'افزودن عمل خودكار', + 'Editing Database' => 'ويرايش پايگاه داده', + 'Adding Package' => 'افزودن بسته', + 'Editing Package' => 'ويرايش بسته', + 'Adding IP address' => 'افزودن آدرس آي پي', + 'Editing IP Address' => 'ويرايش آدرس آي پي', + 'Editing Backup Exclusions' => 'ويرايش استتثناء هاي پشتيبان گيري', + 'Generating CSR' => 'ايجاد CSR', + 'Listing' => 'فهرست كردن', + 'Search Results' => 'Sنتايج جستجو', + 'Adding Firewall Rule' => 'افزودن قانون ديواره آتشين', + 'Editing Firewall Rule' => 'ويرايش قانون ديوارآتشين', + 'Adding IP Address to Banlist' => 'افزودن آدرس آي پي به فهرست مسدود شدگان', + + 'active' => 'فعال', + 'spnd' => 'معلق', + 'suspended' => 'معلق گرديد', + 'running' => 'درحال اجرا', + 'stopped' => 'متوقف', + 'outdated' => 'منسوخ', + 'updated' => 'به روز', + + 'yes' => 'بله', + 'no' => 'خير', + 'none' => 'هيچ يك', + 'pb' => 'پ.ب', + 'tb' => 'ت.ب', + 'gb' => 'گ.ب', + 'mb' => 'م.ب', + 'minute' => 'دقيقه', + 'hour' => 'ساعت', + 'day' => 'روز', + 'days' => 'روز', + 'hours' => 'ساعت', + 'minutes' => 'دقيقه', + 'month' => 'ماه', + 'package' => 'بسته', + 'Bandwidth' => 'پهناي باند', + 'Disk' => 'ديسك', + 'Web' => 'وب', + 'Mail' => 'ميل', + 'Databases' => 'پايگاه داده', + 'User Directories' => 'پوشه هاي كاربر', + 'Template' => 'قالب', + 'Web Template' => 'قالب وب', + 'Backend Template' => 'قالب نهايي', + 'Proxy Template' =>'قالب پراكسي', + 'DNS Template' => 'قالب DNS', + 'Web Domains' => 'دامنه هاي وب', + 'SSL Domains' => 'دامنه هاي SSL', + 'Web Aliases' => 'نامهاي مستعار وب', + 'per domain' => 'پيش دامنه', + 'DNS Domains' => 'دامنه هاي DNS', + 'DNS domains' => 'دامنه هاي DNS', + 'DNS records' => 'پيشينه هاي DNS', + 'Name Servers' => 'نامهاي سرور', + 'Mail Domains' => 'دامنه هاي ايميل', + 'Mail Accounts' => 'حساب هاي ايميل', + 'Cron Jobs' => 'كارهاي خودكار', + 'SSH Access' => 'دسترسي هاي SSH', + 'IP Address' => 'IP Address', + 'IP Addresses' => 'آدرس هاي آی پی', + 'Backups' => 'پشتيبان ها', + 'Backup System' => 'سيستم پشتيبان', + 'backup exclusions' => 'استثنا هاي پشتيبان', + 'template' => 'قالب', + 'SSL Support' => 'پشتیبانی SSL', + 'SSL Home Directory' => 'خانه SSL', + 'Proxy Support' => 'پشتیبانی Proxy', + 'Proxy Extensions' => 'فرمت های Proxy', + 'Web Statistics' => 'آمار هاي وب', + 'Additional FTP Account' => 'FTP اضافه', + 'Path' => 'Path', + 'SOA' => 'SOA', + 'TTL' => 'زمان زنده بودن', + 'Expire' => 'سپري شدن', + 'Records' => 'پيشسنه ها', + 'Serial' => 'Serial', + 'Catchall email' => 'دريافت همه ايميل ها', + 'AntiVirus Support' => 'پشتیبانی ضد ويروس', + 'AntiSpam Support' => 'پشتیبانی ضد هرزنامه', + 'DKIM Support' => 'پشتیبانی DKIM', + 'Accounts' => 'حساب ها', + 'Quota' => 'سهميه', + 'Autoreply' => 'پاسخگويي خودكار', + 'Forward to' => 'ارسال به', + 'Do not store forwarded mail' => 'ذخيره نكردن ايميل هدايت شونده', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', + 'database' => 'پايگاه داده', + 'User' => 'كاربر', + 'Host' => 'ميزبان', + 'Charset' => 'مجموعه نویسه', + 'Min' => 'دقيقه', + 'Hour' => 'ساعت', + 'Day' => 'روز', + 'Month' => 'ماه', + 'Day of week' => 'روز هفته', + 'local' => 'محلي', + 'Run Time' => 'زمان اجرا', + 'Backup Size' => 'اندازه پشتيبان', + 'SYS' => 'سيستم', + 'Domains' => 'دامنه ها', + 'Status' => 'وضعيت', + 'shared' => 'مشترك', + 'dedicated' => 'اختصاصي', + 'Owner' => 'مالك', + 'Users' => 'كاربران', + 'Load Average' => 'ميانگين بارگزاري', + 'Memory Usage' => 'مصرف حافظه', + 'APACHE2 Usage' => 'APACHE2 Usage', + 'HTTPD Usage' => 'مصرف HTTPD', + 'NGINX Usage' => 'مصرف NGINX', + 'MySQL Usage on localhost' => 'مصرف MySQL در localhost', + 'PostgreSQL Usage on localhost' => 'مصرف PostgreSQL در localhost', + 'Bandwidth Usage eth0' => 'پهناي باند مصرفي eth0', + 'Exim Usage' => 'مصرف Exim', + 'FTP Usage' => 'مصرف FTP', + 'SSH Usage' => 'مصرف SSH', + 'reverse proxy' => 'پروکسی معکوس', + 'web server' => 'وب سرور', + 'dns server' => 'DNS سرور', + 'mail server' => 'ميل سرور', + 'pop/imap server' => 'سرور pop/imap', + 'email antivirus' => 'ضد ويروس ايميل', + 'email antispam' => 'ضد هرزنامه ايميل', + 'database server' => 'سرور پايگاه داده', + 'ftp server' => 'سرور FTP', + 'job scheduler' => 'زمان‌بندی كار', + 'firewall' => 'ديوار آتشين', + 'brute-force monitor' => 'مانيتور بروت فورس', + 'CPU' => 'پردازنده', + 'Memory' => 'حافظه', + 'Uptime' => 'زمان كاركرد', + 'core package' => 'بسته هسته', + 'php interpreter' => 'مترجم پي اچ پي', + 'internal web server' => 'وب سرور داخلي', + 'Version' => 'نسخه', + 'Release' => 'انتشار', + 'Architecture' => 'معماري', + 'Object' => 'شيء', + 'Username' => 'نام كاربري', + 'Password' => 'گذرواژه', + 'Email' => 'ايميل', + 'Package' => 'بسته', + 'Language' => 'زبان', + 'First Name' => 'نام', + 'Last Name' => 'نام خانوادگي', + 'Send login credentials to email address' => 'ارسال اطلاعات ورودی به آدرس ایمیل', + 'Default Template' => 'قالب پيش فرض', + 'Default Name Servers' => 'نام سرور پيش فرض', + 'Domain' => 'دامنه', + 'DNS Support' => 'پشتیبانی DNS', + 'Mail Support' => 'پشتیبانی ایمیل', + 'Advanced options' => 'گزینه های پیشرفته', + 'Aliases' => 'نام مستعار', + 'SSL Certificate' => 'گواهینامه SSL', + 'SSL Key' => 'کلید SSL', + 'SSL Certificate Authority / Intermediate' => 'صادركننده /واسط SSL', + 'SSL CSR' => 'SSL CSR', + 'optional' => 'دلخواه', + 'internal' => 'داخلی', + 'Statistics Authorization' => 'آمارهای اعتبار', + 'Statistics Auth' => 'آمار اعتبار', + 'Account' => 'حساب', + 'Prefix will be automaticaly added to username' => 'پيشوند %s خودكار به نام كاربري اضافه خواهد شد.', + 'Send FTP credentials to email' => 'ارسال اطلاعات FTP به ايميل', + 'Expiration Date' => 'زمان پايان', + 'YYYY-MM-DD' => 'سال-ماه-روز', + 'Name servers' => 'سرور نام ها', + 'Record' => 'پيشينه', + 'IP or Value' => 'آي پي يا مقدار', + 'Priority' => 'اولويت', + 'Record Number' => 'شماره پيشينه', + 'in megabytes' => 'به مگابايت', + 'Message' => 'پيام', + 'use local-part' => 'استفاده از اجزا دروني', + 'one or more email addresses' => 'یک یا چند آدرس ایمیل', + 'Prefix will be automaticaly added to database name and database user' => 'پیشوند %s خودکار به نام و حساب پایگاه داده افزوده خواهد شد.', + 'Database' => 'پایگاه داده', + 'Type' => 'نوع', + 'Minute' => 'دقیقه', + 'Command' => 'دستور', + 'Package Name' => 'نام بسته', + 'Netmask' => 'پوشش شبكه (نت ماسك)', + 'Interface' => 'رابط', + 'Shared' => 'اشتراكي', + 'Assigned user' => 'کاربر اختصاص داده شده', + 'Assigned domain' => 'دامنه اختصاص داده شده', + 'NAT IP association' => 'تجمع NAT IP', + 'shell' => 'پوسته', + 'web domains' => 'دامنه هاي وب', + 'web aliases' => 'نام مستعارهاي وب', + 'dns records' => 'پيشينه هاي DNS', + 'mail domains' => 'دامنه هاي ايميل', + 'mail accounts' => 'حسابهاي ايميل', + 'accounts' => 'حساب', + 'databases' => 'پایگاه های داده', + 'cron jobs' => 'كارهاي خودكار', + 'backups' => 'پشتيبان ها', + 'quota' => 'سهميه بندي', + 'day of week' => 'روز هفته', + 'cmd' => 'دستور', + 'users' => 'کاربران', + 'domains' => 'دامنه ها', + 'aliases' => 'نام مستعار', + 'records' => 'پیشینه', + 'jobs' => 'كار', + 'username' => 'نام کاربری', + 'password' => 'گذرواژه', + 'type' => 'نوع', + 'charset' => 'مجموعه نویسه', + 'domain' => 'دامنه', + 'ip' => 'آي پي', + 'ip address' => 'آدرس های آی پی', + 'IP address' => 'آدرس آی پی', + 'netmask' => 'نت ماسك', + 'interface' => 'رابط', + 'assigned user' => 'کاربراختصاص یافته', + 'ns1' => 'نام سرور 1', + 'ns2' => 'نام سرور 2', + 'user' => 'کاربر', + 'email' => 'ایمیل', + 'first name' => 'نام', + 'last name' => 'نام خانوادگی', + 'account' => 'حساب', + 'ssl certificate' => 'گواهينامه ssl', + 'ssl key' => 'كليد ssl', + 'stats user password' => 'آمار گذرواژه كاربر', + 'stats username' => 'آمار نام كاربري', + 'stats password' => 'آمار گذرواژه', + 'ftp user password' => 'گذرواژه FTP كاربر', + 'ftp user' => 'نام كاربري FTP', + 'Last 70 lines of %s.%s.log' => 'Last 70 lines of %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', + 'Download AccessLog' => 'دريافت گزارش دسترسي', + 'Download ErrorLog' => 'دريافت گزارش خطا', + 'Country' => 'کشور', + '2 letter code' => 'کد دو رقمی', + 'State / Province' => 'استان / ولايت', + 'City / Locality' => 'شهر / محله', + 'Organization' => 'سازمان', + 'Action' => 'عمل', + 'Protocol' => 'پرتکل', + 'Port' => 'پرت', + 'Comment' => 'یادداشت', + 'Banlist' => 'فهرست مسدودشدگان', + 'ranges are acceptable' => 'بازه ها قابل قبول هستند', + 'CIDR format is supported' => 'شکل CIDR پشتیبانی می شود', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', + 'Add one more Name Server' => 'افزودن یک نام سرور دیگر', + + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + + 'unlimited' => 'نامحدود', + '1 account' => 'یک حساب', + '%s accounts' => 'حساب %s', + '1 domain' => 'یک دامنه', + '%s domains' => 'دامنه %s', + '1 record' => 'یک پیشینه', + '%s records' => '%s پيشينه', + '1 mail account' => '1 حساب ايميل', + '%s mail accounts' => '%s حساب ايميل', + '1 database' => '1 پايگاه داده', + '%s databases' => '%s پايگاه داده', + '1 cron job' => '1 كار خودكار', + '%s cron jobs' => '%s كار خودكار', + '1 archive' => '1 بايگاني', + '%s archives' => '%s بايگاني', + '1 item' => '1 item', + '%s items' => '%s items', + '1 package' => '1 بسته', + '%s packages' => '%s بسته', + '1 IP address' => '1 آدرس IP', + '%s IP addresses' => '%s آدرس IP', + '1 month' => '1 ماه', + '%s months' => '%s ماه', + '1 log record' => '1 كرود وقايع', + '%s log records' => '%s ركورد وقايع', + '1 object' => 'یک شیء', + '%s objects' => '%s شيء', + 'no exclusions' => 'بدون استثنا', + '1 rule' => '1 قانون', + '%s rules' => '%s قانون', + 'There are no currently banned IP' => 'هم اكنون IP مسدود شده اي وجود ندارد.', + + 'USER_CREATED_OK' => 'كاربر %s با موفقيت ايجاد شد.', + 'WEB_DOMAIN_CREATED_OK' => 'دامنه %s با موفقيت ايجاد شد.', + 'DNS_DOMAIN_CREATED_OK' => 'دامنه DNS %s با موفقيت ايجاد شد.', + 'DNS_RECORD_CREATED_OK' => 'پیشینه %s.%s با موفقيت ايجاد شد.', + 'MAIL_DOMAIN_CREATED_OK' => 'دامنه ایمیل %s با موفقيت ايجاد شد.', + 'MAIL_ACCOUNT_CREATED_OK' => 'حساب ایمیل %s@%s با موفقيت ايجاد شد.', + 'DATABASE_CREATED_OK' => 'پايگاه داده %s با موفقيت ايجاد شد.', + 'CRON_CREATED_OK' => 'كار خودكار با موفقيت ايجاد شد.', + 'IP_CREATED_OK' => 'آدرس آی پی %s با موفقيت ايجاد شد.', + 'PACKAGE_CREATED_OK' => 'بسته %s با موفقيت ايجاد شد.', + 'SSL_GENERATED_OK' => 'گواهی با موفقیت تولید شد.', + 'RULE_CREATED_OK' => 'قانون با موفقيت ايجاد شد.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text + 'Autoupdate has been successfully enabled' => 'بروزرسانی خودکار با موقیت فعال گردید.', + 'Autoupdate has been successfully disabled' => 'بروزرسانی خودکار با موقیت غیرفعال گردید.', + 'Cronjob email reporting has been successfully enabled' => 'گزارش ايميلي كار هاي خودكار با موفقيت فعال گرديد.', + 'Cronjob email reporting has been successfully disabled' => 'گزارش ايميلي كار هاي خودكار با موفقيت غيرفعال گرديد.', + 'Changes has been saved.' => 'تغییرات با موفقیت ذخیره گردید.', + 'Confirmation' => 'تایید کردن', + 'DELETE_USER_CONFIRMATION' => 'آیا از حذف کاربر %s اطمینان دارید؟', + 'SUSPEND_USER_CONFIRMATION' => 'آیا از تعلیق کاربر %s اطمینان دارید؟', + 'UNSUSPEND_USER_CONFIRMATION' => 'آیا از آزاد سازی کاربر %s اطمینان دارید؟', + 'DELETE_DOMAIN_CONFIRMATION' => 'آیا از حذف دامنه %s اطمینان دارید؟', + 'SUSPEND_DOMAIN_CONFIRMATION' => 'آیا از تعلیق دامنه %s اطمینان دارید؟', + 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'آیا از آزاد سازی دامنه %s اطمینان دارید؟', + 'DELETE_RECORD_CONFIRMATION' => 'آیا از حذف پیشینه %s اطمینان دارید؟', + 'SUSPEND_RECORD_CONFIRMATION' => 'آیا از تعلیق پیشینه %s اطمینان دارید؟', + 'UNSUSPEND_RECORD_CONFIRMATION' => 'آیا از آزاد سازی پیشینه %s اطمینان دارید؟', + 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'آیا از حذف %s اطمینان دارید؟', + 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'آیا از تعلیق %s اطمینان دارید؟', + 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'آیا از آزاد سازی %s اطمینان دارید؟', + 'DELETE_DATABASE_CONFIRMATION' => 'آیا از حذف پايگاه داده %s اطمینان دارید؟', + 'SUSPEND_DATABASE_CONFIRMATION' => 'آیا از تعليق پایگاه داده %s اطمینان دارید؟', + 'UNSUSPEND_DATABASE_CONFIRMATION' => 'آیا از آزاد سازی پایگاه داده %s اطمینان دارید؟', + 'DELETE_CRON_CONFIRMATION' => 'آيا از خذف كار خودكار اطمينان داريد؟', + 'SUSPEND_CRON_CONFIRMATION' => 'آيا از تعليق كار خودكار اطمینان داريد؟', + 'UNSUSPEND_CRON_CONFIRMATION' => 'آيا از آزاد سازي كار خودكار اطمينان داريد؟', + 'DELETE_BACKUP_CONFIRMATION' => 'آيا از حذف پشتيبان %s اطمينان داريد؟', + 'DELETE_EXCLUSION_CONFIRMATION' => 'آيا از حذف استثناء %s اطمينان داريد؟', + 'DELETE_PACKAGE_CONFIRMATION' => 'آيا از خذف بسته %s اطمينان داريد؟', + 'DELETE_IP_CONFIRMATION' => 'آيا از حذف آدرس آي پي %s اطمينان داريد؟', + 'DELETE_RULE_CONFIRMATION' => 'آيا از حذف قانون #%s اطمينان داريد؟', + 'SUSPEND_RULE_CONFIRMATION' => 'آيا از تعليق قانون #%s اطمينان داريد؟', + 'UNSUSPEND_RULE_CONFIRMATION' => 'آيا از آزاد سازي قانون #%s اطمينان داريد؟', + 'LEAVE_PAGE_CONFIRMATION' => 'خروج از صفحه؟', + 'RESTART_CONFIRMATION' => 'آيا از راه اندازي دوباره %s اطمينان داريد؟', + 'Welcome' => 'خوش آمدید', + 'LOGGED_IN_AS' => 'وارد شده با نام کاربری %s', + 'Error' => 'خطا', + 'Invalid username or password' => 'نام کاربری یا گذرواژه معتبر نیست.', + 'Invalid username or code' => 'نام کاربری یا رمز معتبر نیست.', + 'Passwords not match' => 'گذرواژه مطابقت ندارد.', + 'Please enter valid email address.' => 'لطفا آدرس ایمیل معتبری وارد نمایید.', + 'Field "%s" can not be blank.' => 'قسمت "%s" نمی تواند خالی باشد', + 'Password is too short.' => 'گذرواژه بسیار کوتاه است (حداقل 6 حرف).', + 'Error code:' => 'کد خطای: %s', + 'SERVICE_ACTION_FAILED' => '"%s" "%s" بی نتیجه ماند', + 'IP address is in use' => 'آدرس آی پی در حال استفاده است.', + 'BACKUP_SCHEDULED' => 'كار به صف انجام افزوده شد.هنگامي كه نسخه پشتيبان براي بارگيري آماده گردد، با ايميل به اطلاع شما خواهد رسيد.', + 'BACKUP_EXISTS' => 'يك پشتيبان گيري در حال اجراست.لطفا تا پايان آن پشتيبان گيري تامل فرماييد.', + 'RESTORE_SCHEDULED' => 'كار به صف انجام افزوده شد. هنگامي كه بازيابي كامل گردد، با ايميل به اطلاع شما خواهد رسيد.', + 'RESTORE_EXISTS' => 'يك بازيابي در حال اجراست.لطفا تا پايان آن بازگرداني تامل فرماييد.', + + 'WEB_EXCLUSIONS' => 'نام هر دامنه را در خطي جداگانه بنويسيد.براي دربرگيري همه نام دامنه ها از * استفاده كنيد. براي دربرگيري پوشه هاي خاص به شكل مقابل عمل كنيد : domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'نام هر دامنه را در خطي جداگانه بنويسيد.براي دربرگيري همه نام دامنه ها از * استفاده كنيد.', + 'MAIL_EXCLUSIONS' => 'نام هر دامنه را در خطي جداگانه بنويسيد. براي دربرگيري همه نام دامنه ها از * استفاده كنيد. براي دربرگيري يك نام دامنه خاص به شكل مقابل عمل كنيد : domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'نام كامل پايگاه داده را در خطي جداگانه بنويسيد.براي دربرگيري تمامي پايگاه هاي داده از * استفاده كنيد.', + 'CRON_EXCLUSIONS' => 'براي دربرگيري تمامي كار ها از * استفاده كنيد', + 'USER_EXCLUSIONS' => 'نام هر پوشه را در خطي جداگانه بنويسيد.براي دربرگيري تمام پوشه ها از * استفاده كنيد.', + + 'Welcome to Vesta Control Panel' => 'به وستا کنترل پنل خوش آمدید', + 'MAIL_FROM' => 'كنترل پنل وستا ', + 'GREETINGS_GORDON_FREEMAN' => "درود, %s %s,\n", + 'GREETINGS' => "درود,\n", + 'ACCOUNT_READY' => "حساب شما ايجاد شد و براي استفاده آماده است.\n\nhttps://%s/login/\nنام كاربري : %s\nگذرواژه : %s\n\n--\nكنترل پنل وستا\n", + + 'FTP login credentials' => 'اطلاعات ورود به FTP', + 'FTP_ACCOUNT_READY' => "حساب FTP ساخته شد و براي استفاده آماده است.\n\nنام ميزبان : %s\nنام كاربري : %s_%s\nگذرواژه : %s\n\n--\nكنترل پنل وستا\n", + + 'Database Credentials' => 'اطلاعات پايگاه داده', + 'DATABASE_READY' => "پايگاه داده با موفقيت ايجاد شد.\n\nDپايگاه داده : %s\nنام كاربري : %s\nگذرواژه : %s\n%s\n\n--\nكنترل پنل وستا\n", + + 'forgot password' => 'گذرواژه تان را فراموش كرده ايد؟', + 'Confirm' => 'تاييد', + 'New Password' => 'گذرواژه تازه', + 'Confirm Password' => 'تاييد گذرواژه', + 'Reset' => 'بازيابي', + 'Reset Code' => 'رمز بازيابي', + 'RESET_NOTICE' => '', // should we add something here? + 'RESET_CODE_SENT' => 'رمز بازیابی گذرواژه به ایملتان ارسال گردید.
', + 'MAIL_RESET_SUBJECT' => 'بازیابی گذرواژه در %s', + 'PASSWORD_RESET_REQUEST' => "براي بازيابي گذرواژه كنترل پنلتان, لطفا از اين راهنما :\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nاستفاده كنيد ويا از طريق, اين پيوند https://%s/reset/?action=code&user=%s با وارد كردن دستور:\n%s گذرواژه خود را بازيابي كنيد.\n\nدرصورتي كه شما درخواستبازيابي گذروایه نداده ايد، اين پيغام را ناديده بگيريد و عذر خواهي ما را پزيرا باشيد.\n\n--\nكنترل پنل وستا\n", + + 'Jan' => 'ژانويه', + 'Feb' => 'فوريه', + 'Mar' => 'مارس', + 'Apr' => 'آوريل', + 'May' => 'مه', + 'Jun' => 'ژون', + 'Jul' => 'جولاي', + 'Aug' => 'آگوست', + 'Sep' => 'سپتامبر', + 'Oct' => 'اكتبر', + 'Nov' => 'نوامبر', + 'Dec' => 'دسامبر', + + 'Configuring Server' => 'پیکربندی سرور', + 'Hostname' => 'نام میزبان', + 'Time Zone' => 'زمان منطقه ای', + 'Default Language' => 'زبان پیشفرض', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => 'سهميه فايل سيستم ديسك ', + 'Vesta Control Panel Plugins' => 'افزونه هاي كنترل پنل وستا', + 'preview' => 'پیش نمایش', + 'Reseller Role' => 'نقش فروشنده', + 'Web Config Editor' => 'ويرايشگر پيكربندي وب', + 'Template Manager' => 'مدیریت قالب', + 'Backup Migration Manager' => 'مديريت انتقال پشتيبان', + 'FileManager' => 'مدیریت پرونده', + 'show: CPU / MEM / NET / DISK' => 'نمايش: شبكه / حاقظه / پردازنده / ديسك', + + 'sort by' => 'sort by', // please make it as short as "sort by" 'مرتب سازی بر اساس', + 'Date' => 'تاریخ', + 'Starred' => 'ستاره دار', + 'Name' => 'نام', + + + 'File Manager' => 'مدیریت پرونده', + 'size' => 'اندازه', + 'date' => 'زمان', + 'name' => 'نام', + 'Initializing' => 'مقدار دهی اولیه', + 'UPLOAD' => 'بارگذاری', + 'NEW FILE' => 'پرونده تازه', + 'NEW DIR' => 'پوشه تازه', + 'DELETE' => 'حذف', + 'RENAME' => 'تغییر نام', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', + 'COPY' => 'رونوشت', + 'ARCHIVE' => 'بايگاني', + 'EXTRACT' => 'بيرون كشيدن', + 'DOWNLOAD' => 'بارگیری', + 'Are you sure?' => 'Are you sure?', // unused? + 'Hit' => 'اصابت', + 'to reload the page' => 'براي بارگذاری تازه صفحه', + 'Directory name cannot be empty' => 'نام پوشه نميتواند خالي باشد', + 'File name cannot be empty' => 'نام پرونده نميتواند خالي باشد', + 'No file selected' => 'پرونده اي انتخاب نشده', + 'No file or folder selected' => 'پرونده يا پوشه اي انتخاب نگرديده', + 'File type not supported' => 'نوع فایل پشتیبانی نمی گردد', + 'Directory download not available in current version' => 'بارگيري پوشه در اين نسخه پشتيباني نمي گردد', + 'Directory not available' => 'پوشه در دسترس نيست', + 'Done' => 'انجام شده', + 'Close' => 'بستن', + 'Copy' => 'كپي', + 'Cancel' => 'لغو', + 'Rename' => 'تغيير نام', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', + 'Delete' => 'حذف', + 'Extract' => 'بیرون کشیدن', + 'Create' => 'ايجاد', + 'Compress' => 'فشرده سازي', + 'OK' => 'تاييد', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', + 'Are you sure you want to copy' => 'آيا از كپي كردن اطمينان داريد؟', + 'Are you sure you want to move' => 'Are you sure you want to move', + 'Are you sure you want to delete' => 'آيا از حذف اطمينان داريد؟', + 'into' => 'به', + 'existing files will be replaced' => 'پرونده های موجود جایگزین خواهد شد', + 'Original name' => 'نام اصلی', + 'File' => 'پرونده', + 'already exists' => 'از پیش وجود دارد', + 'Create file' => 'ایجاد پرونده', + 'Create directory' => 'ایجاد پوشه', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + + 'Shortcuts' => 'Shortcuts', + 'Add New object' => 'افزودن شیء تازه', + 'Save Form' => 'ذخیره فرم', + 'Cancel saving form' => 'انصراف از ذخیره فرم', + 'Go to USER list' => 'رفتن به فهرست کاربران', + 'Go to WEB list' => 'رفتن به فهرست وب', + 'Go to DNS list' => 'رفتن به فهرست DNS', + 'Go to MAIL list' => 'رفتن به فهرست امییل', + 'Go to DB list' => 'رفتن به فهرست پایگاه داده', + 'Go to CRON list' => 'رفتن به فهرست کارهای خودکار', + 'Go to BACKUP list' => 'رفتن به فهرست پشتیبانی', + 'Focus on search' => 'تمرکز بر جستجو', + 'Display/Close shortcuts' => 'نمایش/بستن میان بر ها', + 'Move backward through top menu' => 'حرکت رو به عقب از طریق منوی بالای صفحه', + 'Move forward through top menu' => 'حرکت به جلو از طریق منوی بالای صفحه', + 'Enter focused element' => 'ورود به مورد انتخاب شده', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', + + 'Upload' => 'بارگذاری', + 'New File' => 'پرونده تازه', + 'New Folder' => 'پوشه تازه', + 'Download' => 'بارگيري', + 'Archive' => 'بايگاني', + 'Save File (in text editor)' => 'ذخیره پرونده (در ویرایشگر متنی).', + 'Close Popup / Cancel' => 'بستن پنجره / لغو', + 'Move Cursor Up' => 'انتقال به بالاي مكان نما', + 'Move Cursor Down' => 'انتقال به پايين مكان نما', + 'Switch to Left Tab' => 'رفتن به سربرگ چب', + 'Switch to Right Tab' => 'رفتن به سربرگ راست', + 'Switch Tab' => 'تغير سربرگ', + 'Go to the Top of the File List' => 'رفتن به ابتداي فهرست پرونده ها', + 'Go to the Last File' => 'رفتن به آخرين پرونده', + 'Open File / Enter Directory' => 'بازگردن پرونده/ورود به پوشه', + 'Edit File' => 'Edit File', + 'Go to Parent Directory' => 'رفتن به پوشه بالايي', + 'Select Current File' => 'انتخاب فايل جاري', + 'Select Bunch of Files' => 'انتخاب دسته اي پرونده ها', + 'Add File to the Current Selection' => 'افزودن پرونده به قسمت انتخابي كنوني', + 'Select All Files' => 'انتخاب تمامي پرونده ها', + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'ميانبرها الهام گرفته از Midnight Commander مديريت فايل باشكوه GNU است.', + + 'Licence Key' => 'كليد مجوز', + 'Enter License Key' => 'كليد مجوز را وارد كنيد', + 'Buy Licence' => 'خريد مجوز', + 'Buy Lifetime License' => 'خريد مجوز هميشگي', + 'Disable and Cancel Licence' => 'غيرفعال كردن و انصراف مجوز', + 'Licence Activated' => 'مجوز فعال گرديد', + 'Licence Deactivated' => 'مجوز غيرفعال گرديد', + 'Restrict users so that they cannot use SSH and access only their home directory.' => 'محدود كردن كاربران كه نتوانند از SSH استفاده كنند و فقط به پوشه خانگي دسترسي داشته باشند.', + 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'مرور، كپي، ويرايش، نمايش، و بازيابي تمامي ژرونده هاي دامنه شما با يك مديريت كننده برجسته فايل.', + 'This is a commercial module, you would need to purchace license key to enable it.' => 'اين ماژول تجاريست, شما بايد كليد مجوز براي فعال سازي سفارش دهيد.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + + +// Texts below doesn't exist in en.php + '70 خط اخر %s.%s.log' => 'هفتاد خط انتهايي از %s.%s.log', +); diff --git a/web/inc/i18n/fi.php b/web/inc/i18n/fi.php index 75259aed..5a16feca 100644 --- a/web/inc/i18n/fi.php +++ b/web/inc/i18n/fi.php @@ -26,6 +26,21 @@ $LANG['fi'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Lisää käyttäjä', 'Add Domain' => 'Lisää domaini', 'Add Web Domain' => 'Lisää Web domain', @@ -42,8 +57,8 @@ $LANG['fi'] = array( 'Add IP' => 'Lisää IP', 'Add Rule' => 'Lisää sääntö', 'Ban IP Address' => 'Estä IP', - 'Add one more FTP Account' => 'Lisää vielä yhden FTP käyttäjä', 'Search' => 'Haku', + 'Add one more FTP Account' => 'Lisää vielä yhden FTP käyttäjä', 'Overall Statistics' => 'Kokonaistilastot', 'Daily' => 'Päivä', 'Weekly' => 'Viikko', @@ -133,10 +148,10 @@ $LANG['fi'] = array( 'yes' => 'kyllä', 'no' => 'ei', 'none' => 'ei mitään', - 'pb' => 'pb', //petatavu - 'tb' => 'tb', //teratavu - 'gb' => 'gb', //gigatavu - 'mb' => 'mb', //megatavu + 'pb' => 'pb', //petatavu + 'tb' => 'tb', //teratavu + 'gb' => 'gb', //gigatavu + 'mb' => 'mb', //megatavu 'minute' => 'minuutti', 'hour' => 'tunti', 'day' => 'päivä', @@ -145,8 +160,6 @@ $LANG['fi'] = array( 'minutes' => 'minuuttia', 'month' => 'kuukautta', 'package' => 'paketti', - 'traffic' => 'tiedonsiirto', - 'disk' => 'levytila', 'Bandwidth' => 'Kaistanleveys', 'Disk' => 'Levy', 'Web' => 'Web', @@ -163,12 +176,14 @@ $LANG['fi'] = array( 'Web Aliases' => 'Web-aliakset', 'per domain' => 'per domaini', 'DNS Domains' => 'DNS-domainit', + 'DNS domains' => 'DNS-domainit', 'DNS records' => 'DNS-tietueet', 'Name Servers' => 'Nimipalvelimet', 'Mail Domains' => 'Sähköpostidomainit', 'Mail Accounts' => 'Sähköpostikäyttäjät', 'Cron Jobs' => 'Cron-tehtävät', 'SSH Access' => 'SSH-oikeudet', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP-osoitteet', 'Backups' => 'Varmuuskopiot', 'Backup System' => 'Varmuuskopioi järjestelmä', @@ -180,10 +195,12 @@ $LANG['fi'] = array( 'Proxy Extensions' => 'Proxy laajennukset', 'Web Statistics' => 'Webtilastot', 'Additional FTP Account' => 'Ylimääräinen FTP-tili', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Päättyy', 'Records' => 'Tietueet', + 'Serial' => 'Serial', 'Catchall email' => 'Catchall-sähköposti', 'AntiVirus Support' => 'AntiVirus-tuki', 'AntiSpam Support' => 'AntiSpam-tuki', @@ -193,6 +210,16 @@ $LANG['fi'] = array( 'Autoreply' => 'Automaattinen vastaus', 'Forward to' => 'Uudelleenohjaa', 'Do not store forwarded mail' => 'Älä säilytä uudelleenohjattuja viestejä', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'tietokanta', 'User' => 'Käyttäjä', 'Host' => 'Host', @@ -214,13 +241,13 @@ $LANG['fi'] = array( 'Users' => 'Käyttäjät', 'Load Average' => 'Keskimääräinen Käyttöaste', 'Memory Usage' => 'Muistinkäyttö', + 'APACHE2 Usage' => 'APACHE2-käyttö', 'HTTPD Usage' => 'HTTPD-käyttö', 'NGINX Usage' => 'NGINX-käyttö', - 'APACHE2 Usage' => 'APACHE2-käyttö', 'MySQL Usage on localhost' => 'MySQL-käyttö @ localhost', 'PostgreSQL Usage on localhost' => 'PostgreSQL-käyttö @ localhost', 'Bandwidth Usage eth0' => 'Kaistankäyttö eth0', - 'Bandwidth Usage eth1' => 'Kaistankäyttö eth1', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP-käyttö', 'SSH Usage' => 'SSH-käyttö', 'reverse proxy' => 'reverse proxy', @@ -232,7 +259,9 @@ $LANG['fi'] = array( 'email antispam' => 'sähköpostin antispam', 'database server' => 'tietokantapalvelin', 'ftp server' => 'ftp-palvelin', - 'job scheduler' => 'job scheduler', //no-idea + 'job scheduler' => 'job scheduler', //no-idea + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'Prosessori', 'Memory' => 'Muisti', 'Uptime' => 'Käyttöaika', @@ -243,7 +272,6 @@ $LANG['fi'] = array( 'Release' => 'Julkaisu', 'Architecture' => 'Arkkitehtuuri', 'Object' => 'Objekti', - 'Owner' => 'Omistaja', 'Username' => 'Käyttäjä', 'Password' => 'Salasana', 'Email' => 'Email', @@ -261,7 +289,7 @@ $LANG['fi'] = array( 'Aliases' => 'Aliakset', 'SSL Certificate' => 'SSL-sertifikaatti', 'SSL Key' => 'SSL-avain', - 'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediate', //no-idea + 'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediate', //no-idea 'SSL CSR' => 'SSL CSR', 'optional' => 'valinnainen', 'internal' => 'sisäinen', @@ -274,12 +302,12 @@ $LANG['fi'] = array( 'YYYY-MM-DD' => 'YYYY-MM-DD', 'Name servers' => 'Nimipalvelimet', 'Record' => 'Tietue', - 'IP or Value' => 'IP or Value', //no-idea + 'IP or Value' => 'IP or Value', //no-idea 'Priority' => 'Prioriteetti', 'Record Number' => 'Tietueen numero', 'in megabytes' => 'megatavuissa', 'Message' => 'Viesti', - 'use local-part' => 'use local-part', //no-idea + 'use local-part' => 'use local-part', //no-idea 'one or more email addresses' => 'yksi tai useampia sähköposteja', 'Prefix will be automaticaly added to database name and database user' => 'Etuliite %s lisätään automaattisesti tietokannan nimeen ja käyttäjään', 'Database' => 'Tietokanta', @@ -287,12 +315,12 @@ $LANG['fi'] = array( 'Minute' => 'Minuutti', 'Command' => 'Käsky', 'Package Name' => 'Paketin nimi', - 'Netmask' => 'Netmask', //no-idea - 'Interface' => 'Interface', //no-idea + 'Netmask' => 'Netmask', //no-idea + 'Interface' => 'Interface', //no-idea 'Shared' => 'Jaettu', 'Assigned user' => 'Assigned user', 'Assigned domain' => 'Assigned domain', - 'NAT IP association' => 'NAT IP association', //no-idea + 'NAT IP association' => 'NAT IP association', //no-idea 'shell' => 'shell', 'web domains' => 'web-domainit', 'web aliases' => 'web-aliakset', @@ -337,6 +365,8 @@ $LANG['fi'] = array( 'ftp user password' => 'ftp-käyttäjän salasana', 'ftp user' => 'ftp-käyttäjä', 'Last 70 lines of %s.%s.log' => '%s 70 viimeistä lokimerkintää.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Lataa AccessLog', 'Download ErrorLog' => 'Lataa Virheloki', 'Country' => 'Maa', @@ -351,8 +381,26 @@ $LANG['fi'] = array( 'Banlist' => 'Bannilista', 'ranges are acceptable' => 'vaihteluvälit ovat hyväksyttäviä', 'CIDR format is supported' => 'CIDR muotoa tuetaan', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unlimited', '1 account' => '1 tili', '%s accounts' => '%s tiliä', @@ -368,6 +416,8 @@ $LANG['fi'] = array( '%s cron jobs' => '%s cron-tehtävää', '1 archive' => '1 archive', '%s archives' => '%s archives', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 paketti', '%s packages' => '%s pakettia', '1 IP address' => '1 IP-osoite', @@ -395,6 +445,7 @@ $LANG['fi'] = array( 'PACKAGE_CREATED_OK' => 'Paketti %s lisättiin onnistuneesti.', 'SSL_GENERATED_OK' => 'Sertifikaatti lisättiin onnistuneesti.', 'RULE_CREATED_OK' => 'Sääntö lisättiin onnistuneesti.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Automaattinen päivitys otettu käyttöön', 'Autoupdate has been successfully disabled' => 'Automaattinen päivitys poistettu käytöstä', 'Cronjob email reporting has been successfully enabled' => 'Cronjob sähköposti raportointi on onnistuneesti mahdollistanut', @@ -470,7 +521,7 @@ $LANG['fi'] = array( 'Confirm Password' => 'Hyväksy salasana', 'Reset' => 'Nollaa', 'Reset Code' => 'Nollauskoodi', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Salasanan nollauskoodi on lähetetty sähköpostiisi
', 'MAIL_RESET_SUBJECT' => 'Salana vaihdettiin %s', 'PASSWORD_RESET_REQUEST' => "Nollataksesi hallintapaneelin salasanan, seuraa tätä linkkiä:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nVaihtoehtoisesti voit mennä https://%s/reset/?action=code&user=%s ja syöttää nollauskoodin:\n%s\n\nJos et varta vasten pyytänyt tätä salasananvaihtoa, mene paniikkiin ja ota yhteyttä ylläpitoon.\n\n--\nVesta Hallintapaneeli\n", @@ -492,6 +543,29 @@ $LANG['fi'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Time Zone', 'Default Language' => 'Default Language', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'preview', @@ -507,8 +581,8 @@ $LANG['fi'] = array( 'Starred' => 'Starred', 'Name' => 'Name', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -518,10 +592,13 @@ $LANG['fi'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -536,12 +613,20 @@ $LANG['fi'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -550,7 +635,17 @@ $LANG['fi'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -566,31 +661,31 @@ $LANG['fi'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -602,6 +697,39 @@ $LANG['fi'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + + +// Texts below doesn't exist in en.php + 'traffic' => 'tiedonsiirto', + 'disk' => 'levytila', + 'Bandwidth Usage eth1' => 'Kaistankäyttö eth1', +); diff --git a/web/inc/i18n/fr.php b/web/inc/i18n/fr.php index 7772ba06..f06f61e5 100644 --- a/web/inc/i18n/fr.php +++ b/web/inc/i18n/fr.php @@ -25,11 +25,26 @@ $LANG['fr'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Ajouter un Utilisateur', 'Add Domain' => 'Ajouter un Domaine', 'Add Web Domain' => 'Ajouter un Domaine', 'Add DNS Domain' => 'Ajouter un DNS', - 'Add DNS Record' => 'Ajouter un DNS', + 'Add DNS Record' => 'Ajouter une entrée DNS', 'Add Mail Domain' => 'Ajouter un Domaine', 'Add Mail Account' => 'Ajouter un Compte', 'Add Database' => 'Ajouter une BDD', @@ -53,7 +68,7 @@ $LANG['fr'] = array( 'Save' => 'Sauvegarde', 'Submit' => 'Envoyer', - 'toggle all' => 'selectionner tout', + 'toggle all' => 'tout', // please make as short as "toggle all" 'sélectionner tout', 'apply to selected' => 'appliquer à la sélection', 'rebuild' => 'recréer', 'rebuild web' => 'recréer web', @@ -87,39 +102,39 @@ $LANG['fr'] = array( 'update' => 'mettre-à-jour', 'generate' => 'générer', 'Generate CSR' => 'Générer un CSR', - 'reread IP' => 'actualiser l\'IP', + 'reread IP' => "actualiser l'IP", 'enable autoupdate' => 'activer la mise-à-jour automatique', 'disable autoupdate' => 'desactiver la mise-à-jour automatique', - 'turn on notifications' => 'activer les notifications', - 'turn off notifications' => 'désactiver les notifications', + 'turn on notifications' => 'act. les notifications', + 'turn off notifications' => 'désact. les notifications', - 'Adding User' => 'Ajout d\'un Utilisateur', - 'Editing User' => 'Edition d\'un Utilisateur', - 'Adding Domain' => 'Ajout d\'un Domaine', - 'Editing Domain' => 'Edition d\'un Domaine', - 'Adding DNS Domain' => 'Ajout d\'un Domaine DNS', - 'Editing DNS Domain' => 'Edition d\'un Domaine DNS', - 'Adding DNS Record' => 'Ajout d\'un Enregistrement DNS', - 'Editing DNS Record' => 'Edition d\'un Enregistrement DNS', - 'Adding Mail Domain' => 'Ajout d\'un Domaine Mail', - 'Editing Mail Domain' => 'Edition d\'un Domaine Mail', - 'Adding Mail Account' => 'Ajout d\'un Compte Mail', - 'Editing Mail Account' => 'Edition d\'un Compte Mail', - 'Adding database' => 'Ajout d\'une base de données', - 'Editing Cron Job' => 'Edition d\'une tâche Cron', - 'Adding Cron Job' => 'Ajout d\'une tâche Cron', - 'Editing Database' => 'Edition d\'une base de données', - 'Adding Package' => 'Ajout d\'un Paquet', - 'Editing Package' => 'Edition d\'un Paquet', - 'Adding IP address' => 'Ajout d\'une adresse IP', - 'Editing IP Address' => 'Edition d\'une adresse IP', - 'Editing Backup Exclusions' => 'Edition des exclusions de Backup', - 'Generating CSR' => 'Génération d\'un jeton CSR', + 'Adding User' => "Ajout d'un Utilisateur", + 'Editing User' => "Édition d'un Utilisateur", + 'Adding Domain' => "Ajout d'un Domaine", + 'Editing Domain' => "Édition d'un Domaine", + 'Adding DNS Domain' => "Ajout d'un Domaine DNS", + 'Editing DNS Domain' => "Édition d'un Domaine DNS", + 'Adding DNS Record' => "Ajout d'un Enregistrement DNS", + 'Editing DNS Record' => "Édition d'un Enregistrement DNS", + 'Adding Mail Domain' => "Ajout d'un Domaine Mail", + 'Editing Mail Domain' => "Édition d'un Domaine Mail", + 'Adding Mail Account' => "Ajout d'un Compte Mail", + 'Editing Mail Account' => "Édition d'un Compte Mail", + 'Adding database' => "Ajout d'une base de données", + 'Editing Cron Job' => "Édition d'une tâche Cron", + 'Adding Cron Job' => "Ajout d'une tâche Cron", + 'Editing Database' => "Édition d'une base de données", + 'Adding Package' => "Ajout d'un Paquet", + 'Editing Package' => "Édition d'un Paquet", + 'Adding IP address' => "Ajout d'une adresse IP", + 'Editing IP Address' => "Édition d'une adresse IP", + 'Editing Backup Exclusions' => 'Édition des exclusions de Backup', + 'Generating CSR' => "Génération d'un jeton CSR", 'Listing' => 'Listage', 'Search Results' => 'Résultats de Recherche', - 'Adding Firewall Rule' => 'Ajout d\'une règle de pare-feu', - 'Editing Firewall Rule' => 'Edition d\'une règle de pare-feu', - 'Adding IP Address to Banlist' => 'Ajout d\'une adresse IP', + 'Adding Firewall Rule' => "Ajout d'une règle de pare-feu", + 'Editing Firewall Rule' => "Édition d'une règle de pare-feu", + 'Adding IP Address to Banlist' => "Ajout d'une adresse IP", 'active' => 'actif', 'spnd' => 'suspendu', @@ -160,13 +175,14 @@ $LANG['fr'] = array( 'Web Aliases' => 'Alias Web', 'per domain' => 'par domaine', 'DNS Domains' => 'Domaines DNS', - 'DNS Domains' => 'Domaines DNS', - 'DNS records' => 'Enregistrements DNS' , + 'DNS domains' => 'Domaines DNS', + 'DNS records' => 'Enregistrements DNS', 'Name Servers' => 'Nom des Serveurs', 'Mail Domains' => 'Domaines Mail', 'Mail Accounts' => 'Comptes Mail', 'Cron Jobs' => 'Tâches Cron', 'SSH Access' => 'Accès SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'Adresses IP', 'Backups' => 'Sauvegardes', 'Backup System' => 'Système de Sauvegarde', @@ -178,19 +194,31 @@ $LANG['fr'] = array( 'Proxy Extensions' => 'Extensions Proxy', 'Web Statistics' => 'Statistiques Web', 'Additional FTP Account' => 'FTP Additionnel', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Expiration', 'Records' => 'Enregistrements', + 'Serial' => 'Serial', 'Catchall email' => 'Email de Récupération', - 'AntiVirus Support' => 'Support de l\'AntiVirus', - 'AntiSpam Support' => 'Support de l\'AntiSpam', + 'AntiVirus Support' => "Support de l'AntiVirus", + 'AntiSpam Support' => "Support de l'AntiSpam", 'DKIM Support' => 'Support DKIM', 'Accounts' => 'Comptes', 'Quota' => 'Quota', 'Autoreply' => 'Réponse Automatique', 'Forward to' => 'Transférer à', 'Do not store forwarded mail' => 'Ne pas conserver le mail transféré', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'base de données', 'User' => 'Utilisateur', 'Host' => 'Serveur', @@ -201,7 +229,7 @@ $LANG['fr'] = array( 'Month' => 'Mois', 'Day of week' => 'Jour de la semaine', 'local' => 'local', - 'Run Time' => 'Temps d\'Exécution', + 'Run Time' => "Temps d'Exécution", 'Backup Size' => 'Taille de la sauvegarde', 'SYS' => 'SYS', 'Domains' => 'Domaines', @@ -212,11 +240,13 @@ $LANG['fr'] = array( 'Users' => 'Utilisateurs', 'Load Average' => 'Charge Moyenne', 'Memory Usage' => 'Utilisation de la Mémoire', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'Utilisation HTTPD', 'NGINX Usage' => 'Utilisation NGINX', 'MySQL Usage on localhost' => 'Utilisation de MySQL sur localhost', 'PostgreSQL Usage on localhost' => 'Utilisation de PostgreSQL sur localhost', 'Bandwidth Usage eth0' => 'Utilisation de la Bande Passante sur eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'Utilisation du FTP', 'SSH Usage' => 'Utilisation SSH', 'reverse proxy' => 'reverse proxy', @@ -229,6 +259,8 @@ $LANG['fr'] = array( 'database server' => 'serveur de base de données', 'ftp server' => 'serveur ftp', 'job scheduler' => 'programmation de tâches', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Mémoire', 'Uptime' => 'Temps de Fonctionnement', @@ -239,15 +271,14 @@ $LANG['fr'] = array( 'Release' => 'Release', 'Architecture' => 'Architecture', 'Object' => 'Objet', - 'Owner' => 'Propriétaire', - 'Username' => 'Nom d\'Utilisateur', + 'Username' => "Nom d'Utilisateur", 'Password' => 'Mot de Passe', 'Email' => 'Email', 'Package' => 'Paquet', 'Language' => 'Langue', 'First Name' => 'Prénom', 'Last Name' => 'Nom', - 'Send login credentials to email address' => 'Envoyer les identifiants à l\'adresse email', + 'Send login credentials to email address' => "Envoyer les identifiants à l'adresse email", 'Default Template' => 'Template par défaut', 'Default Name Servers' => 'Nom de Serveurs par Défaut', 'Domain' => 'Domaine', @@ -261,18 +292,18 @@ $LANG['fr'] = array( 'SSL CSR' => 'Jeton CSR SSL', 'optional' => 'optionnel', 'internal' => 'interne', - 'Statistics Authorization' => 'Droits d\'Accès aux Statistiques', + 'Statistics Authorization' => "Droits d'Accès aux Statistiques", 'Statistics Auth' => 'Accès aux Statistiques', 'Account' => 'Compte', - 'Prefix will be automaticaly added to username' => 'Le préfixe %s sera automatiquement ajouté au nom d\'utilisateur', - 'Send FTP credentials to email' => 'Envoyer les identifiants FTP à l\'adresse email', - 'Expiration Date' => 'Date d\'Expiration', + 'Prefix will be automaticaly added to username' => "Le préfixe %s sera automatiquement ajouté au nom d'utilisateur", + 'Send FTP credentials to email' => "Envoyer les identifiants FTP à l'adresse email", + 'Expiration Date' => "Date d'Expiration", 'YYYY-MM-DD' => 'YYYY-MM-DD', 'Name servers' => 'Nom des serveurs', - 'Record' => 'Valeur de l\'Enregistrement', + 'Record' => "Valeur de l'Enregistrement", 'IP or Value' => 'IP ou Valeur', 'Priority' => 'Priorité', - 'Record Number' => 'Nombre d\'Enregistrements', + 'Record Number' => "Nombre d'Enregistrements", 'in megabytes' => 'en mégaoctets', 'Message' => 'Message', 'use local-part' => 'utilisation locale', @@ -303,13 +334,11 @@ $LANG['fr'] = array( 'day of week' => 'jour de la semaine', 'cmd' => 'cmd', 'users' => 'utilisateurs', - 'disk' => 'disque', - 'traffic' => 'traffic', 'domains' => 'domaines', 'aliases' => 'alias', 'records' => 'enregistrements', 'jobs' => 'tâches', - 'username' => 'nom d\'utilisateur', + 'username' => "nom d'utilisateur", 'password' => 'mot de passe', 'type' => 'type', 'charset' => 'charset', @@ -335,6 +364,8 @@ $LANG['fr'] = array( 'ftp user password' => 'mot de passe ftp', 'ftp user' => 'utilisateur ftp', 'Last 70 lines of %s.%s.log' => 'Dernières 70 lignes du fichier %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Télécharger le fichier AccessLog', 'Download ErrorLog' => 'Télécharger le fichier ErrorLog', 'Country' => 'Pays', @@ -349,9 +380,27 @@ $LANG['fr'] = array( 'Banlist' => 'Banlist', 'ranges are acceptable' => 'plages sont acceptables', 'CIDR format is supported' => 'Le format CIDR est pris en charge', - 'Add one more Name Server' => 'Add one more Name Server', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', + 'Add one more Name Server' => 'Ajouter un autre Serveur de Noms', - 'unlimited' => 'unlimited', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + + 'unlimited' => 'illimité', '1 account' => '1 compte', '%s accounts' => '%s comptes', '1 domain' => '1 domaine', @@ -366,6 +415,8 @@ $LANG['fr'] = array( '%s cron jobs' => '%s tâches cron', '1 archive' => '1 archive', '%s archives' => '%s archives', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 paquet', '%s packages' => '%s paquets', '1 IP address' => '1 adresse IP', @@ -376,7 +427,7 @@ $LANG['fr'] = array( '%s log records' => '%s enregistrements', '1 object' => '1 objet', '%s objects' => '%s objets', - 'no exclusions' => 'pas d\'exclusions', + 'no exclusions' => "pas d'exclusions", '1 rule' => '1 règle', '%s rules' => '%s règles', 'There are no currently banned IP' => 'Aucune IP bannies', @@ -384,7 +435,7 @@ $LANG['fr'] = array( 'USER_CREATED_OK' => 'Utilisateur %s créé avec succès.', 'WEB_DOMAIN_CREATED_OK' => 'Domaine %s créé avec succès.', 'DNS_DOMAIN_CREATED_OK' => 'Domaine DNS %s créé avec succès.', - 'DNS_RECORD_CREATED_OK' => 'L\'enregistrement %s.%s a été créé avec succès.', + 'DNS_RECORD_CREATED_OK' => "L'enregistrement %s.%s a été créé avec succès.", 'MAIL_DOMAIN_CREATED_OK' => 'Le domaine email %s a été créé avec succès.', 'MAIL_ACCOUNT_CREATED_OK' => 'Le compte email %s@%s a été créé avec succès.', 'DATABASE_CREATED_OK' => 'La base de données %s a été créée avec succès.', @@ -393,21 +444,22 @@ $LANG['fr'] = array( 'PACKAGE_CREATED_OK' => 'Le paquet %s a été créé avec succès.', 'SSL_GENERATED_OK' => 'Le certificat a été généré avec succès.', 'RULE_CREATED_OK' => 'Règle a été créée avec succès.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Les mises-à-jour automatiques ont été activées avec succès.', 'Autoupdate has been successfully disabled' => 'Les mises-à-jour automatiques ont été desactivées avec succès.', 'Cronjob email reporting has been successfully enabled' => 'Rapports de cronjob a été activé avec succès', 'Cronjob email reporting has been successfully disabled' => 'Rapports de cronjob a été désactivé avec succès', 'Changes has been saved.' => 'Les changements ont été sauvegardés.', 'Confirmation' => 'Confirmation', - 'DELETE_USER_CONFIRMATION' => 'Êtes-vous sûr de vouloir supprimer l\'utilisateur %s ?', - 'SUSPEND_USER_CONFIRMATION' => 'Êtes-vous sûr de vouloir suspendre l\'utilisateur %s ?', - 'UNSUSPEND_USER_CONFIRMATION' => 'Êtes-vous sûr de vouloir réactiver l\'utilisateur %s ?', + 'DELETE_USER_CONFIRMATION' => "Êtes-vous sûr de vouloir supprimer l'utilisateur %s ?", + 'SUSPEND_USER_CONFIRMATION' => "Êtes-vous sûr de vouloir suspendre l'utilisateur %s ?", + 'UNSUSPEND_USER_CONFIRMATION' => "Êtes-vous sûr de vouloir réactiver l'utilisateur %s ?", 'DELETE_DOMAIN_CONFIRMATION' => 'Êtes-vous sûr de vouloir supprimer le domaine %s ?', 'SUSPEND_DOMAIN_CONFIRMATION' => 'Êtes-vous sûr de vouloir suspendre le domaine %s ?', 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'Êtes-vous sûr de vouloir réactiver le domaine %s ?', - 'DELETE_RECORD_CONFIRMATION' => 'Êtes-vous sûr de vouloir supprimer l\'enregistrement %s ?', - 'SUSPEND_RECORD_CONFIRMATION' => 'Êtes-vous sûr de vouloir suspendre l\'enregistrement %s ?', - 'UNSUSPEND_RECORD_CONFIRMATION' => 'Êtes-vous sûr de vouloir réactiver l\'enregistrement %s ?', + 'DELETE_RECORD_CONFIRMATION' => "Êtes-vous sûr de vouloir supprimer l'enregistrement %s ?", + 'SUSPEND_RECORD_CONFIRMATION' => "Êtes-vous sûr de vouloir suspendre l'enregistrement %s ?", + 'UNSUSPEND_RECORD_CONFIRMATION' => "Êtes-vous sûr de vouloir réactiver l'enregistrement %s ?", 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'Êtes-vous sûr de vouloir supprimer %s ?', 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Êtes-vous sûr de vouloir suspendre %s ?', 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Êtes-vous sûr de vouloir réactiver %s ?', @@ -418,49 +470,49 @@ $LANG['fr'] = array( 'SUSPEND_CRON_CONFIRMATION' => 'Êtes-vous sûr de vouloir suspendre la tâche cron ?', 'UNSUSPEND_CRON_CONFIRMATION' => 'Êtes-vous sûr de vouloir réactiver la tâche cron ?', 'DELETE_BACKUP_CONFIRMATION' => 'Êtes-vous sûr de vouloir supprimer la sauvergarde %s ?', - 'DELETE_EXCLUSION_CONFIRMATION' => 'Êtes-vous sûr de vouloir supprimer l\'exclusion %s ?', + 'DELETE_EXCLUSION_CONFIRMATION' => "Êtes-vous sûr de vouloir supprimer l'exclusion %s ?", 'DELETE_PACKAGE_CONFIRMATION' => 'Êtes-vous sûr de vouloir supprimer le paquet %s ?', - 'DELETE_IP_CONFIRMATION' => 'Êtes-vous sûr de vouloir supprimer l\'adresse IP %s ?', + 'DELETE_IP_CONFIRMATION' => "Êtes-vous sûr de vouloir supprimer l'adresse IP %s ?", 'DELETE_RULE_CONFIRMATION' => 'Êtes-vous sûr de vouloir supprimer la règle #%s?', 'SUSPEND_RULE_CONFIRMATION' => 'Êtes-vous sûr de vouloir suspendre la règle #%s?', 'UNSUSPEND_RULE_CONFIRMATION' => 'Êtes-vous sûr de vouloir réactiver la règle #%s?', - 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', + 'LEAVE_PAGE_CONFIRMATION' => 'Quitter la page ?', 'RESTART_CONFIRMATION' => 'Êtes-vous sûr de vouloir redémarrer le serveur %s ?', 'Welcome' => 'Bienvenue', 'LOGGED_IN_AS' => 'Connecté en tant que %s', 'Error' => 'Erreur', - 'Invalid username or password' => 'Nom d\'utilisateur ou mot de passe invalide.', - 'Invalid username or code' => 'Nom d\'utilisateur ou code de confirmation invalide.', + 'Invalid username or password' => "Nom d'utilisateur ou mot de passe invalide.", + 'Invalid username or code' => "Nom d'utilisateur ou code de confirmation invalide.", 'Passwords not match' => 'Les mots de passe ne correspondent pas.', 'Please enter valid email address.' => 'Veuillez entrer une adresse email valide.', 'Field "%s" can not be blank.' => 'Le champ "%s" ne peut être vide.', 'Password is too short.' => 'Le mot de passe est trop court (6 caractères minimum)', 'Error code:' => 'Code erreur : %s', 'SERVICE_ACTION_FAILED' => '"%s" "%s" échouée', - 'IP address is in use' => 'L\'adresse IP est en cours d\'utilisation', + 'IP address is in use' => "L'adresse IP est en cours d'utilisation", 'BACKUP_SCHEDULED' => 'La tâche a bien été ajoutée à la liste. Vous recevrez un mail de confirmation lorsque la sauvegarde sera prête pour le téléchargement.', - 'BACKUP_EXISTS' => 'La création d\'une sauvegarde est déjà en cours. Veuillez attendre que celle-ci soit terminée.', + 'BACKUP_EXISTS' => "La création d'une sauvegarde est déjà en cours. Veuillez attendre que celle-ci soit terminée.", 'RESTORE_SCHEDULED' => 'La tâche a bien été ajoutée à la liste. Vous recevrez un mail de confirmation lorsque sera terminée.', - 'RESTORE_EXISTS' => 'La restauration d\'une sauvegarde est déjà en cours. Veuillez attendre que celle-ci soit terminée avant d\en lancer une nouvelle.', + 'RESTORE_EXISTS' => "La restauration d'une sauvegarde est déjà en cours. Veuillez attendre que celle-ci soit terminée avant d'en lancer une nouvelle.", - 'WEB_EXCLUSIONS' => "Entrez les noms de domaines, un par ligne. Pour exclure tous les domaines utilisez *. Pour exclure des répertoires spécifiques utilisez le format suivant : domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Entrez les noms de domaines, un par ligne. Pour exclure tous les domaines utilisez *.", - 'MAIL_EXCLUSIONS' => "Entrez les domaines, un par ligne. Pour exclure tous les domaines utilisez *. Pour exclure des comptes spécifiques utilisez le format suivant : domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Entrez le nom complet des bases de données, une par ligne. Pour exclure toutes les bases de données utilisez *.", - 'CRON_EXCLUSIONS' => "Pour explure toutes les tâches utilisez *.", - 'USER_EXCLUSIONS' => "Entrez les noms de répertoires, un par ligne. Pour exclure tous les répertoires utilisez *.", + 'WEB_EXCLUSIONS' => 'Entrez les noms de domaines, un par ligne. Pour exclure tous les domaines utilisez *. Pour exclure des répertoires spécifiques utilisez le format suivant : domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Entrez les noms de domaines, un par ligne. Pour exclure tous les domaines utilisez *.', + 'MAIL_EXCLUSIONS' => 'Entrez les domaines, un par ligne. Pour exclure tous les domaines utilisez *. Pour exclure des comptes spécifiques utilisez le format suivant : domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Entrez le nom complet des bases de données, une par ligne. Pour exclure toutes les bases de données utilisez *.', + 'CRON_EXCLUSIONS' => 'Pour explure toutes les tâches utilisez *.', + 'USER_EXCLUSIONS' => 'Entrez les noms de répertoires, un par ligne. Pour exclure tous les répertoires utilisez *.', - 'Welcome to Vesta Control Panel' => 'Bienvenue sur l\interface d\'administration Vesta CP', + 'Welcome to Vesta Control Panel' => "Bienvenue sur l'interface d'administration Vesta CP", 'MAIL_FROM' => 'Vesta Control Panel ', 'GREETINGS_GORDON_FREEMAN' => "Bonjour, %s %s,\n", 'GREETINGS' => "Bonjour,\n", - 'ACCOUNT_READY' => "Votre compte a été créé avec succès et est prêt à l\'emploi.\n\nhttps://%s/login/\nUtilisateur : %s\nMot de Passe : %s\n\n--\nVesta Control Panel\n", + 'ACCOUNT_READY' => "Votre compte a été créé avec succès et est prêt à l'emploi.\n\nhttps://%s/login/\nUtilisateur : %s\nMot de Passe : %s\n\n--\nVesta Control Panel\n", 'FTP login credentials' => 'Identifiants de connexion FTP', - 'FTP_ACCOUNT_READY' => "Le compte FTP a été créé avec succès et est prêt à l\'emploi.\n\nHôte : %s\nUtilisateur : %s_%s\nMot de Passe : %s\n\n--\nVesta Control Panel\n", + 'FTP_ACCOUNT_READY' => "Le compte FTP a été créé avec succès et est prêt à l'emploi.\n\nHôte : %s\nUtilisateur : %s_%s\nMot de Passe : %s\n\n--\nVesta Control Panel\n", 'Database Credentials' => 'Identifiants de connexion à la Base de Données', - 'DATABASE_READY' => "La base de données a été créée avec succès et est prête à l\'emploi.\n\nBase de Données : %s\nUtilisateur : %s\nMot de Passe: %s\n%s\n\n--\nVesta Control Panel\n", + 'DATABASE_READY' => "La base de données a été créée avec succès et est prête à l'emploi.\n\nBase de Données : %s\nUtilisateur : %s\nMot de Passe: %s\n%s\n\n--\nVesta Control Panel\n", 'forgot password' => 'mot de passe oublié', 'Confirm' => 'Confirmer', @@ -468,58 +520,84 @@ $LANG['fr'] = array( 'Confirm Password' => 'Confirmer le mot de passe', 'Reset' => 'Réinitialiser', 'Reset Code' => 'Code de Réinitialisation', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Un Code de Réinitialisation de votre mot de passe a été envoyé à votre adresse email
', 'MAIL_RESET_SUBJECT' => 'Réinitialisation du mot de passe de %s', 'PASSWORD_RESET_REQUEST' => "Pour réinitialiser votre mot de passe, veuillez suivre le lien suivant :\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nSinon, vous pouvez suivre https://%s/reset/?action=code&user=%s et entrer le code de réinitialisation suivant :\n%s\n\nSi vous n'avez pas demandé la réinitialisation de votre mot de passe, veuillez ignorer ce message. Nous vous prions de nous excuser pour la gène occasionnée.\n\n--\nVesta Control Panel\n", 'Jan' => 'Jan', - 'Feb' => 'Feb', + 'Feb' => 'Fev', 'Mar' => 'Mar', - 'Apr' => 'Apr', - 'May' => 'May', + 'Apr' => 'Avr', + 'May' => 'Mai', 'Jun' => 'Jun', 'Jul' => 'Jul', - 'Aug' => 'Aug', + 'Aug' => 'Aoû', 'Sep' => 'Sep', 'Oct' => 'Oct', 'Nov' => 'Nov', - 'Dec' => 'Dec', + 'Dec' => 'Déc', - 'Configuring Server' => 'Configuring Server', + 'Configuring Server' => 'Configuration du Serveur', 'Hostname' => 'Hostname', 'Time Zone' => 'Time Zone', - 'Default Language' => 'Default Language', - 'FileSystem Disk Quota' => 'FileSystem Disk Quota', - 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', - 'preview' => 'preview', - 'Reseller Role' => 'Reseller Role', + 'Default Language' => 'Langage par défaut', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => 'Quota du Système de Fichiers', + 'Vesta Control Panel Plugins' => 'Plugins Vesta Control Panel', + 'preview' => 'prévisualisation', + 'Reseller Role' => 'Rôle Revendeur', 'Web Config Editor' => 'Web Config Editor', 'Template Manager' => 'Template Manager', 'Backup Migration Manager' => 'Backup Migration Manager', - 'FileManager' => 'FileManager', - 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', + 'FileManager' => 'Fichiers', + 'show: CPU / MEM / NET / DISK' => 'voir: CPU / MEM / NET / DISK', - 'sort by' => 'sort by', + 'sort by' => 'classer par', 'Date' => 'Date', - 'Starred' => 'Starred', - 'Name' => 'Name', + 'Starred' => 'Favoris', + 'Name' => 'Nom', - 'File Manager' => 'File Manager', - 'type' => 'type', - 'size' => 'size', + + 'File Manager' => 'Fichiers', + 'size' => 'taille', 'date' => 'date', - 'name' => 'name', - 'Initializing' => 'Initializing', - 'UPLOAD' => 'UPLOAD', - 'NEW FILE' => 'NEW FILE', - 'NEW DIR' => 'NEW DIR', - 'DELETE' => 'DELETE', - 'RENAME' => 'RENAME', - 'COPY' => 'COPY', - 'ARCHIVE' => 'ARCHIVE', - 'EXTRACT' => 'EXTRACT', - 'DOWNLOAD' => 'DOWNLOAD', + 'name' => 'nom', + 'Initializing' => 'Initialisation', + 'UPLOAD' => 'CHARGER', + 'NEW FILE' => 'FICHIER', + 'NEW DIR' => 'RÉP.', + 'DELETE' => 'SUPPR', + 'RENAME' => 'RENOMMER', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', + 'COPY' => 'COPIER', + 'ARCHIVE' => 'ARCHIVER', + 'EXTRACT' => 'EXTRAIRE', + 'DOWNLOAD' => 'TÉLÉCHARGER', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -530,76 +608,126 @@ $LANG['fr'] = array( 'Directory download not available in current version' => 'Directory download not available in current version', 'Directory not available' => 'Directory not available', 'Done' => 'Done', - 'Close' => 'Close', - 'Copy' => 'Copy', - 'Cancel' => 'Cancel', - 'Rename' => 'Rename', - 'Delete' => 'Delete', - 'Extract' => 'Extract', - 'Create' => 'Create', - 'Compress' => 'Compress', + 'Close' => 'Fermer', + 'Copy' => 'Copier', + 'Cancel' => 'Annuler', + 'Rename' => 'Renommer', + 'MOVE' => 'Move', + 'Change Rights' => 'Change Rights', + 'Delete' => 'Supprimer', + 'Extract' => 'Extraire', + 'Create' => 'Créer', + 'Compress' => 'Compresser', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', - 'Original name' => 'Original name', - 'File' => 'File', - 'already exists' => 'already exists', - 'Create file' => 'Create file', - 'Create directory' => 'Create directory', + 'Original name' => 'Nom original', + 'File' => 'Fichier', + 'already exists' => 'existe déjà', + 'Create file' => 'Créer fichier', + 'Create directory' => 'Créer répertoire', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', - 'Add New object' => 'Add New object', - 'Save Form' => 'Save Form', - 'Cancel saving form' => 'Cancel saving form', - 'Go to USER list' => 'Go to USER list', - 'Go to WEB list' => 'Go to WEB list', - 'Go to DNS list' => 'Go to DNS list', - 'Go to MAIL list' => 'Go to MAIL list', - 'Go to DB list' => 'Go to DB list', - 'Go to CRON list' => 'Go to CRON list', - 'Go to BACKUP list' => 'Go to BACKUP list', - 'Focus on search' => 'Focus on search', - 'Display/Close shortcuts' => 'Display/Close shortcuts', - 'Move backward through top menu' => 'Move backward through top menu', - 'Move forward through top menu' => 'Move forward through top menu', - 'Enter focused element' => 'Enter focused element', + 'Shortcuts' => 'Shortcuts', + 'Add New object' => 'Ajouter un nouvel élément', + 'Save Form' => 'Sauvegarder le formulaire', + 'Cancel saving form' => 'Annuler la sauvegarde du formulaire', + 'Go to USER list' => "Afficher l'onglet USER", + 'Go to WEB list' => "Afficher l'onglet WEB", + 'Go to DNS list' => "Afficher l'onglet DNS", + 'Go to MAIL list' => "Afficher l'onglet MAIL", + 'Go to DB list' => "Afficher l'onglet DB", + 'Go to CRON list' => "Afficher l'onglet CRON", + 'Go to BACKUP list' => "Afficher l'onglet BACKUP", + 'Focus on search' => 'Focus sur la case Recherche', + 'Display/Close shortcuts' => 'Afficher/masquer les raccourcis', + 'Move backward through top menu' => 'Se déplacer en arrière dans le menu principal', + 'Move forward through top menu' => 'Se déplacer en avant dans le menu principal', + 'Enter focused element' => "Entrer dans l'élément actif", + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', - 'Upload' => 'Upload', - 'New File' => 'New File', - 'New Folder' => 'New Folder', - 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', - 'Archive' => 'Archive', - 'Delete' => 'Delete', + 'Upload' => 'Charger', + 'New File' => 'Nouveau fichier', + 'New Folder' => 'Nouveau répertoire', + 'Download' => 'Télécharger', + 'Archive' => 'Archiver', 'Save File (in text editor)' => 'Save File (in text editor)', - 'Close Popup / Cancel' => 'Close Popup / Cancel', + 'Close Popup / Cancel' => 'Fermer Popup / Annuler', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', - 'Licence Key' => 'Licence Key', - 'Enter License Key' => 'Enter License Key', - 'Buy Licence' => 'Buy Licence', - 'Buy Lifetime License' => 'Buy Lifetime License', - 'Disable and Cancel Licence' => 'Disable and Cancel Licence', - 'Licence Activated' => 'Licence Activated', - 'Licence Deactivated' => 'Licence Deactivated', + 'Licence Key' => 'Clé de License', + 'Enter License Key' => 'Entrez la clé de License', + 'Buy Licence' => 'Acheter une License', + 'Buy Lifetime License' => 'Acheter une License Unlimited', + 'Disable and Cancel Licence' => 'Désactiver ou Annuler la License', + 'Licence Activated' => 'License activée', + 'Licence Deactivated' => 'Licence désactivée', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + + +// Texts below doesn't exist in en.php + 'disk' => 'disque', + 'traffic' => 'traffic', +); diff --git a/web/inc/i18n/hu.php b/web/inc/i18n/hu.php index 7da0338b..1fed0348 100644 --- a/web/inc/i18n/hu.php +++ b/web/inc/i18n/hu.php @@ -15,8 +15,8 @@ $LANG['hu'] = array( 'Statistics' => 'Statisztikák', 'Log' => 'Naplók', 'Server' => 'Szerver', - 'Firewall' => 'Tűzfal', 'Services' => 'Szolgáltatások', + 'Firewall' => 'Tűzfal', 'Updates' => 'Frissítések', 'Log in' => 'Belépés', 'Log out' => 'Kilépés', @@ -29,6 +29,21 @@ $LANG['hu'] = array( 'CRON' => 'CRON', 'BACKUP' => 'MENTÉS', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Új felhasználó', 'Add Domain' => 'Új domain', 'Add Web Domain' => 'Új Web Domain', @@ -45,8 +60,8 @@ $LANG['hu'] = array( 'Add IP' => 'Új IP', 'Add Rule' => 'Új tűzfal szabály', 'Ban IP Address' => 'IP cím tiltása', - 'Add one more FTP Account' => 'Új FTP hozzáférés', 'Search' => 'Keresés', + 'Add one more FTP Account' => 'Új FTP hozzáférés', 'Overall Statistics' => 'Átfogó statisztikák', 'Daily' => 'Napi', 'Weekly' => 'Heti', @@ -94,8 +109,8 @@ $LANG['hu'] = array( 'reread IP' => 'IP újraolvasása', 'enable autoupdate' => 'automatikus frissítés engedélyezése', 'disable autoupdate' => 'automatikus frissítés tiltása', - 'turn on notifications' => 'értesítések bekapcsolása', - 'turn off notifications' => 'értesítések kikapcsolása', + 'turn on notifications' => 'értesít. bekapcsolása', + 'turn off notifications' => 'értesít. kikapcsolása', 'Adding User' => 'Felhasználó hozzáadása', 'Editing User' => 'Felhasználó szerkesztése', @@ -164,13 +179,14 @@ $LANG['hu'] = array( 'Web Aliases' => 'Web alias', 'per domain' => 'domainenként', 'DNS Domains' => 'DNS domain', - 'DNS Domains' => 'DNS domain', - 'DNS records' => 'DNS record' , + 'DNS domains' => 'DNS domain', + 'DNS records' => 'DNS record', 'Name Servers' => 'Névszerverek', 'Mail Domains' => 'Mail domain', 'Mail Accounts' => 'Mail fiók', 'Cron Jobs' => 'Cron feladat', 'SSH Access' => 'SSH hozzáférés', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP cím', 'Backups' => 'Mentés', 'Backup System' => 'Mentési rendszer', @@ -182,10 +198,12 @@ $LANG['hu'] = array( 'Proxy Extensions' => 'Proxy kiterjesztések', 'Web Statistics' => 'Web statisztikák', 'Additional FTP Account' => 'Hozzáadott FTP', + 'Path' => 'Útvonal', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Lejár', 'Records' => 'Rekordok', + 'Serial' => 'Serial', 'Catchall email' => 'Catchall e-mail', 'AntiVirus Support' => 'AntiVirus támogatás', 'AntiSpam Support' => 'AntiSpam támogatás', @@ -195,6 +213,16 @@ $LANG['hu'] = array( 'Autoreply' => 'Automatikus válasz', 'Forward to' => 'Továbbítás', 'Do not store forwarded mail' => 'Továbbított e-mailek mentésének tiltása', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'adatbázis', 'User' => 'Felhasználó', 'Host' => 'Adatbázis szerver', @@ -216,12 +244,12 @@ $LANG['hu'] = array( 'Users' => 'Felhasználók', 'Load Average' => 'Átlag terhelés', 'Memory Usage' => 'Memória használat', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD használat', 'NGINX Usage' => 'NGINX használat', 'MySQL Usage on localhost' => 'MySQL használat a localhoston', 'PostgreSQL Usage on localhost' => 'PostgreSQL használat a localhoston', 'Bandwidth Usage eth0' => 'eth0 sávszélesség használat', - 'Bandwidth Usage eth1' => 'eth1 sávszélesség használat', 'Exim Usage' => 'Exim használat', 'FTP Usage' => 'FTP használat', 'SSH Usage' => 'SSH használat', @@ -234,9 +262,9 @@ $LANG['hu'] = array( 'email antispam' => 'e-mail antispam', 'database server' => 'adatbázis szerver', 'ftp server' => 'ftp szerver', - 'brute-force monitor' => 'betörésvédelem', - 'firewall' => 'tűzfal', 'job scheduler' => 'job ütemező', + 'firewall' => 'tűzfal', + 'brute-force monitor' => 'betörésvédelem', 'CPU' => 'CPU', 'Memory' => 'Memória', 'Uptime' => 'Futási idő', @@ -247,7 +275,6 @@ $LANG['hu'] = array( 'Release' => 'Kiadás', 'Architecture' => 'Architektúra', 'Object' => 'Objektum', - 'Owner' => 'Tulajdonos', 'Username' => 'Felhasználónév', 'Password' => 'Jelszó', 'Email' => 'E-mail', @@ -274,7 +301,6 @@ $LANG['hu'] = array( 'Account' => 'Fiók', 'Prefix will be automaticaly added to username' => 'A(z) %s előtag automatikusan hozzáadásra kerül a felhasználónévhez.', 'Send FTP credentials to email' => 'FTP adatok küldése e-mailben', - 'Path' => 'Útvonal', 'Expiration Date' => 'Lejárati dárum', 'YYYY-MM-DD' => 'ÉÉÉÉ-HH-NN', 'Name servers' => 'Névszerverek', @@ -342,6 +368,8 @@ $LANG['hu'] = array( 'ftp user password' => 'ftp felhasználónév', 'ftp user' => 'ftp felhasználó', 'Last 70 lines of %s.%s.log' => 'A %s.%s.log utolsó 70 sora', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'AccessLog letöltése', 'Download ErrorLog' => 'ErrorLog letöltése', 'Country' => 'Ország', @@ -356,8 +384,26 @@ $LANG['hu'] = array( 'Banlist' => 'Banlista', 'ranges are acceptable' => 'tartományok használata megengedett', 'CIDR format is supported' => 'a CIDR formátum támogatott', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'végtelen', '1 account' => '1 fiók', '%s accounts' => '%s fiók', @@ -373,6 +419,8 @@ $LANG['hu'] = array( '%s cron jobs' => '%s cron job', '1 archive' => '1 archívum', '%s archives' => '%s archívum', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 csomag', '%s packages' => '%s csomag', '1 IP address' => '1 IP cím', @@ -400,6 +448,7 @@ $LANG['hu'] = array( 'PACKAGE_CREATED_OK' => 'A(z) %s csomag sikeresen létrehozva.', 'SSL_GENERATED_OK' => 'A tanúsítvány sikeresen létrehozva.', 'RULE_CREATED_OK' => 'Szabály sikeresen létrehozva.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Az automatikus frissítés bekapcsolva.', 'Autoupdate has been successfully disabled' => 'Az automatikus frissítés kikapcsolva.', 'Cronjob email reporting has been successfully enabled' => 'Cronjob e-mail jelentés bekapcsolva.', @@ -430,8 +479,8 @@ $LANG['hu'] = array( 'DELETE_IP_CONFIRMATION' => 'Biztos, hogy törlöd a(z) IP címet?', 'DELETE_RULE_CONFIRMATION' => 'Biztos, hogy törlöd a #%s szabályok?', 'SUSPEND_RULE_CONFIRMATION' => 'Biztos, hogy felfüggeszted a #%s szabályok?', - 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', 'UNSUSPEND_RULE_CONFIRMATION' => 'Biztos, hogy újra szeretnéd aktiválni a #%s szabályok?', + 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', 'RESTART_CONFIRMATION' => 'Are you sure you want to restart %s?', 'Welcome' => 'Üdvözöljük', 'LOGGED_IN_AS' => 'Belépve, mint %s', @@ -450,12 +499,12 @@ $LANG['hu'] = array( 'RESTORE_SCHEDULED' => 'A feladat a végrehajtási sorba került. A mentés elkészültéről e-mail értesítést fogunk küldeni.', 'RESTORE_EXISTS' => 'Egy visszaállítás már folyamatban van. Kérlek várj, míg elkészül.', - 'WEB_EXCLUSIONS' => "Írd be a domain nevet, soronként egyet. Az összes kihagyásához használj "*" -ot. Adott könyvtár kihagyásához használd a következő formátumot: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Írd be a domain nevet, soronként egyet. Az összes kihagyásához használj "*" -ot.", - 'MAIL_EXCLUSIONS' => "Írd be a domain nevet, soronként egyet. Az összes domain kihagyásához használj "*" -ot. Adott fiók kihagyásához használd a következő formátumot: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Írd be az adatbázis teljes nevét, soronként egyet. Az összes adatbázis kihagyásához használj "*" -ot", - 'CRON_EXCLUSIONS' => "Az összes job kihagyásához használj "*" -ot.", - 'USER_EXCLUSIONS' => "Írd be a könyvtár nevét, soronként egyet. Az összes kihagyásához használj "*" -ot.", + 'WEB_EXCLUSIONS' => 'Írd be a domain nevet, soronként egyet. Az összes kihagyásához használj ', + 'DNS_EXCLUSIONS' => 'Írd be a domain nevet, soronként egyet. Az összes kihagyásához használj ', + 'MAIL_EXCLUSIONS' => 'Írd be a domain nevet, soronként egyet. Az összes domain kihagyásához használj ', + 'DB_EXCLUSIONS' => 'Írd be az adatbázis teljes nevét, soronként egyet. Az összes adatbázis kihagyásához használj ', + 'CRON_EXCLUSIONS' => 'Az összes job kihagyásához használj ', + 'USER_EXCLUSIONS' => 'Írd be a könyvtár nevét, soronként egyet. Az összes kihagyásához használj ', 'Welcome to Vesta Control Panel' => 'Üdvözli a Vesta Control Panel!', 'MAIL_FROM' => 'Vesta Control Panel ', @@ -475,7 +524,7 @@ $LANG['hu'] = array( 'Confirm Password' => 'Jelszó megerősítése', 'Reset' => 'Visszaállít', 'Reset Code' => 'Kód újragenerálása', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'A jelszó visszaállításhoz szükséges kód elküldésre került az e-mail címedre
', 'MAIL_RESET_SUBJECT' => 'Jelszó újragenerálás %s -kor', 'PASSWORD_RESET_REQUEST' => "A panel jelszavad visszaállításához kattints a következő linkre:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternatively, vagy használd a következőt https://%s/reset/?action=code&user=%s és írd be a kódot:\n%s\n\nHa nem Te kérted a visszaállítást, kérlek hagyd figyelmen kívül ezt a levelet.\n\n--\nKezelőfelület\n", @@ -497,6 +546,29 @@ $LANG['hu'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Időzóna', 'Default Language' => 'Alapértelmezett nyelv', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'Fájlrendszer kvóta', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Pluginek', 'preview' => 'előnézet', @@ -512,8 +584,8 @@ $LANG['hu'] = array( 'Starred' => 'Starred', 'Name' => 'Name', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -523,10 +595,13 @@ $LANG['hu'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -541,12 +616,20 @@ $LANG['hu'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -555,7 +638,17 @@ $LANG['hu'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -571,31 +664,31 @@ $LANG['hu'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -607,6 +700,37 @@ $LANG['hu'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + + +// Texts below doesn't exist in en.php + 'Bandwidth Usage eth1' => 'eth1 sávszélesség használat', +); diff --git a/web/inc/i18n/id.php b/web/inc/i18n/id.php index 0a0d935a..68343ab7 100644 --- a/web/inc/i18n/id.php +++ b/web/inc/i18n/id.php @@ -28,13 +28,28 @@ $LANG['id'] = array( 'CRON' => 'CRON', 'BACKUP' => 'CADANGAN', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Tambah Pengguna', 'Add Domain' => 'Tambah Domain', 'Add Web Domain' => 'Tambah Domain Web', 'Add DNS Domain' => 'Tambah Domain DNS ', 'Add DNS Record' => 'Tambah Record DNS', 'Add Mail Domain' => 'Tambah Domain Mail', - 'Add Mail Account' => 'Tambah Pengguna Mail' , + 'Add Mail Account' => 'Tambah Pengguna Mail', 'Add Database' => 'Tambah Basis Data', 'Add Cron Job' => 'Tambah Cron Job', 'Create Backup' => 'Buat Cadangan', @@ -44,8 +59,8 @@ $LANG['id'] = array( 'Add IP' => 'Tambah IP', 'Add Rule' => 'Tambah Aturan', 'Ban IP Address' => 'Memblokir IP', - 'Add one more FTP Account' => 'Tambah satu lagi Pengguna FTP', 'Search' => 'Cari', + 'Add one more FTP Account' => 'Tambah satu lagi Pengguna FTP', 'Overall Statistics' => 'Seluruh Statistik', 'Daily' => 'Harian', 'Weekly' => 'Mingguan', @@ -93,8 +108,8 @@ $LANG['id'] = array( 'reread IP' => 'baca ulang IP', 'enable autoupdate' => 'mengaktifkan autoupdate', 'disable autoupdate' => 'menonaktifkan autoupdate', - 'turn on notifications' => 'mengaktifkan notifikasi', - 'turn off notifications' => 'menonaktifkan notifikasi', + 'turn on notifications' => 'mengaktifkan notifik.', + 'turn off notifications' => 'menonaktifkan notifik.', 'Adding User' => 'Menambah User', 'Editing User' => 'Menyunting User', @@ -163,28 +178,31 @@ $LANG['id'] = array( 'Web Aliases' => 'Web Aliases', 'per domain' => 'per domain', 'DNS Domains' => 'DNS Domains', - 'DNS Domains' => 'DNS Domains', - 'DNS records' => 'DNS records' , + 'DNS domains' => 'DNS domains', + 'DNS records' => 'DNS records', 'Name Servers' => 'Name Servers', 'Mail Domains' => 'Mail Domains', 'Mail Accounts' => 'Para Pengguna Mail', 'Cron Jobs' => 'Cron Jobs', 'SSH Access' => 'Akses SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'Alamat IP', 'Backups' => 'Cadangkan', 'Backup System' => 'Cadangkan System', 'backup exclusions' => 'pengecualian', - 'template' => 'contoh', + 'template' => 'kerangka', 'SSL Support' => 'Dukungan SSL', - 'SSL Home Directory' => 'SSL Home', + 'SSL Home Directory' => 'Direktori SSL Home', 'Proxy Support' => 'Dukungan Proxy', 'Proxy Extensions' => 'Ekstensi Proxy', 'Web Statistics' => 'Statistik Web', 'Additional FTP Account' => 'FTP Tambahan', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Kadarluasa', 'Records' => 'Records', + 'Serial' => 'Serial', 'Catchall email' => 'Catchall email', 'AntiVirus Support' => 'Dukungan AntiVirus', 'AntiSpam Support' => 'Dukungan AntiSpam', @@ -194,6 +212,16 @@ $LANG['id'] = array( 'Autoreply' => 'Balasan Otomatis', 'Forward to' => 'Teruskan ke', 'Do not store forwarded mail' => 'Email terusan-nya jangan disimpan', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'basisdata', 'User' => 'Pengguna', 'Host' => 'Host', @@ -215,11 +243,13 @@ $LANG['id'] = array( 'Users' => 'Para Pengguna', 'Load Average' => 'Rata2 Pemuatan', 'Memory Usage' => 'Penggunaan Memori', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'Penggunaan HTTPD', 'NGINX Usage' => 'Penggunaan NGINX', 'MySQL Usage on localhost' => 'Penggunaan MySQL di localhost', 'PostgreSQL Usage on localhost' => 'Penggunaan PostgreSQL di localhost', 'Bandwidth Usage eth0' => 'Penggunaan Bandwidth eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'Penggunaan FTP', 'SSH Usage' => 'Penggunaan SSH', 'reverse proxy' => 'reverse proxy', @@ -232,6 +262,8 @@ $LANG['id'] = array( 'database server' => 'server basisdata', 'ftp server' => 'server ftp', 'job scheduler' => 'jadwal pekerjaan', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Memori', 'Uptime' => 'Uptime', @@ -242,7 +274,6 @@ $LANG['id'] = array( 'Release' => 'Rilis', 'Architecture' => 'Arsitektur', 'Object' => 'Objek', - 'Owner' => 'Pemilik', 'Username' => 'Nama Pengguna', 'Password' => 'Katakunci', 'Email' => 'Email', @@ -312,7 +343,7 @@ $LANG['id'] = array( 'jobs' => 'jobs', 'username' => 'namapengguna', 'password' => 'katakunci', - 'type' => 'jenis', + 'type' => 'tipe', 'charset' => 'charset', 'domain' => 'domain', 'ip' => 'ip', @@ -336,6 +367,8 @@ $LANG['id'] = array( 'ftp user password' => 'ftp namapengguna katakunci', 'ftp user' => 'ftp pengguna', 'Last 70 lines of %s.%s.log' => '70 baris terakhir dari %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Unduh AccessLog', 'Download ErrorLog' => 'Unduh ErrorLog', 'Country' => 'Negara', @@ -348,11 +381,29 @@ $LANG['id'] = array( 'Port' => 'Port', 'Comment' => 'Komentar', 'Banlist' => 'Banlist', - 'ranges are acceptable' => 'rentang diperbolehkan', + 'ranges are acceptable' => 'rentang yang diperbolehkan', 'CIDR format is supported' => 'Format CIDR didukung', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', - 'unlimited' => 'unlimited', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + + 'unlimited' => 'tidak terbatas', '1 account' => '1 pengguna', '%s accounts' => '%s pengguna', '1 domain' => '1 domain', @@ -367,6 +418,8 @@ $LANG['id'] = array( '%s cron jobs' => '%s cron jobs', '1 archive' => '1 arsip', '%s archives' => '%s arsip', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 paket', '%s packages' => '%s paket', '1 IP address' => '1 alamat IP', @@ -394,8 +447,9 @@ $LANG['id'] = array( 'PACKAGE_CREATED_OK' => 'Paket %s udah berhasil dibikin.', 'SSL_GENERATED_OK' => 'Sertifikat udah berhasil dihasilkan.', 'RULE_CREATED_OK' => 'Aturan udah berhasil dibikin.', - 'Autoupdate has been successfully enabled' => 'Autoupdate has been successfully enabled', - 'Autoupdate has been successfully disabled' => 'Autoupdate has been successfully disabled', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text + 'Autoupdate has been successfully enabled' => 'Autoupdate sukses diaktifkan', + 'Autoupdate has been successfully disabled' => 'Autoupdate telah dinonaktifkan', 'Cronjob email reporting has been successfully enabled' => 'Pelaporan cronjob telah berhasil diaktifkan', 'Cronjob email reporting has been successfully disabled' => 'Pelaporan cronjob telah berhasil dinonaktifkan', 'Changes has been saved.' => 'Perubahan udah disimpan.', @@ -444,12 +498,12 @@ $LANG['id'] = array( 'RESTORE_SCHEDULED' => 'Tugas udah ditambahin ke antrian. Nanti email pemberitahuan dikirim kalo backup-an sudah siap di unduh.', 'RESTORE_EXISTS' => 'Tugas pengembalian lagi jalan. Tunggu ampe selesai baru jalanin lagi.', - 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *", - 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *", - 'CRON_EXCLUSIONS' => "To exclude all jobs use *", - 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *", + 'WEB_EXCLUSIONS' => 'Ketik nama domain, satu domain perbaris. Untuk pengecualian semua domain gunakan karakter *. Untuk pengecualian spesifik direktori gunakan format : domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Ketik nama domain, satu domain perbaris. Untuk pengecualian semua domain gunakan karakter *.', + 'MAIL_EXCLUSIONS' => 'Ketik nama domain, satu domain perbaris. Untuk pengecualian semua domain gunakan karakter *. Untuk pengecualian spesifik direktori gunakan format : domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Ketik nama database, satu database per baris. Untuk pengecualian semua databases gunakan *', + 'CRON_EXCLUSIONS' => 'Untuk pengecualian semua JOBS gunakan *', + 'USER_EXCLUSIONS' => 'Ketik nama direktori, satu direktori per baris. Untuk pengecualian semua direktori gunakan karakter *', 'Welcome to Vesta Control Panel' => 'Selamat datang di Panel Kontrol Vesta', 'MAIL_FROM' => 'Panel Kontrol Vesta ', @@ -469,7 +523,7 @@ $LANG['id'] = array( 'Confirm Password' => 'Konfirmasi Katakunci', 'Reset' => 'Reset', 'Reset Code' => 'Reset Kode', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Kode katakunci buat me-reset udah dikirim ke email
', 'MAIL_RESET_SUBJECT' => 'Katakunci di-reset pada %s', 'PASSWORD_RESET_REQUEST' => "Kalo mau reset katakunci panel kontrol, klik aja tautan ini:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternatively, kalo ngga ke https://%s/reset/?action=code&user=%s terus masukin kode reset-nya:\n%s\n\nKalau emang kamu ga minta reset katakunci pesan ini abaikan aja, dan maaf ya....\n\n--\nPanel Kontrol Vesta\n", @@ -487,110 +541,154 @@ $LANG['id'] = array( 'Nov' => 'Nov', 'Dec' => 'Dec', - 'Configuring Server' => 'Configuring Server', - 'Hostname' => 'Hostname', - 'Time Zone' => 'Time Zone', - 'Default Language' => 'Default Language', + 'Configuring Server' => 'Konfigurasi Server', + 'Hostname' => 'Nama Host', + 'Time Zone' => 'Zona Waktu', + 'Default Language' => 'Standar Bahasa', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', - 'preview' => 'preview', - 'Reseller Role' => 'Reseller Role', + 'preview' => 'pratinjau', + 'Reseller Role' => 'Aturan Reseller', 'Web Config Editor' => 'Web Config Editor', 'Template Manager' => 'Template Manager', 'Backup Migration Manager' => 'Backup Migration Manager', 'FileManager' => 'FileManager', 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', - 'sort by' => 'sort by', - 'Date' => 'Date', - 'Starred' => 'Starred', - 'Name' => 'Name', + 'sort by' => 'sortir', + 'Date' => 'Tanggal', + 'Starred' => 'Bintangi', + 'Name' => 'Nama', + 'File Manager' => 'File Manager', - 'type' => 'type', - 'size' => 'size', - 'date' => 'date', - 'name' => 'name', - 'Initializing' => 'Initializing', - 'UPLOAD' => 'UPLOAD', - 'NEW FILE' => 'NEW FILE', - 'NEW DIR' => 'NEW DIR', - 'DELETE' => 'DELETE', - 'RENAME' => 'RENAME', - 'COPY' => 'COPY', - 'ARCHIVE' => 'ARCHIVE', - 'EXTRACT' => 'EXTRACT', - 'DOWNLOAD' => 'DOWNLOAD', + 'size' => 'ukuran', + 'date' => 'tanggal', + 'name' => 'nama', + 'Initializing' => 'Inisialisasi', + 'UPLOAD' => 'UNGGAH', + 'NEW FILE' => 'FILE BARU', + 'NEW DIR' => 'DIREKTORI BARU', + 'DELETE' => 'HAPUS', + 'RENAME' => 'GANTI', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', + 'COPY' => 'SALIN', + 'ARCHIVE' => 'ARSIP', + 'EXTRACT' => 'EKSTRAK', + 'DOWNLOAD' => 'UNDUH', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', - 'to reload the page' => 'to reload the page', - 'Directory name cannot be empty' => 'Directory name cannot be empty', - 'File name cannot be empty' => 'File name cannot be empty', - 'No file selected' => 'No file selected', - 'No file or folder selected' => 'No file or folder selected', - 'File type not supported' => 'File type not supported', - 'Directory download not available in current version' => 'Directory download not available in current version', - 'Directory not available' => 'Directory not available', - 'Done' => 'Done', - 'Close' => 'Close', - 'Copy' => 'Copy', - 'Cancel' => 'Cancel', - 'Rename' => 'Rename', - 'Delete' => 'Delete', - 'Extract' => 'Extract', - 'Create' => 'Create', - 'Compress' => 'Compress', + 'to reload the page' => 'untuk memuat ulang halaman', + 'Directory name cannot be empty' => 'Nama Directory ga boleh kosong', + 'File name cannot be empty' => 'Nama File ga boleh kosong', + 'No file selected' => 'Ga ada file yg dipilih', + 'No file or folder selected' => 'Ga ada file atau folder yg dipilih', + 'File type not supported' => 'Tipe file ga didukung', + 'Directory download not available in current version' => 'Unduh direktori ga tersedia di versi ini', + 'Directory not available' => 'Direktori ga tersedia', + 'Done' => 'Sudah Selesai', + 'Close' => 'Tutup', + 'Copy' => 'Salin', + 'Cancel' => 'Batal', + 'Rename' => 'Ganti nama', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', + 'Delete' => 'Hapus', + 'Extract' => 'Ekstrak', + 'Create' => 'Buat', + 'Compress' => 'Kompres', 'OK' => 'OK', - 'Are you sure you want to copy' => 'Are you sure you want to copy', - 'Are you sure you want to delete' => 'Are you sure you want to delete', - 'into' => 'into', - 'existing files will be replaced' => 'existing files will be replaced', - 'Original name' => 'Original name', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', + 'Are you sure you want to copy' => 'Yakin mau disalin', + 'Are you sure you want to move' => 'Are you sure you want to move', + 'Are you sure you want to delete' => 'Yakin mau dihapus', + 'into' => 'ke', + 'existing files will be replaced' => 'file yg sudah ada akan diganti', + 'Original name' => 'Nama original', 'File' => 'File', - 'already exists' => 'already exists', - 'Create file' => 'Create file', - 'Create directory' => 'Create directory', + 'already exists' => 'sudah ada', + 'Create file' => 'Bikin file', + 'Create directory' => 'Bikin direktori', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', - 'Add New object' => 'Add New object', - 'Save Form' => 'Save Form', - 'Cancel saving form' => 'Cancel saving form', - 'Go to USER list' => 'Go to USER list', - 'Go to WEB list' => 'Go to WEB list', - 'Go to DNS list' => 'Go to DNS list', - 'Go to MAIL list' => 'Go to MAIL list', - 'Go to DB list' => 'Go to DB list', - 'Go to CRON list' => 'Go to CRON list', - 'Go to BACKUP list' => 'Go to BACKUP list', - 'Focus on search' => 'Focus on search', - 'Display/Close shortcuts' => 'Display/Close shortcuts', - 'Move backward through top menu' => 'Move backward through top menu', - 'Move forward through top menu' => 'Move forward through top menu', - 'Enter focused element' => 'Enter focused element', + 'Shortcuts' => 'Shortcuts', + 'Add New object' => 'Tambah objek baru', + 'Save Form' => 'Simpan Formulir', + 'Cancel saving form' => 'Batalkan penyimpanan form', + 'Go to USER list' => 'Ke USER list', + 'Go to WEB list' => 'Ke WEB list', + 'Go to DNS list' => 'Ke DNS list', + 'Go to MAIL list' => 'Ke MAIL list', + 'Go to DB list' => 'Ke DB list', + 'Go to CRON list' => 'Ke CRON list', + 'Go to BACKUP list' => 'Ke BACKUP list', + 'Focus on search' => 'Fokus di pencarian', + 'Display/Close shortcuts' => 'Tampilkan/tutup jalan pintas', + 'Move backward through top menu' => 'Pindah ke sebelumnya lewat menu atas', + 'Move forward through top menu' => 'Pindah ke setelahnya lewat menu atas', + 'Enter focused element' => 'Masuk ke fokus elemen', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', - 'Upload' => 'Upload', - 'New File' => 'New File', - 'New Folder' => 'New Folder', - 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', - 'Archive' => 'Archive', - 'Delete' => 'Delete', - 'Save File (in text editor)' => 'Save File (in text editor)', - 'Close Popup / Cancel' => 'Close Popup / Cancel', - 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', - 'Switch to Left Tab' => 'Switch to Left Tab', - 'Switch to Right Tab' => 'Switch to Right Tab', - 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', - 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', - 'Go to Parent Directory' => 'Go to Parent Directory', - 'Select Current File' => 'Select Current File', - 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', - 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', + 'Upload' => 'Unggah', + 'New File' => 'File baru', + 'New Folder' => 'Folder baru', + 'Download' => 'Unduh', + 'Archive' => 'Arsip', + 'Save File (in text editor)' => 'Simpan File (di text editor)', + 'Close Popup / Cancel' => 'Tutup Popup / Batal', + 'Move Cursor Up' => 'Pindahkan kursur keatas', + 'Move Cursor Down' => 'Pindahkan kursur kebawah', + 'Switch to Left Tab' => 'Pindah ke tab kiri', + 'Switch to Right Tab' => 'Pindah ke tab kanan', + 'Switch Tab' => 'Pindah Tab', + 'Go to the Top of the File List' => 'Pindah Ke atas dari Daftar File', + 'Go to the Last File' => 'Pindah File terakhir', + 'Open File / Enter Directory' => 'Buka File/Masuk ke Directory', + 'Edit File' => 'Edit File', + 'Go to Parent Directory' => 'Ke Parent Directory', + 'Select Current File' => 'Pilih File ini', + 'Select Bunch of Files' => 'Pilih Bunch of Files', + 'Add File to the Current Selection' => 'Tambahkan File di Seleksi ini', + 'Select All Files' => 'Pilih semua file', + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'jalan pintas terinspirasi oleh magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', 'Enter License Key' => 'Enter License Key', @@ -601,6 +699,34 @@ $LANG['id'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/it.php b/web/inc/i18n/it.php index 46fc8981..566d4c3c 100644 --- a/web/inc/i18n/it.php +++ b/web/inc/i18n/it.php @@ -26,6 +26,21 @@ $LANG['it'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Nuovo Utente', 'Add Domain' => 'Nuovo Dominio', 'Add Web Domain' => 'Nuovo Dominio', @@ -161,13 +176,14 @@ $LANG['it'] = array( 'Web Aliases' => 'Alias Web', 'per domain' => 'per dominio', 'DNS Domains' => 'Zone DNS', - 'DNS Domains' => 'Zone DNS', + 'DNS domains' => 'Zone DNS', 'DNS records' => 'Record DNS', 'Name Servers' => 'Name Servers', 'Mail Domains' => 'Domini Mail', 'Mail Accounts' => 'Account Mail', 'Cron Jobs' => 'Cron Jobs', 'SSH Access' => 'Accesso SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'Indirizzi IP', 'Backups' => 'Backups', 'Backup System' => 'Sistema Backup', @@ -179,10 +195,12 @@ $LANG['it'] = array( 'Proxy Extensions' => 'Estensioni Proxy', 'Web Statistics' => 'Statistiche Web', 'Additional FTP Account' => 'FTP Addizionali', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Scadenza', 'Records' => 'Record', + 'Serial' => 'Serial', 'Catchall email' => 'Catchall email', 'AntiVirus Support' => 'Supporto AntiVirus', 'AntiSpam Support' => 'Supporto AntiSpam', @@ -192,6 +210,16 @@ $LANG['it'] = array( 'Autoreply' => 'Autorisposta', 'Forward to' => 'Inoltra a', 'Do not store forwarded mail' => 'Non salvare le email inoltrate', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'database', 'User' => 'Utente', 'Host' => 'Host', @@ -213,11 +241,13 @@ $LANG['it'] = array( 'Users' => 'Utenti', 'Load Average' => 'Carico Medio', 'Memory Usage' => 'Uso Memoria', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'Utilizzo HTTPD', 'NGINX Usage' => 'Utilizzo NGINX', 'MySQL Usage on localhost' => 'Utilizzo MySQL su localhost', 'PostgreSQL Usage on localhost' => 'Utilizzo PostgreSQL su localhost', 'Bandwidth Usage eth0' => 'Utilizzo banda su eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'Utilizzo FTP', 'SSH Usage' => 'Utilizzo SSH', 'reverse proxy' => 'reverse proxy', @@ -230,6 +260,8 @@ $LANG['it'] = array( 'database server' => 'database server', 'ftp server' => 'ftp server', 'job scheduler' => 'job scheduler', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Memoria', 'Uptime' => 'Uptime', @@ -240,7 +272,6 @@ $LANG['it'] = array( 'Release' => 'Release', 'Architecture' => 'Architettura', 'Object' => 'Oggetto', - 'Owner' => 'Proprietario', 'Username' => 'Username', 'Password' => 'Password', 'Email' => 'Email', @@ -265,7 +296,7 @@ $LANG['it'] = array( 'Statistics Authorization' => 'Autorizzazione Statistiche', 'Statistics Auth' => 'Statistiche Auth', 'Account' => 'Account', - 'Prefix will be automaticaly added to username' => 'Il prefisso %s verrà automatiamente aggiunto all\'username', + 'Prefix will be automaticaly added to username' => "Il prefisso %s verrà automatiamente aggiunto all'username", 'Send FTP credentials to email' => 'Invia le credenziali FTP per email', 'Expiration Date' => 'Data di scadenza', 'YYYY-MM-DD' => 'YYYY-MM-DD', @@ -278,7 +309,7 @@ $LANG['it'] = array( 'Message' => 'Messaggio', 'use local-part' => 'usa local-part', 'one or more email addresses' => 'uno o più indirizzi email', - 'Prefix will be automaticaly added to database name and database user' => 'Il prefisso %s verrà automatiamente aggiunto al nome e all\'utente del database', + 'Prefix will be automaticaly added to database name and database user' => "Il prefisso %s verrà automatiamente aggiunto al nome e all'utente del database", 'Database' => 'Database', 'Type' => 'Tipo', 'Minute' => 'Minuto', @@ -334,6 +365,8 @@ $LANG['it'] = array( 'ftp user password' => 'ftp user password', 'ftp user' => 'ftp user', 'Last 70 lines of %s.%s.log' => 'Ultime 70 righe di %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Download AccessLog', 'Download ErrorLog' => 'Download ErrorLog', 'Country' => 'Paese', @@ -348,8 +381,26 @@ $LANG['it'] = array( 'Banlist' => 'Banlista', 'ranges are acceptable' => 'gamme sono ammessi', 'CIDR format is supported' => 'formato CIDR e supportato', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unlimited', '1 account' => '1 account', '%s accounts' => '%s account', @@ -365,6 +416,8 @@ $LANG['it'] = array( '%s cron jobs' => '%s cron jobs', '1 archive' => '1 archivio', '%s archives' => '%s archivi', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 pacchetto', '%s packages' => '%s pacchetti', '1 IP address' => '1 indirizzo IP', @@ -392,15 +445,16 @@ $LANG['it'] = array( 'PACKAGE_CREATED_OK' => 'Il pacchetto %s è stato creato con successo.', 'SSL_GENERATED_OK' => 'Il certificato e stato generato con successo.', 'RULE_CREATED_OK' => 'Regola e stato creato con successo.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Gli aggiornamenti automatici sono stati abilitati', 'Autoupdate has been successfully disabled' => 'Gli aggiornamenti automatici sono stati disabilitati', 'Cronjob email reporting has been successfully enabled' => 'Rendicontazione cronjob sono stati abilitati', 'Cronjob email reporting has been successfully disabled' => 'Rendicontazione cronjob sono stati disabilitati', 'Changes has been saved.' => 'I cambiamenti sono stati salvati.', 'Confirmation' => 'Conferma', - 'DELETE_USER_CONFIRMATION' => 'Sei sicuro di voler cancellare l\'utente %s?', - 'SUSPEND_USER_CONFIRMATION' => 'Sei sicuro di voler disabilitare l\'utente %s?', - 'UNSUSPEND_USER_CONFIRMATION' => 'Sei sicuro di voler riabilitare l\'utente %s?', + 'DELETE_USER_CONFIRMATION' => "Sei sicuro di voler cancellare l'utente %s?", + 'SUSPEND_USER_CONFIRMATION' => "Sei sicuro di voler disabilitare l'utente %s?", + 'UNSUSPEND_USER_CONFIRMATION' => "Sei sicuro di voler riabilitare l'utente %s?", 'DELETE_DOMAIN_CONFIRMATION' => 'Sei sicuro di voler cancellare il dominio %s?', 'SUSPEND_DOMAIN_CONFIRMATION' => 'Sei sicuro di voler disabilitare il dominio %s?', 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'Sei sicuro di voler riabilitare il dominio %s?', @@ -417,46 +471,46 @@ $LANG['it'] = array( 'SUSPEND_CRON_CONFIRMATION' => 'Sei sicuro di voler disabilitare il cron job?', 'UNSUSPEND_CRON_CONFIRMATION' => 'Sei sicuro di voler riabilitare il cron job?', 'DELETE_BACKUP_CONFIRMATION' => 'Sei sicuro di voler cancellare il backup %s?', - 'DELETE_EXCLUSION_CONFIRMATION' => 'Sei sicuro di voler cancellare l\'esclusione %s?', + 'DELETE_EXCLUSION_CONFIRMATION' => "Sei sicuro di voler cancellare l'esclusione %s?", 'DELETE_PACKAGE_CONFIRMATION' => 'Sei sicuro di voler cancellare il pacchetto %s?', - 'DELETE_IP_CONFIRMATION' => 'Sei sicuro di voler l\'indirizoz IP %s?', + 'DELETE_IP_CONFIRMATION' => "Sei sicuro di voler l'indirizoz IP %s?", 'DELETE_RULE_CONFIRMATION' => 'Sei sicuro di voler cancellare il regola #%s?', 'SUSPEND_RULE_CONFIRMATION' => 'Sei sicuro di voler disabilitare il regola #%s?', 'UNSUSPEND_RULE_CONFIRMATION' => 'Sei sicuro di voler riabilitare il regola #%s?', 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', 'RESTART_CONFIRMATION' => 'Sei sicuro di voler riavviare %s?', 'Welcome' => 'Benvenuto', - 'LOGGED_IN_AS' => 'Connesso come l\'utente %s', + 'LOGGED_IN_AS' => "Connesso come l'utente %s", 'Error' => 'Errore', 'Invalid username or password' => 'Username o password non validi', 'Invalid username or code' => 'Esername o codice non validi', 'Passwords not match' => 'Le passwords non coincidono', - 'Please enter valid email address.' => 'Inserisci un\'indirizzo email valido.', + 'Please enter valid email address.' => "Inserisci un'indirizzo email valido.", 'Field "%s" can not be blank.' => 'Il campo "%s" non può essere lasciato vuoto.', 'Password is too short.' => 'La password è troppo corta (minimo 6 caratteri)', 'Error code:' => 'Codice errore: %s', 'SERVICE_ACTION_FAILED' => '"%s" "%s" fallita', - 'IP address is in use' => 'L\'indirizzo IP è già in uso', - 'BACKUP_SCHEDULED' => 'L\'operazione è stata aggiunta alla coda. Riceverai una notifica via email quando il tuo backup sarà pronto per il download.', + 'IP address is in use' => "L'indirizzo IP è già in uso", + 'BACKUP_SCHEDULED' => "L'operazione è stata aggiunta alla coda. Riceverai una notifica via email quando il tuo backup sarà pronto per il download.", 'BACKUP_EXISTS' => 'È già in corso la creazione di un backup. Perfavore attendi che il backup finisca.', - 'RESTORE_SCHEDULED' => 'L\'operazione è stata aggiunta alla coda. Riceverai una notifica via email quando il tuo backup sarà pronto per il download.', - 'RESTORE_EXISTS' => 'È già in corso un\'oprazione di ripristino. Attendi che finisca prima di rilanciarla nuovamento.', + 'RESTORE_SCHEDULED' => "L'operazione è stata aggiunta alla coda. Riceverai una notifica via email quando il tuo backup sarà pronto per il download.", + 'RESTORE_EXISTS' => "È già in corso un'oprazione di ripristino. Attendi che finisca prima di rilanciarla nuovamento.", - 'WEB_EXCLUSIONS' => "Scrivi un nome di dominio per riga. Per escludere tutti i domini usa *. Per escludere directory specifiche usa il formato: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Scrivi un nome di dominio per riga. Per escludere tutti i domini usa *", - 'MAIL_EXCLUSIONS' => "Scrivi un nome di dominio per riga. Per escludere tutti i domini usa *. Per escludere account specifici usare il formato: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Scrivi un nome completo di database per riga. Per escludere tutti i database usa *", - 'CRON_EXCLUSIONS' => "Per escludere tutti i cron job usa *", - 'USER_EXCLUSIONS' => "Scrivi un nome di directory per riga. Per escludere tutte le directory usa *", + 'WEB_EXCLUSIONS' => 'Scrivi un nome di dominio per riga. Per escludere tutti i domini usa *. Per escludere directory specifiche usa il formato: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Scrivi un nome di dominio per riga. Per escludere tutti i domini usa *', + 'MAIL_EXCLUSIONS' => 'Scrivi un nome di dominio per riga. Per escludere tutti i domini usa *. Per escludere account specifici usare il formato: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Scrivi un nome completo di database per riga. Per escludere tutti i database usa *', + 'CRON_EXCLUSIONS' => 'Per escludere tutti i cron job usa *', + 'USER_EXCLUSIONS' => 'Scrivi un nome di directory per riga. Per escludere tutte le directory usa *', 'Welcome to Vesta Control Panel' => 'Benvenuto nel Vesta Control Panel', 'MAIL_FROM' => 'Vesta Control Panel ', 'GREETINGS_GORDON_FREEMAN' => "Ciao, %s %s,\n", 'GREETINGS' => "Ciao,\n", - 'ACCOUNT_READY' => "Il tuo account è stato creato ed è pronto per l\'utilizzo.\n\nhttps://%s/login/\nUsername: %s\nPassword: %s\n\n--\nVesta Control Panel\n", + 'ACCOUNT_READY' => "Il tuo account è stato creato ed è pronto per l'utilizzo.\n\nhttps://%s/login/\nUsername: %s\nPassword: %s\n\n--\nVesta Control Panel\n", 'FTP login credentials' => 'Credenziali login FTP', - 'FTP_ACCOUNT_READY' => "L\'account FTP è stato creato ed è pronto per l\'uso.\n\nHostname: %s\nUsername: %s_%s\nPassword: %s\n\n--\nVesta Control Panel\n", + 'FTP_ACCOUNT_READY' => "L'account FTP è stato creato ed è pronto per l'uso.\n\nHostname: %s\nUsername: %s_%s\nPassword: %s\n\n--\nVesta Control Panel\n", 'Database Credentials' => 'Credenziali Database', 'DATABASE_READY' => "Il database è stato creato con successo.\n\nDatabase: %s\nUser: %s\nPassword: %s\n%s\n\n--\nVesta Control Panel\n", @@ -467,7 +521,7 @@ $LANG['it'] = array( 'Confirm Password' => 'Conferma Password', 'Reset' => 'Reset', 'Reset Code' => 'Codice Reset', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Il codice di reset per la tua password ti è stato inviato per email
', 'MAIL_RESET_SUBJECT' => 'Password Reset per %s', 'PASSWORD_RESET_REQUEST' => "Per fare il reset della password per il pannello di controllo clicca sul link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternativamente puoi andare su https://%s/reset/?action=code&user=%s e inserire questo codice di reset:\n%s\n\nSe non hai richiesto il reset della tua password, ignora questa email.\n\n--\nVesta Control Panel\n", @@ -489,6 +543,29 @@ $LANG['it'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Time Zone', 'Default Language' => 'Default Language', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'preview', @@ -504,8 +581,8 @@ $LANG['it'] = array( 'Starred' => 'Starred', 'Name' => 'Name', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -515,10 +592,13 @@ $LANG['it'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -533,12 +613,20 @@ $LANG['it'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -547,7 +635,17 @@ $LANG['it'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -563,31 +661,31 @@ $LANG['it'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -599,6 +697,34 @@ $LANG['it'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/ja.php b/web/inc/i18n/ja.php index 7f664cb1..459f948f 100644 --- a/web/inc/i18n/ja.php +++ b/web/inc/i18n/ja.php @@ -25,6 +25,21 @@ $LANG['ja'] = array( 'CRON' => 'Cron', 'BACKUP' => 'バックアップ', + 'LOGIN' => 'ログイン', + 'RESET PASSWORD' => 'パスワードのリセット', + 'SEARCH' => '検索', + 'PACKAGE' => 'パッケージ', + 'RRD' => 'RRD', + 'STATS' => '統計', + 'LOG' => 'ログ', + 'UPDATES' => '更新', + 'FIREWALL' => 'ファイアウォール', + 'SERVER' => 'サーバー', + 'MEMORY' => 'メモリ', + 'DISK' => 'ディスク', + 'NETWORK' => 'ネットワーク', + 'Web Log Manager' => 'ウェブログの管理', + 'Add User' => 'ユーザーを追加', 'Add Domain' => 'ドメインを追加', 'Add Web Domain' => 'ウェブドメインを追加', @@ -40,13 +55,13 @@ $LANG['ja'] = array( 'Add Package' => 'パッケージを追加', 'Add IP' => 'IPアドレスを追加', 'Add Rule' => '規則を追加', - 'Ban IP Address' => 'BANされているIPアドレス', + 'Ban IP Address' => 'IPアドレスをBANリストに追加', 'Search' => '検索', 'Add one more FTP Account' => 'FTPアカウントを追加', 'Overall Statistics' => '全統計', - 'Daily' => '日別', - 'Weekly' => '週別', - 'Monthly' => '月別', + 'Daily' => '日毎', + 'Weekly' => '週毎', + 'Monthly' => '月毎', 'Yearly' => '年別', 'Add' => '追加', 'Back' => '戻る', @@ -160,13 +175,14 @@ $LANG['ja'] = array( 'Web Aliases' => 'ウェブエイリアス', 'per domain' => 'ドメインごと', 'DNS Domains' => 'DNSドメイン', - 'DNS Domains' => 'DNSドメイン', + 'DNS domains' => 'DNSドメイン', 'DNS records' => 'DNSレコード', 'Name Servers' => 'ネームサーバー', 'Mail Domains' => 'メールドメイン', 'Mail Accounts' => 'メールアカウント', 'Cron Jobs' => 'Cronジョブ', 'SSH Access' => 'SSHアクセス', + 'IP Address' => 'IPアドレス', 'IP Addresses' => 'IPアドレス', 'Backups' => 'バックアップ', 'Backup System' => 'システムをバックアップ', @@ -178,10 +194,12 @@ $LANG['ja'] = array( 'Proxy Extensions' => 'プロキシ対象拡張子', 'Web Statistics' => 'ウェブアクセス統計', 'Additional FTP Account' => '追加のFTPアカウント', + 'Path' => 'パス', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => '有効期限', 'Records' => 'レコード', + 'Serial' => 'シリアル値', 'Catchall email' => 'キャッチオール アドレス', 'AntiVirus Support' => 'アンチウイルスのサポート', 'AntiSpam Support' => 'アンチスパムのサポート', @@ -190,7 +208,17 @@ $LANG['ja'] = array( 'Quota' => '割り当て量', 'Autoreply' => '自動返信', 'Forward to' => '転送先', - 'Do not store forwarded mail' => '転送されたメールを保存しない', + 'Do not store forwarded mail' => '転送されたメールを保存しない', + 'IMAP hostname' => 'IMAPホスト名', + 'IMAP port' => 'IMAPポート番号', + 'IMAP security' => 'IMAPセキュリティ', + 'IMAP auth method' => 'IMAP認証方式', + 'SMTP hostname' => 'SMTPホスト名', + 'SMTP port' => 'SMTPポート番号', + 'SMTP security' => 'SMTPセキュリティ', + 'SMTP auth method' => 'SMTPIMAP認証方式', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => '通常のパスワード認証', 'database' => 'データベース', 'User' => 'ユーザー', 'Host' => 'ホスト', @@ -206,17 +234,19 @@ $LANG['ja'] = array( 'SYS' => 'SYS', 'Domains' => 'ドメイン', 'Status' => '状態', - 'shared' => '共用', - 'dedicated' => '専用', + 'shared' => '共有', + 'dedicated' => '専有', 'Owner' => '所有者', - 'Users' => 'ユーザー', + 'Users' => '使用者', 'Load Average' => 'ロードアベレージ', 'Memory Usage' => 'メモリ使用量', + 'APACHE2 Usage' => 'APACHE2使用量', 'HTTPD Usage' => 'HTTPD使用量', 'NGINX Usage' => 'NGINX使用量', 'MySQL Usage on localhost' => 'localhostにおけるMySQLの使用量', 'PostgreSQL Usage on localhost' => 'localhostにおけるPostgreSQLの使用量', 'Bandwidth Usage eth0' => 'eth0における帯域幅使用量', + 'Exim Usage' => 'Exim使用量', 'FTP Usage' => 'FTP使用量', 'SSH Usage' => 'SSH使用量', 'reverse proxy' => 'リバースプロキシ', @@ -228,7 +258,9 @@ $LANG['ja'] = array( 'email antispam' => 'アンチスパム', 'database server' => 'データベースサーバー', 'ftp server' => 'FTPサーバー', - 'job scheduler' => 'ジョブ スケジューラ', + 'job scheduler' => 'ジョブスケジューラ', + 'firewall' => 'ファイアウォール', + 'brute-force monitor' => 'ブルートフォースモニタ', 'CPU' => 'CPU', 'Memory' => 'メモリ', 'Uptime' => '稼働時間', @@ -239,7 +271,6 @@ $LANG['ja'] = array( 'Release' => 'リリース', 'Architecture' => 'アーキテクチャ', 'Object' => 'オブジェクト', - 'Owner' => '所有者', 'Username' => 'ユーザー名', 'Password' => 'パスワード', 'Email' => 'メールアドレス', @@ -247,7 +278,7 @@ $LANG['ja'] = array( 'Language' => '言語', 'First Name' => '名', 'Last Name' => '姓', - 'Send login credentials to email address' => 'ログイン情報をメールアドレスに送信', + 'Send login credentials to email address' => 'アカウント情報をメールアドレスに送信', 'Default Template' => '規定のテンプレート', 'Default Name Servers' => '規定のネームサーバー', 'Domain' => 'ドメイン', @@ -257,7 +288,7 @@ $LANG['ja'] = array( 'Aliases' => 'エイリアス', 'SSL Certificate' => 'SSL証明書', 'SSL Key' => 'SSL鍵', - 'SSL Certificate Authority / Intermediate' => 'SSL認証局', + 'SSL Certificate Authority / Intermediate' => 'SSL(中間)認証局', 'SSL CSR' => 'SSL証明書署名要求', 'optional' => '任意', 'internal' => '内部', @@ -265,7 +296,7 @@ $LANG['ja'] = array( 'Statistics Auth' => '統計の認証', 'Account' => 'アカウント', 'Prefix will be automaticaly added to username' => 'ユーザー名には接頭辞 %s が自動的に付加されます', - 'Send FTP credentials to email' => 'FTPログイン情報をメールアドレスに送信', + 'Send FTP credentials to email' => 'FTPアカウント情報をメールアドレスに送信', 'Expiration Date' => '有効期限', 'YYYY-MM-DD' => 'YYYY-MM-DD', 'Name servers' => 'ネームサーバー', @@ -275,7 +306,7 @@ $LANG['ja'] = array( 'Record Number' => 'レコード番号', 'in megabytes' => 'MB単位', 'Message' => 'メッセージ', - 'use local-part' => 'ローカルパートを使用', + 'use local-part' => 'ローカルパートを記述', 'one or more email addresses' => '1つ以上のメールアドレス', 'Prefix will be automaticaly added to database name and database user' => 'データベース名およびユーザー名には接頭辞 %s が自動的に付加されます', 'Database' => 'データベース', @@ -285,10 +316,10 @@ $LANG['ja'] = array( 'Package Name' => 'パッケージ名', 'Netmask' => 'ネットマスク', 'Interface' => 'インターフェイス', - 'Shared' => '共用', + 'Shared' => '共有', 'Assigned user' => '割り当てユーザー', 'Assigned domain' => '割り当てドメイン', - 'NAT IP association' => 'NAT IP 割り当て', + 'NAT IP association' => 'NAT IP割り当て', 'shell' => 'シェル', 'web domains' => 'ウェブドメイン', 'web aliases' => 'ウェブエイリアス', @@ -332,9 +363,11 @@ $LANG['ja'] = array( 'stats password' => 'statsパスワード', 'ftp user password' => 'FTPユーザーパスワード', 'ftp user' => 'FTPユーザー', - 'Last 70 lines of %s.%s.log' => '%s.%s.log の最新70行', - 'Download AccessLog' => 'AccessLogをダウンロード', - 'Download ErrorLog' => 'ErrorLogをダウンロード', + 'Last 70 lines of %s.%s.log' => '%s.%s.log の最終70行', + 'AccessLog' => 'アクセスログ', + 'ErrorLog' => 'エラーログ', + 'Download AccessLog' => 'アクセスログをダウンロード', + 'Download ErrorLog' => 'エラーログをダウンロード', 'Country' => '国', '2 letter code' => '2レターコード', 'State / Province' => '州 / 都道府県', @@ -347,8 +380,26 @@ $LANG['ja'] = array( 'Banlist' => 'BANリスト', 'ranges are acceptable' => '範囲指定が可能です', 'CIDR format is supported' => 'CIDRフォーマットが使用できます', + 'ACCEPT' => '許可', + 'DROP' => '拒否', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'ネームサーバーを追加', + 'web domain' => 'ウェブドメイン', + 'dns domain' => 'DNSドメイン', + 'dns record' => 'DNSレコード', + 'mail domain' => 'メールドメイン', + 'mail account' => 'メールアカウント', + 'cron job' => 'Cronジョブ', + + 'cron' => 'Cron', + 'user dir' => 'ユーザーディレクトリ', + 'unlimited' => '無制限', '1 account' => '1個のアカウント', '%s accounts' => '%s個のアカウント', @@ -364,6 +415,8 @@ $LANG['ja'] = array( '%s cron jobs' => '%s個のCronジョブ', '1 archive' => '1個のアーカイブ', '%s archives' => '%s個のアーカイブ', + '1 item' => '1個の項目', + '%s items' => '%s個の項目', '1 package' => '1個のパッケージ', '%s packages' => '%s個のパッケージ', '1 IP address' => '1個のIPアドレス', @@ -377,7 +430,7 @@ $LANG['ja'] = array( 'no exclusions' => '除外しない', '1 rule' => '1個の規則', '%s rules' => '%s個の規則', - 'There are no currently banned IP' => '現在BANされているIPはありません', + 'There are no currently banned IP' => '現在BANされているIPアドレスはありません', 'USER_CREATED_OK' => 'ユーザー %s は正常に作成されました', 'WEB_DOMAIN_CREATED_OK' => 'ドメイン %s は正常に作成されました', @@ -391,6 +444,7 @@ $LANG['ja'] = array( 'PACKAGE_CREATED_OK' => 'パッケージ %s は正常に作成されました', 'SSL_GENERATED_OK' => '証明書は正常に生成されました', 'RULE_CREATED_OK' => '規則は正常に作成されました', + 'BANLIST_CREATED_OK' => 'IPアドレスは正常にBANリストに追加されました', // I'm not sure about this text 'Autoupdate has been successfully enabled' => '自動更新が有効化されました', 'Autoupdate has been successfully disabled' => '自動更新が無効化されました', 'Cronjob email reporting has been successfully enabled' => 'Cronジョブのメール報告が有効化されました', @@ -435,18 +489,18 @@ $LANG['ja'] = array( 'Password is too short.' => 'パスワードが短すぎます(少なくとも6文字必要です)', 'Error code:' => 'エラーコード: %s', 'SERVICE_ACTION_FAILED' => '"%s" "%s" に失敗しました', - 'IP address is in use' => 'IPアドレスは既に使われています', + 'IP address is in use' => 'IPアドレスは使用中です', 'BACKUP_SCHEDULED' => 'タスクがキューに追加されました バックアップがダウンロード可能になると、メールによる通知が送信されます', - 'BACKUP_EXISTS' => '現在バックアップが実行中です バックアップが完了するまでお待ちください', - 'RESTORE_SCHEDULED' => 'タスクがキューに追加されました 復元が完了するとメールによる通知が送信されます', - 'RESTORE_EXISTS' => '現在復元作業が実行中です 再度操作を行う前に復元作業が完了するまでお待ちください', + 'BACKUP_EXISTS' => '現在バックアップを実行中です バックアップが完了するまでお待ちください', + 'RESTORE_SCHEDULED' => 'タスクがキューに追加されました 復元が完了すると、メールによる通知が送信されます', + 'RESTORE_EXISTS' => '現在復元作業を実行中です 再度操作を行う前に復元作業が完了するまでお待ちください', - 'WEB_EXCLUSIONS' => "ドメイン名を一行ずつ入力してください すべてのドメインを除外するには*を使用してください 特定のディレクトリを除外するには次の形式を用いてください: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "ドメイン名を一行ずつ入力してください すべてのドメインを除外するには*を使用してください", - 'MAIL_EXCLUSIONS' => "ドメイン名を一行ずつ入力してください すべてのドメインを除外するには*を使用してください 特定のアカウントを除外するには次の形式を用いてください: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "完全なデータベース名を一行ずつ入力してください すべてのデータベースを除外するには*を使用してください", - 'CRON_EXCLUSIONS' => "すべてのジョブを除外するには*を使用してください", - 'USER_EXCLUSIONS' => "ディレクトリ名を一行ずつ入力してください すべてのディレクトリを除外するには*を使用してください", + 'WEB_EXCLUSIONS' => 'ドメイン名を一行ずつ入力してください すべてのドメインを除外するには*を使用してください 特定のディレクトリを除外するには次の形式を用いてください: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'ドメイン名を一行ずつ入力してください すべてのドメインを除外するには*を使用してください', + 'MAIL_EXCLUSIONS' => 'ドメイン名を一行ずつ入力してください すべてのドメインを除外するには*を使用してください 特定のアカウントを除外するには次の形式を用いてください: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => '完全なデータベース名を一行ずつ入力してください すべてのデータベースを除外するには*を使用してください', + 'CRON_EXCLUSIONS' => 'すべてのジョブを除外するには*を使用してください', + 'USER_EXCLUSIONS' => 'ディレクトリ名を一行ずつ入力してください すべてのディレクトリを除外するには*を使用してください', 'Welcome to Vesta Control Panel' => 'Vesta Control Panel にようこそ', 'MAIL_FROM' => 'Vesta Control Panel ', @@ -454,10 +508,10 @@ $LANG['ja'] = array( 'GREETINGS' => "こんにちは\n", 'ACCOUNT_READY' => "アカウントは正常に作成され、使用する準備ができました\n\nhttps://%s/login/\nユーザー名: %s\nパスワード: %s\n\n--\nVesta Control Panel\n", - 'FTP login credentials' => 'FTPログイン情報', + 'FTP login credentials' => 'FTPアカウント情報', 'FTP_ACCOUNT_READY' => "FTPアカウントは正常に作成され、使用する準備ができました\n\nホスト名: %s\nユーザー名: %s_%s\nパスワード: %s\n\n--\nVesta Control Panel\n", - 'Database Credentials' => 'データベースログイン情報', + 'Database Credentials' => 'データベースアカウント情報', 'DATABASE_READY' => "データベースは正常に作成されました\n\nデータベース名: %s\nユーザー名: %s\nパスワード: %s\n%s\n\n--\nVesta Control Panel\n", 'forgot password' => 'パスワードを忘れた場合', @@ -466,7 +520,7 @@ $LANG['ja'] = array( 'Confirm Password' => 'パスワードを再入力', 'Reset' => 'リセット', 'Reset Code' => 'リセットコード', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => '登録されたメールアドレスにパスワードのリセットコードが送信されました
', 'MAIL_RESET_SUBJECT' => '%s のパスワードのリセット', 'PASSWORD_RESET_REQUEST' => "コントロールパネルのパスワードをリセットするには、以下のリンクの手順に従ってください\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nもしくは、次のリンク( https://%s/reset/?action=code&user=%s )で以下のリセットコードを入力することもできます\n%s\n\nもしパスワードのリセットを要求していない場合は、このメールを無視してください\n\n--\nVesta Control Panel\n", @@ -488,7 +542,30 @@ $LANG['ja'] = array( 'Hostname' => 'ホスト名', 'Time Zone' => 'タイムゾーン', 'Default Language' => '規定の言語', - 'FileSystem Disk Quota ' => 'ディスク割り当て量', + 'Proxy Server' => 'プロキシサーバー', + 'Web Server' => 'ウェブサーバー', + 'Backend Server' => 'バックエンドサーバー', + 'Backend Pool Mode' => 'バックエンドプールモード', + 'DNS Server' => 'DNSサーバー', + 'DNS Cluster' => 'DNSクラスタ', + 'MAIL Server' => 'メールサーバー', + 'Antivirus' => 'アンチウイルス', + 'AntiSpam' => 'アンチスパム', + 'Webmail URL' => 'ウェブメールのURL', + 'MySQL Support' => 'MySQLのサポート', + 'phpMyAdmin URL' => 'phpMyAdminのURL', + 'PostgreSQL Support' => 'PostgreSQLのサポート', + 'phpPgAdmin URL' => 'phpPgAdminのURL', + 'Maximum Number Of Databases' => '最大データベース数', + 'Current Number Of Databases' => '現在のデータベース数', + 'Local backup' => 'ローカルバックアップ', + 'Compression level' => '圧縮レベル', + 'Directory' => 'ディレクトリ', + 'Remote backup' => 'リモートバックアップ', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => 'ディスク容量制限', 'Vesta Control Panel Plugins' => 'Vesta Control Panel プラグイン', 'preview' => 'プレビュー', 'Reseller Role' => 'リセラーの役割', @@ -496,28 +573,31 @@ $LANG['ja'] = array( 'Template Manager' => 'テンプレートマネージャー', 'Backup Migration Manager' => 'バックアップ移行マネージャー', 'FileManager' => 'ファイルマネージャー', - 'show: CPU / MEM / NET / DISK' => '表示: CPU / MEM / NET / DISK', + 'show: CPU / MEM / NET / DISK' => 'CPU / MEM / NET / DISK を表示', 'sort by' => 'ソート', 'Date' => '日付', 'Starred' => 'スター付き', 'Name' => '名前', + 'File Manager' => 'ファイルマネージャー', - 'type' => '種類', 'size' => '容量', 'date' => '日付', 'name' => '名前', 'Initializing' => '初期化中', 'UPLOAD' => 'アップロード', - 'NEW FILE' => '新規ファイル', - 'NEW DIR' => '新規ディレクトリ', + 'NEW FILE' => 'ファイルの作成', + 'NEW DIR' => 'ディレクトリの作成', 'DELETE' => '削除', 'RENAME' => '名前の変更', + 'MOVE' => 'MOVE', + 'RIGHTS' => '権限', 'COPY' => 'コピー', 'ARCHIVE' => 'アーカイブ', 'EXTRACT' => '展開', 'DOWNLOAD' => 'ダウンロード', + 'Are you sure?' => 'よろしいですか?', // unused? 'Hit' => '', 'to reload the page' => 'を押すとページを再読み込みします', 'Directory name cannot be empty' => 'ディレクトリ名を入力してください', @@ -531,60 +611,78 @@ $LANG['ja'] = array( 'Close' => '閉じる', 'Copy' => 'コピー', 'Cancel' => 'キャンセル', - 'Rename' => '名前を変更', + 'Rename' => '名前の変更', + 'Move' => 'Move', + 'Change Rights' => '権限の変更', 'Delete' => '削除', 'Extract' => '展開', 'Create' => '作成', 'Compress' => '圧縮', 'OK' => 'OK', + 'YOU ARE COPYING' => 'コピー中', // unused? + 'YOU ARE REMOVING' => '削除中', + 'Delete items' => '項目の削除', + 'Copy files' => 'ファイルのコピー', + 'Move files' => 'Move files', 'Are you sure you want to copy' => '次のファイルをコピーしてもよろしいですか', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => '次のファイルを削除してもよろしいですか', 'into' => 'から', - 'existing files will be replaced' => '既に存在するファイルは置き換えられます', + 'existing files will be replaced' => '既存のファイルは置き換えられます', 'Original name' => '元の名前', 'File' => 'ファイル', 'already exists' => 'は既に存在します', 'Create file' => 'ファイルの作成', 'Create directory' => 'ディレクトリの作成', + 'read by owner' => '所有者による読み取り', + 'write by owner' => '所有者による書き込み', + 'execute/search by owner' => '所有者による実行・検索', + 'read by group' => 'グループによる読み取り', + 'write by group' => 'グループによる書き込み', + 'execute/search by group' => 'グループによる実行・検索', + 'read by others' => 'その他による読み取り', + 'write by others' => 'その他による書き込み', + 'execute/search by others' => 'その他による実行・検索', + 'Shortcuts' => 'ショートカット', 'Add New object' => '新しい項目を追加する', 'Save Form' => '変更を保存する', 'Cancel saving form' => '変更を破棄する', - 'Go to USER list' => 'ユーザーの一覧に移動', - 'Go to WEB list' => 'ウェブの一覧に移動', - 'Go to DNS list' => 'DNSの一覧に移動', - 'Go to MAIL list' => 'メールの一覧に移動', - 'Go to DB list' => 'データベースの一覧に移動', - 'Go to CRON list' => 'CRONの一覧に移動', - 'Go to BACKUP list' => 'バックアップの一覧に移動', + 'Go to USER list' => 'ユーザーの一覧に移動する', + 'Go to WEB list' => 'ウェブの一覧に移動する', + 'Go to DNS list' => 'DNSの一覧に移動する', + 'Go to MAIL list' => 'メールの一覧に移動する', + 'Go to DB list' => 'データベースの一覧に移動する', + 'Go to CRON list' => 'Cronの一覧に移動する', + 'Go to BACKUP list' => 'バックアップの一覧に移動する', 'Focus on search' => '検索欄にフォーカスする', 'Display/Close shortcuts' => 'ショートカットの表示を切り替える', - 'Move backward through top menu' => '上部のメニューにおいて後方の項目に移動します', - 'Move forward through top menu' => '上部のメニューにおいて前方の項目に移動します', - 'Enter focused element' => 'フォーカスされた項目に入ります', + 'Move backward through top menu' => '上部のメニューにおいて後方の項目に移動する', + 'Move forward through top menu' => '上部のメニューにおいて前方の項目に移動する', + 'Enter focused element' => 'フォーカスされた項目に入る', + 'Move up through elements list' => 'リストの1つ上の項目を選択する', + 'Move down through elements list' => 'リストの1つ下の項目を選択する', 'Upload' => 'アップロード', 'New File' => 'ファイルの作成', 'New Folder' => 'フォルダの作成', 'Download' => 'ダウンロード', - 'Rename' => '名前の変更', - 'Copy' => 'コピー', 'Archive' => 'アーカイブ', - 'Delete' => '削除', - 'Save File (in text editor)' => 'ファイルの保存(テキストエディタ上で)', + 'Save File (in text editor)' => 'ファイルを保存する(テキストエディタ上で)', 'Close Popup / Cancel' => 'ポップアップを閉じる / キャンセルする', 'Move Cursor Up' => 'カーソルを上に移動する', - 'Move Cursor Dow' => 'カーソルを下に移動する', + 'Move Cursor Down' => 'カーソルを下に移動する', 'Switch to Left Tab' => '左のタブに切り替える', 'Switch to Right Tab' => '右のタブに切り替える', 'Switch Tab' => 'タブを切り替える', - 'Go to the Top of File List' => 'ファイルリストの先頭に移動する', + 'Go to the Top of the File List' => 'ファイルリストの先頭に移動する', 'Go to the Last File' => '最後のファイルに移動する', - 'Open File/Enter Directory' => 'ファイルを開く / ディレクトリに入る', + 'Open File / Enter Directory' => 'ファイルを開く / ディレクトリに入る', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => '親ディレクトリに移動する', 'Select Current File' => 'ファイルを選択する', 'Select Bunch of Files' => 'ファイルを範囲選択する', - 'Append File to the Current Selection' => 'ファイルを追加選択する', + 'Add File to the Current Selection' => 'ファイルを追加選択する', 'Select All Files' => 'すべてのファイルを選択する', 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', @@ -598,6 +696,34 @@ $LANG['ja'] = array( 'Licence Deactivated' => 'ライセンスが無効化されました', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'ユーザーによるSSHの使用を禁止し、各自のホームディレクトリにのみアクセスできるように制限します', 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => '高機能なファイルマネージャーを用いてウェブ上のファイルを閲覧、コピー、編集、表示、復旧できます', - '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.' => 'この機能は有償で、有効化するにはライセンスキーを購入する必要があります', + + 'Minutes' => '分毎', + 'Hourly' => '時間毎', + 'Run Command' => '実行時', + 'every month' => '毎月', + 'every odd month' => '奇数月', + 'every even month' => '偶数月', + 'every day' => '毎日', + 'every odd day' => '奇数日', + 'every even day' => '偶数日', + 'weekdays (5 days)' => '週日(5日)', + 'weekend (2 days)' => '土日(2日)', + 'Monday' => '月曜日', + 'Tuesday' => '火曜日', + 'Wednesday' => '水曜日', + 'Thursday' => '木曜日', + 'Friday' => '金曜日', + 'Saturday' => '土曜日', + 'Sunday' => '日曜日', + 'every hour' => '毎時', + 'every two hours' => '2時間毎', + 'every minute' => '毎分', + 'every two minutes' => '2分毎', + 'every' => '毎', + 'Generate' => '生成', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', ); diff --git a/web/inc/i18n/nl.php b/web/inc/i18n/nl.php index 96e6ad57..9cd78966 100644 --- a/web/inc/i18n/nl.php +++ b/web/inc/i18n/nl.php @@ -26,6 +26,21 @@ $LANG['nl'] = array( 'CRON' => 'Taken', 'BACKUP' => 'Back-up', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Gebruiker toevoegen', 'Add Domain' => 'Domein toevoegen', 'Add Web Domain' => 'Domein toevoegen', @@ -42,8 +57,8 @@ $LANG['nl'] = array( 'Add IP' => 'IP toevoegen', 'Add Rule' => 'Regel toevoegen', 'Ban IP Address' => 'IP toevoegen', - 'Add one more FTP Account' => 'Extra FTP-account toevoegen', 'Search' => 'Zoeken', + 'Add one more FTP Account' => 'Extra FTP-account toevoegen', 'Overall Statistics' => 'Globale statistieken', 'Daily' => 'Dagelijks', 'Weekly' => 'Wekelijks', @@ -54,7 +69,7 @@ $LANG['nl'] = array( 'Save' => 'Opslaan', 'Submit' => 'Versturen', - 'toggle all' => '(de)selecteer alles', + 'toggle all' => 'alles', 'apply to selected' => 'met geselecteerde', 'rebuild' => 'herstellen', 'rebuild web' => 'herstel web', @@ -160,14 +175,15 @@ $LANG['nl'] = array( 'SSL Domains' => 'SSL Domeinen', 'Web Aliases' => 'Web Aliassen', 'per domain' => 'per domein', - 'DNS Domains' => 'DNS domeinen', - 'DNS Domains' => 'DNS domeinen', - 'DNS records' => 'DNS records' , + 'DNS Domains' => 'DNS Domeinen', + 'DNS domains' => 'DNS domeinen', + 'DNS records' => 'DNS records', 'Name Servers' => 'Naamservers', 'Mail Domains' => 'E-mail Domeinen', 'Mail Accounts' => 'E-mail Accounts', 'Cron Jobs' => 'Geplande Taken', 'SSH Access' => 'SSH Toegang', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP-adressen', 'Backups' => 'Back-ups', 'Backup System' => 'Back-up Systeem', @@ -179,10 +195,12 @@ $LANG['nl'] = array( 'Proxy Extensions' => 'Proxy Extensies', 'Web Statistics' => 'Web Statistieken', 'Additional FTP Account' => 'Extra FTP Account', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Loopt af', 'Records' => 'Records', + 'Serial' => 'Serial', 'Catchall email' => 'Catch-all e-mail', 'AntiVirus Support' => 'Antivirus Ondersteuning', 'AntiSpam Support' => 'Antispam Ondersteuning', @@ -192,6 +210,16 @@ $LANG['nl'] = array( 'Autoreply' => 'Auto-antwoord', 'Forward to' => 'Doorsturen naar', 'Do not store forwarded mail' => 'Doorgestuurde e-mail niet opslaan', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'database', 'User' => 'Gebruiker', 'Host' => 'Host', @@ -213,11 +241,13 @@ $LANG['nl'] = array( 'Users' => 'Gebruikers', 'Load Average' => 'Gemiddelde Belasting', 'Memory Usage' => 'Geheugengebruik', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD Gebruik', 'NGINX Usage' => 'NGINX Gebruik', 'MySQL Usage on localhost' => 'MySQL Gebruik op localhost', 'PostgreSQL Usage on localhost' => 'PostgreSQL Gebruik op localhost', 'Bandwidth Usage eth0' => 'Bandbreedtegebruik eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP Gebruik', 'SSH Usage' => 'SSH Gebruik', 'reverse proxy' => 'reverse proxy', @@ -230,6 +260,8 @@ $LANG['nl'] = array( 'database server' => 'database server', 'ftp server' => 'ftp server', 'job scheduler' => 'taakplanner', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Geheugen', 'Uptime' => 'Uptime', @@ -240,7 +272,6 @@ $LANG['nl'] = array( 'Release' => 'Uitgave', 'Architecture' => 'Architectuur', 'Object' => 'Object', - 'Owner' => 'Eigenaar', 'Username' => 'Gebruikersnaam', 'Password' => 'Wachtwoord', 'Email' => 'Email', @@ -334,6 +365,8 @@ $LANG['nl'] = array( 'ftp user password' => 'FTP gebruikerswachtwoord', 'ftp user' => 'FTP gebruiker', 'Last 70 lines of %s.%s.log' => 'Laatste 70 lijnen van %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Download Access Log', 'Download ErrorLog' => 'Download Error Log', 'Country' => 'Land', @@ -348,8 +381,26 @@ $LANG['nl'] = array( 'Banlist' => 'Banlist', 'ranges are acceptable' => 'marges zijn toegestaan', 'CIDR format is supported' => 'CIDR-indeling wordt ondersteund', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unlimited', '1 account' => '1 account', '%s accounts' => '%s accounts', @@ -365,6 +416,8 @@ $LANG['nl'] = array( '%s cron jobs' => '%s geplande taken', '1 archive' => '1 archief', '%s archives' => '%s archieven', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 pakket', '%s packages' => '%s pakketten', '1 IP address' => '1 IP-adres', @@ -392,6 +445,7 @@ $LANG['nl'] = array( 'PACKAGE_CREATED_OK' => 'Package %s is succesvol aangemaakt.', 'SSL_GENERATED_OK' => 'Certificaat is met succes aangemaakt.', 'RULE_CREATED_OK' => 'Regel is succesvol aangemaakt.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Autoupdate is succesvol geactiveerd', 'Autoupdate has been successfully disabled' => 'Autoupdate is succesvol gedeactiveerd', 'Cronjob email reporting has been successfully enabled' => 'Cronjob rapportage is succesvol geactiveerd', @@ -442,12 +496,12 @@ $LANG['nl'] = array( 'RESTORE_SCHEDULED' => 'De taak is toegevoegd aan de wachtrij. U ontvangt een e-mailbericht zodra de back-up is hersteld.', 'RESTORE_EXISTS' => 'Er wordt al een hersteltaak uitgevoerd. Wacht a.u.b. totdat de reservekopie is teruggezet.', - 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *", - 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *", - 'CRON_EXCLUSIONS' => "To exclude all jobs use *", - 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *", + 'WEB_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *', + 'MAIL_EXCLUSIONS' => 'Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Type full database name, one per line. To exclude all databases use *', + 'CRON_EXCLUSIONS' => 'To exclude all jobs use *', + 'USER_EXCLUSIONS' => 'Type directory name, one per line. To exlude all dirs use *', 'Welcome to Vesta Control Panel' => 'Welkom bij het Vesta Controlepaneel', 'MAIL_FROM' => 'Vesta Controlepaneel ', @@ -467,7 +521,7 @@ $LANG['nl'] = array( 'Confirm Password' => 'Bevestig wachtwoord', 'Reset' => 'Reset', 'Reset Code' => 'Reset Code', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Wachtwoord herstelcode is naar uw e-mailadres gestuurd
', 'MAIL_RESET_SUBJECT' => 'Wachtwoordherstel voor %s', 'PASSWORD_RESET_REQUEST' => "Om uw wachtwoord te herstellen klikt u op de link hieronder.\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nWanneer bovenstaande link niet werkt kunt u ook naar de volgende pagina gaan https://%s/reset/?action=code&user=%s en hier uw wachtwoord herstelcode invullen:\n%s\n\nAls u geen wachtwoord herstelcode heeft aangevraagd, kunt u dit bericht negeren.\n\n--\nVesta Controlepaneel\n", @@ -489,6 +543,29 @@ $LANG['nl'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Time Zone', 'Default Language' => 'Default Language', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'preview', @@ -504,8 +581,8 @@ $LANG['nl'] = array( 'Starred' => 'Starred', 'Name' => 'Name', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -515,10 +592,13 @@ $LANG['nl'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -533,12 +613,20 @@ $LANG['nl'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -547,7 +635,17 @@ $LANG['nl'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -563,31 +661,31 @@ $LANG['nl'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -599,6 +697,34 @@ $LANG['nl'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/no.php b/web/inc/i18n/no.php index a3c8a92e..c583d522 100644 --- a/web/inc/i18n/no.php +++ b/web/inc/i18n/no.php @@ -26,6 +26,21 @@ $LANG['no'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Legg til Bruker', 'Add Domain' => 'Legg til Domene', 'Add Web Domain' => 'Legg til Web Domene', @@ -161,13 +176,14 @@ $LANG['no'] = array( 'Web Aliases' => 'Web Aliaser', 'per domain' => 'per domene', 'DNS Domains' => 'DNS Domene', - 'DNS Domains' => 'DNS Domene', - 'DNS records' => 'DNS oppslag' , + 'DNS domains' => 'DNS domene', + 'DNS records' => 'DNS oppslag', 'Name Servers' => 'Navnetjenere', 'Mail Domains' => 'E-post Domene', 'Mail Accounts' => 'E-post Kontoer', 'Cron Jobs' => 'Cron Jobber', 'SSH Access' => 'SSH Tilgang', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP Addresser', 'Backups' => 'Backuper', 'Backup System' => 'Backup Systemet', @@ -179,10 +195,12 @@ $LANG['no'] = array( 'Proxy Extensions' => 'Proxy Utvidelser', 'Web Statistics' => 'Web Statistikker', 'Additional FTP Account' => 'Extra FTP', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Utløper', 'Records' => 'Oppslag', + 'Serial' => 'Serial', 'Catchall email' => 'Catchall e-post', 'AntiVirus Support' => 'AntiVirus Støtte', 'AntiSpam Support' => 'AntiSpam Støtte', @@ -192,6 +210,16 @@ $LANG['no'] = array( 'Autoreply' => 'Autosvar', 'Forward to' => 'Videresend til', 'Do not store forwarded mail' => 'Ikkje lagre videresendt e-post', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'database', 'User' => 'Bruker', 'Host' => 'Host', @@ -202,7 +230,7 @@ $LANG['no'] = array( 'Month' => 'Månde', 'Day of week' => 'Dag i uken', 'local' => 'lokal', - 'Run Time' => 'Kjøre tid', // Not sure what context + 'Run Time' => 'Kjøre tid', // Not sure what context 'Backup Size' => 'Backup Størrelse', 'SYS' => 'SYS', 'Domains' => 'Domener', @@ -213,11 +241,13 @@ $LANG['no'] = array( 'Users' => 'Brukere', 'Load Average' => 'Snittlast', 'Memory Usage' => 'Minnebruk', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD Bruk', 'NGINX Usage' => 'NGINX Bruk', 'MySQL Usage on localhost' => 'MySQL Bruk på localhost', 'PostgreSQL Usage on localhost' => 'PostgreSQL Bruk på localhost', 'Bandwidth Usage eth0' => 'Bruka v båndbredde eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP Bruk', 'SSH Usage' => 'SSH Bruk', 'reverse proxy' => 'omvendt proxy', @@ -230,6 +260,8 @@ $LANG['no'] = array( 'database server' => 'database server', 'ftp server' => 'ftp server', 'job scheduler' => 'jobbplanlegger', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Minne', 'Uptime' => 'Oppetid', @@ -240,7 +272,6 @@ $LANG['no'] = array( 'Release' => 'Utgivelse', 'Architecture' => 'Arkitektur', 'Object' => 'Objekt', - 'Owner' => 'Eiger', 'Username' => 'Brukernavn', 'Password' => 'Passord', 'Email' => 'E-post', @@ -334,6 +365,8 @@ $LANG['no'] = array( 'ftp user password' => 'ftp bruker passord', 'ftp user' => 'ftp bruker', 'Last 70 lines of %s.%s.log' => 'Siste 70 linjer av %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Last ned AccessLog', 'Download ErrorLog' => 'Last Ned ErrorLog', 'Country' => 'Land', @@ -348,8 +381,26 @@ $LANG['no'] = array( 'Banlist' => 'Blokkeringsliste', 'ranges are acceptable' => 'områder er tillatt', 'CIDR format is supported' => 'CIDR-format støttes', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unlimited', '1 account' => '1 konto', '%s accounts' => '%s kontoer', @@ -365,6 +416,8 @@ $LANG['no'] = array( '%s cron jobs' => '%s cron jobber', '1 archive' => '1 arkiv', '%s archives' => '%s arkiver', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 pakke', '%s packages' => '%s pakker', '1 IP address' => '1 IP-adresse', @@ -392,6 +445,7 @@ $LANG['no'] = array( 'PACKAGE_CREATED_OK' => 'Pakke %s har blitt opprettet.', 'SSL_GENERATED_OK' => 'Sertifikatet har blitt generert.', 'RULE_CREATED_OK' => 'Regel har blitt opprettet.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Auto-oppdater har blitt aktivert', 'Autoupdate has been successfully disabled' => 'Auto-oppdater har blitt deaktivert', 'Cronjob email reporting has been successfully enabled' => 'Cronjob-rapportering har blitt aktivert', @@ -442,12 +496,12 @@ $LANG['no'] = array( 'RESTORE_SCHEDULED' => 'Oppgaven er lagt til i køen. Du vil motta en e-postvarsel når sikkerhetskopien er klar for nedlasting.', 'RESTORE_EXISTS' => 'En eksisterende gjenopprettings oppgaven kjører allerede. Vent til den er ferdig før du starter den igjen.', - 'WEB_EXCLUSIONS' => "Skriv inn et domenenavn, ett per linje. Hvis du vil utelate alle domener bruk *. For å utelukke konkrete kataloger bruke følgende format: domene.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Skriv inn et domenenavn, ett per linje. Hvis du vil utelate alle domener bruk *", - 'MAIL_EXCLUSIONS' => "Skriv inn et domenenavn, ett per linje. Hvis du vil utelate alle domener bruk *. For å utelukke konkrete kontoer bruk følgende format: domene.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Skriv inn fullt databasenavn, ett per linje. Hvis du vil utelate alle databaser bruk *", - 'CRON_EXCLUSIONS' => "Hvis du vil utelate alle jobbene bruk *", - 'USER_EXCLUSIONS' => "Skriv inn katalognavn, ett per linje. Hvis du vil utelate alle kataloger bruk *", + 'WEB_EXCLUSIONS' => 'Skriv inn et domenenavn, ett per linje. Hvis du vil utelate alle domener bruk *. For å utelukke konkrete kataloger bruke følgende format: domene.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Skriv inn et domenenavn, ett per linje. Hvis du vil utelate alle domener bruk *', + 'MAIL_EXCLUSIONS' => 'Skriv inn et domenenavn, ett per linje. Hvis du vil utelate alle domener bruk *. For å utelukke konkrete kontoer bruk følgende format: domene.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Skriv inn fullt databasenavn, ett per linje. Hvis du vil utelate alle databaser bruk *', + 'CRON_EXCLUSIONS' => 'Hvis du vil utelate alle jobbene bruk *', + 'USER_EXCLUSIONS' => 'Skriv inn katalognavn, ett per linje. Hvis du vil utelate alle kataloger bruk *', 'Welcome to Vesta Control Panel' => 'Velkommen til Vesta Control Panel', 'MAIL_FROM' => 'Vesta Control Panel ', @@ -467,7 +521,7 @@ $LANG['no'] = array( 'Confirm Password' => 'Bekreft Passord', 'Reset' => 'Reset', 'Reset Code' => 'Reset Kode', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Passord tilbakestillingskode er blitt sendt til din e-postadresse
', 'MAIL_RESET_SUBJECT' => 'Passord tilbakestilt %s', 'PASSWORD_RESET_REQUEST' => "For å tilbakestille kontroll panel passordet kan du følge denne linken:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternativt, kan du gå til https://%s/reset/?action=code&user=%s og oppgi følgende tilbakestillingskode:\n%s\n\nHvis du ikke har bedt om tilbakestilling av passord, kan du ignorere denne meldingen.\n\n--\nVesta Control Panel\n", @@ -489,6 +543,29 @@ $LANG['no'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Time Zone', 'Default Language' => 'Default Language', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'preview', @@ -504,8 +581,8 @@ $LANG['no'] = array( 'Starred' => 'Starred', 'Name' => 'Name', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -515,10 +592,13 @@ $LANG['no'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -533,12 +613,20 @@ $LANG['no'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -547,7 +635,17 @@ $LANG['no'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -563,31 +661,31 @@ $LANG['no'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -599,6 +697,34 @@ $LANG['no'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/pl.php b/web/inc/i18n/pl.php index 19483d66..3d4bd28a 100644 --- a/web/inc/i18n/pl.php +++ b/web/inc/i18n/pl.php @@ -25,6 +25,21 @@ $LANG['pl'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Dodaj użytkownika', 'Add Domain' => 'Dodaj domenę', 'Add Web Domain' => 'Dodaj domenę Web', @@ -160,12 +175,14 @@ $LANG['pl'] = array( 'Web Aliases' => 'Aliasy Web', 'per domain' => 'na domenę', 'DNS Domains' => 'Domeny DNS', + 'DNS domains' => 'Domeny DNS', 'DNS records' => 'Rekordy DNS', 'Name Servers' => 'Serwery nazw', 'Mail Domains' => 'Domeny email', 'Mail Accounts' => 'Konta email', 'Cron Jobs' => 'Zadania Crona', 'SSH Access' => 'Dostęp SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'Adresy IP', 'Backups' => 'Kopie zapasowe', 'Backup System' => 'System kopii zapasowych', @@ -177,10 +194,12 @@ $LANG['pl'] = array( 'Proxy Extensions' => 'Rozszerzenia Proxy', 'Web Statistics' => 'Statystyki Web', 'Additional FTP Account' => 'Dodatkowe FTP', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Wygasa', 'Records' => 'Rekordy', + 'Serial' => 'Serial', 'Catchall email' => 'Email Catchall', 'AntiVirus Support' => 'Wsparcie dla antywirusa', 'AntiSpam Support' => 'Wsparcie dla filtru antyspamowego', @@ -190,6 +209,16 @@ $LANG['pl'] = array( 'Autoreply' => 'Autoodpowiedź', 'Forward to' => 'Przekaż dalej do', 'Do not store forwarded mail' => 'Nie zapisuj przekazanych maili', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'baza danych', 'User' => 'Użytkownik', 'Host' => 'Host', @@ -211,11 +240,13 @@ $LANG['pl'] = array( 'Users' => 'Użytkownicy', 'Load Average' => 'Średnie obciążenie', 'Memory Usage' => 'Użycie pamięci', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'Użycie HTTPD', 'NGINX Usage' => 'Użycie NGINX', 'MySQL Usage on localhost' => 'Użycie MySQL na localhost', 'PostgreSQL Usage on localhost' => 'Użycie PostgreSQL na localhost', 'Bandwidth Usage eth0' => 'Użycie łącza eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'Użycie FTP', 'SSH Usage' => 'Użycie SSH', 'reverse proxy' => 'odwrotne proxy', @@ -228,6 +259,8 @@ $LANG['pl'] = array( 'database server' => 'serwer bazy danych', 'ftp server' => 'serwer ftp', 'job scheduler' => 'planer zadań', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Pamięć', 'Uptime' => 'Czas uruchomienia', @@ -238,7 +271,6 @@ $LANG['pl'] = array( 'Release' => 'Wydanie', 'Architecture' => 'Architektura', 'Object' => 'Objekt', - 'Owner' => 'Właściciel', 'Username' => 'Nazwa użytkownika', 'Password' => 'Hasło', 'Email' => 'Email', @@ -332,6 +364,8 @@ $LANG['pl'] = array( 'ftp user password' => 'hasło użytkownika ftp', 'ftp user' => 'nazwa użytkownika ftp', 'Last 70 lines of %s.%s.log' => 'Ostatnie 70 linijek %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Pobierz AccessLog', 'Download ErrorLog' => 'Pobierz ErrorLog', 'Country' => 'Kraj', @@ -346,8 +380,26 @@ $LANG['pl'] = array( 'Banlist' => 'Lista zbanowanych', 'ranges are acceptable' => 'zakresy są uznawane', 'CIDR format is supported' => 'format CIDR jest wspierany', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Dodaj jeszcze jeden serwer DNS', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'nielimitowne', '1 account' => '1 konto', '%s accounts' => '%s kont', @@ -363,6 +415,8 @@ $LANG['pl'] = array( '%s cron jobs' => '%s zadań cron', '1 archive' => '1 archiwum', '%s archives' => '%s archiwów', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 pakiet', '%s packages' => '%s pakietów', '1 IP address' => '1 adres IP', @@ -390,6 +444,7 @@ $LANG['pl'] = array( 'PACKAGE_CREATED_OK' => 'Stworzono pakiet %s.', 'SSL_GENERATED_OK' => 'Wygenerowano certyfikat.', 'RULE_CREATED_OK' => 'Stworzono zasadę.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Uaktywniono automatyczne aktualizacje.', 'Autoupdate has been successfully disabled' => 'Wyłączono automatyczne aktualizacje.', 'Cronjob email reporting has been successfully enabled' => 'Uaktywniono raportowanie zadań crona na maila', @@ -440,12 +495,12 @@ $LANG['pl'] = array( 'RESTORE_SCHEDULED' => 'Dodano zadanie do kolejki. Otrzymasz powiadomienie na maila, kiedy zostanie zakończone przywracanie danych.', 'RESTORE_EXISTS' => 'Aktualnie jest już uruchomiony proces przywracania danych. Proszę czekać na jego zakończenie przed powtórnym uruchomieniem.', - 'WEB_EXCLUSIONS' => "Wpisz nazwy domen, po jednej w linijce. W celu wyłączenia wszystkich domen użyj *, a żeby wyłączyć konkretne foldery użyj takiego formatu: domena.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Wpisz nazwy domen, po jednej w linijce. W celu wyłączenia wszystkich domen użyj *.", - 'MAIL_EXCLUSIONS' => "Wpisz nazwy domen, po jednej w linijce. W celu wyłączenia wszystkich domen użyj *, a żeby wyłączyć konkretne konta użyj takiego formatu: domena.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Wpisz pełne nazwy baz danych, po jednej w linijce. W celu wyłączenia wszystkich baz użyj *.", - 'CRON_EXCLUSIONS' => "W celu wyłączenia wszystkich zadań wpisz *.", - 'USER_EXCLUSIONS' => "Wpisz nazwy folderów, po jednej w linijce. W celu wyłączenia wszystkich folderów użyj *.", + 'WEB_EXCLUSIONS' => 'Wpisz nazwy domen, po jednej w linijce. W celu wyłączenia wszystkich domen użyj *, a żeby wyłączyć konkretne foldery użyj takiego formatu: domena.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Wpisz nazwy domen, po jednej w linijce. W celu wyłączenia wszystkich domen użyj *.', + 'MAIL_EXCLUSIONS' => 'Wpisz nazwy domen, po jednej w linijce. W celu wyłączenia wszystkich domen użyj *, a żeby wyłączyć konkretne konta użyj takiego formatu: domena.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Wpisz pełne nazwy baz danych, po jednej w linijce. W celu wyłączenia wszystkich baz użyj *.', + 'CRON_EXCLUSIONS' => 'W celu wyłączenia wszystkich zadań wpisz *.', + 'USER_EXCLUSIONS' => 'Wpisz nazwy folderów, po jednej w linijce. W celu wyłączenia wszystkich folderów użyj *.', 'Welcome to Vesta Control Panel' => 'Witaj w Panelu Vesta', 'MAIL_FROM' => 'Panel Vesta ', @@ -465,7 +520,7 @@ $LANG['pl'] = array( 'Confirm Password' => 'Potwierdź hasło', 'Reset' => 'Resetuj', 'Reset Code' => 'Kod resetu', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Kod resetu hasła został wysłany na twój adres email
', 'MAIL_RESET_SUBJECT' => 'Zresetowano hasło o %s', 'PASSWORD_RESET_REQUEST' => "W celu zresetowanie hasła do panelu, proszę przejść na stronę:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternatywnie możesz przejść na stronę https://%s/reset/?action=code&user=%s i wpisać poniższy kod:\n%s\n\nJeżeli nie prosiłeś o reset hasła proszę zignorować tą wiadomość i przyjąć nasze przeprosiny.\n\n--\nPanel Vesta\n", @@ -487,7 +542,30 @@ $LANG['pl'] = array( 'Hostname' => 'Nazwa hosta', 'Time Zone' => 'Strefa czasowa', 'Default Language' => 'Domyślny język', - 'FileSystem Disk Quota ' => 'Quota systemu plików', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => 'Quota systemu plików', 'Vesta Control Panel Plugins' => 'Pluginy panelu Vesta', 'preview' => 'podląd', 'Reseller Role' => 'Rola Resellera', @@ -502,8 +580,8 @@ $LANG['pl'] = array( 'Starred' => 'Gwiazdka', 'Name' => 'Nazwa', + 'File Manager' => 'Manager Plików', - 'type' => 'typ', 'size' => 'rozmiar', 'date' => 'data', 'name' => 'nazwa', @@ -513,10 +591,13 @@ $LANG['pl'] = array( 'NEW DIR' => 'NOWY FOLDER', 'DELETE' => 'USUŃ', 'RENAME' => 'ZMIEŃ NAZWĘ', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'KOPIUJ', 'ARCHIVE' => 'ARCHIWIZUJ', 'EXTRACT' => 'ROZPAKUJ', 'DOWNLOAD' => 'POBIERZ', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Naciśnij', 'to reload the page' => 'żeby załadować ponownie stronę', 'Directory name cannot be empty' => 'Nazwa folderu nie może być pusta', @@ -531,12 +612,20 @@ $LANG['pl'] = array( 'Copy' => 'Kopiuj', 'Cancel' => 'Anuluj', 'Rename' => 'Zmień nazwę', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Usuń', 'Extract' => 'Rozpakuj', 'Create' => 'Stwórz', 'Compress' => 'Skompresuj', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Czy jesteś pewny, że chcesz skopiować?', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Czy jesteś pewny, że chcesz usunąć?', 'into' => 'do', 'existing files will be replaced' => 'istniejące pliki zostaną zastąpione', @@ -545,7 +634,17 @@ $LANG['pl'] = array( 'already exists' => 'już istnieje', 'Create file' => 'Stwórz plik', 'Create directory' => 'Stwórz katalog', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Dodaj nowy objekt', 'Save Form' => 'Zapisz formularz', 'Cancel saving form' => 'Anuluj zapisywanie formularza', @@ -561,42 +660,70 @@ $LANG['pl'] = array( 'Move backward through top menu' => 'Przejdź do tyłu przez menu górne', 'Move forward through top menu' => 'Przejdź do przodu przez menu górne', 'Enter focused element' => 'Wpisz zaznaczony element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Wyślij', 'New File' => 'Nowy plik', 'New Folder' => 'Nowy folder', 'Download' => 'Pobierz', - 'Rename' => 'Zmień nazwę', - 'Copy' => 'Kopiuj', 'Archive' => 'Archiwizuj', - 'Delete' => 'Usuń', 'Save File (in text editor)' => 'Zapisz plik (w edytorze tekstu))', 'Close Popup / Cancel' => 'Zamknij okno / Anuluj', 'Move Cursor Up' => 'Przenieś kursor wyżej', - 'Move Cursor Dow' => 'Przenień kursor niżej', + 'Move Cursor Down' => 'Przenień kursor niżej', 'Switch to Left Tab' => 'Przełącz do zakładki po lewej', 'Switch to Right Tab' => 'Przełącz do zakładki po prawej', 'Switch Tab' => 'Przełącz zakładkę', - 'Go to the Top of File List' => 'Przejdź na górę listy plików', + 'Go to the Top of the File List' => 'Przejdź na górę listy plików', 'Go to the Last File' => 'Przejdź do ostatniego pliku', - 'Open File/Enter Directory' => 'Otwórz plik/folder', + 'Open File / Enter Directory' => 'Otwórz plik/folder', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Przejdź do katalogu nadrzędnego', 'Select Current File' => 'Wybierz aktywny plik', 'Select Bunch of Files' => 'Wybierz kilka plików', - 'Append File to the Current Selection' => 'Nadpisz plik do aktualnego zaznaczenia', + 'Add File to the Current Selection' => 'Nadpisz plik do aktualnego zaznaczenia', 'Select All Files' => 'Wybierz wszystkie pliki', 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'skróty klawiszowe są zainspirowane wspaniałym managerem plików GNU Midnight Commander', - 'Licence Key' => 'Licence Key', - 'Enter License Key' => 'Enter License Key', - 'Buy Licence' => 'Buy Licence', - 'Buy Lifetime License' => 'Buy Lifetime License', - 'Disable and Cancel Licence' => 'Disable and Cancel Licence', - 'Licence Activated' => 'Licence Activated', - 'Licence Deactivated' => 'Licence Deactivated', - 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', - '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.', - '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.' + 'Licence Key' => 'Klucz licencyjny', + 'Enter License Key' => 'Wpisz klucz licencyjny', + 'Buy Licence' => 'Kup licencję', + 'Buy Lifetime License' => 'Kup wieczystą licencję', + 'Disable and Cancel Licence' => 'Wyłącz i anuluj licencję', + 'Licence Activated' => 'Aktywowano licencję', + 'Licence Deactivated' => 'Zdezaktywowano licencję', + 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Daj użytkownikowi dostęp tylko do jego katalogu domowego przez SSH.', + 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Przeglądaj, kopiuj, edytuj i zarządzaj wszystkimi plikami należącymi do twojej domeny przy użyciu kompletnego Menedżera Plików.', + 'This is a commercial module, you would need to purchace license key to enable it.' => 'To jest moduł komercyjny. Żeby go aktywować trzeba zakupić klucz licencyjny.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', ); diff --git a/web/inc/i18n/pt-BR.php b/web/inc/i18n/pt-BR.php index 0ae395dc..0a4929fa 100644 --- a/web/inc/i18n/pt-BR.php +++ b/web/inc/i18n/pt-BR.php @@ -25,6 +25,21 @@ $LANG['pt-BR'] = array( 'CRON' => 'TAREFA', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Adicionar Usuário', 'Add Domain' => 'Adicionar Domínio', 'Add Web Domain' => 'Adicionar Domínio Web', @@ -160,13 +175,14 @@ $LANG['pt-BR'] = array( 'Web Aliases' => 'Apelidos Web', 'per domain' => 'por domínio', 'DNS Domains' => 'Domínios DNS', - 'DNS Domains' => 'Domínios DNS', + 'DNS domains' => 'Domínios DNS', 'DNS records' => 'Registros DNS', 'Name Servers' => 'Servidores de Nome', 'Mail Domains' => 'Domínios de Email', 'Mail Accounts' => 'Contas de Email', 'Cron Jobs' => 'Tarefas', 'SSH Access' => 'Acesso SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'Endereços IP', 'Backups' => 'Backups', 'Backup System' => 'Sistema de Backup', @@ -178,10 +194,12 @@ $LANG['pt-BR'] = array( 'Proxy Extensions' => 'Extenções do Proxy', 'Web Statistics' => 'Estatísticas Web', 'Additional FTP Account' => 'Contas FTP Adicionais', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Expira', 'Records' => 'registros', + 'Serial' => 'Serial', 'Catchall email' => 'Pegar todos os emails', 'AntiVirus Support' => 'Suporte a Antivírus', 'AntiSpam Support' => 'Suporte a Antispam', @@ -191,6 +209,16 @@ $LANG['pt-BR'] = array( 'Autoreply' => 'Auto resposta', 'Forward to' => 'Encaminhar para', 'Do not store forwarded mail' => 'Não armazenar email encaminhado', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'banco de dados', 'User' => 'Usuário', 'Host' => 'Host', @@ -212,11 +240,13 @@ $LANG['pt-BR'] = array( 'Users' => 'Usuários', 'Load Average' => 'Carga Média', 'Memory Usage' => 'Uso de Memória', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'Uso do HTTPD', 'NGINX Usage' => 'Uso do NGINX', 'MySQL Usage on localhost' => 'Uso do MySQL MySQL em localhost', 'PostgreSQL Usage on localhost' => 'Uso do PostgreSQL em localhost', 'Bandwidth Usage eth0' => 'Uso de Banda em eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'Uso do FTP', 'SSH Usage' => 'Uso do SSH', 'reverse proxy' => 'proxy reverso', @@ -229,6 +259,8 @@ $LANG['pt-BR'] = array( 'database server' => 'servidor de banco de dados', 'ftp server' => 'servidor ftp', 'job scheduler' => 'agendador de tarefas', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Memória', 'Uptime' => 'Tempo em Atividade', @@ -239,7 +271,6 @@ $LANG['pt-BR'] = array( 'Release' => 'Release', 'Architecture' => 'Arquitetura', 'Object' => 'Objeto', - 'Owner' => 'Dono', 'Username' => 'Usuário', 'Password' => 'Senha', 'Email' => 'Email', @@ -333,6 +364,8 @@ $LANG['pt-BR'] = array( 'ftp user password' => 'ftp usuário senha', 'ftp user' => 'ftp usuário', 'Last 70 lines of %s.%s.log' => 'Últimas 70 linhas de %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Baixar AccessLog', 'Download ErrorLog' => 'Baixar ErrorLog', 'Country' => 'País', @@ -347,8 +380,26 @@ $LANG['pt-BR'] = array( 'Banlist' => 'Lista Negra', 'ranges are acceptable' => 'variações são permitidas', 'CIDR format is supported' => 'formato CIDR é suportado', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Adicionar um ou mais Servidores de Nome', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'ilimitado', '1 account' => '1 conta', '%s accounts' => '%s contas', @@ -364,6 +415,8 @@ $LANG['pt-BR'] = array( '%s cron jobs' => '%s tarefas', '1 archive' => '1 arquivo', '%s archives' => '%s aquivos', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 pacote', '%s packages' => '%s pacotes', '1 IP address' => '1 endereço IP', @@ -391,6 +444,7 @@ $LANG['pt-BR'] = array( 'PACKAGE_CREATED_OK' => 'Pacote %s criado com sucesso.', 'SSL_GENERATED_OK' => 'Certificado SSL criado sucesso.', 'RULE_CREATED_OK' => 'Regra criada com sucesso.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Atualização automática ativada com sucesso', 'Autoupdate has been successfully disabled' => 'Atualização automática desativado com sucesso', 'Cronjob email reporting has been successfully enabled' => 'Relatórios de tarefas ativado com sucesso', @@ -441,12 +495,12 @@ $LANG['pt-BR'] = array( 'RESTORE_SCHEDULED' => 'A tarefa foi adicionada à fila. Você receberá um email de confirmação.', 'RESTORE_EXISTS' => 'Uma tarefa de restauração já está em execução. Por favor aguarde até que a mesma termine.', - 'WEB_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir diretórios específicos use o seguinte formato: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *", - 'MAIL_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir contas específicas use o seguinte formato: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Digite o nome completo do banco de dados, um por linha. Para excluir todos os bancos de dados use *", - 'CRON_EXCLUSIONS' => "Para excluir todas as tarefas *", - 'USER_EXCLUSIONS' => "Digite o nome do diretório, um por linha. Para excluir todos os diretórios use *", + 'WEB_EXCLUSIONS' => 'Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir diretórios específicos use o seguinte formato: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Digite o nome de domínio, um por linha. Para excluir todos os domínios use *', + 'MAIL_EXCLUSIONS' => 'Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir contas específicas use o seguinte formato: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Digite o nome completo do banco de dados, um por linha. Para excluir todos os bancos de dados use *', + 'CRON_EXCLUSIONS' => 'Para excluir todas as tarefas *', + 'USER_EXCLUSIONS' => 'Digite o nome do diretório, um por linha. Para excluir todos os diretórios use *', 'Welcome to Vesta Control Panel' => 'Bem vindo ao Painel de Controle Vesta', 'MAIL_FROM' => 'Painel de Controle Vesta ', @@ -466,7 +520,7 @@ $LANG['pt-BR'] = array( 'Confirm Password' => 'Confirmar senha', 'Reset' => 'Redefinir', 'Reset Code' => 'Código de Redefinição', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'O código de redefinição de senha foi enviado para o seu email
', 'MAIL_RESET_SUBJECT' => 'Senha Redefinida em %s', 'PASSWORD_RESET_REQUEST' => "Para redefinir sua senha do Painel de Controle, por favor use o seguinte link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nComo alternativa, você pode visitar https://%s/reset/?action=code&user=%s e digitar o seguinte código de redefinição:\n%s\n\nSe você não solicitou uma redefinição de senha, por favor ignore esse mensagem e aceite nossas desculpas.\n\n--\nPainel de Controle Vesta\n", @@ -488,6 +542,29 @@ $LANG['pt-BR'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Fuso Horário', 'Default Language' => 'Linguagem Padrão', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'Cota de Disco', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'pré-visualizar', @@ -498,13 +575,13 @@ $LANG['pt-BR'] = array( 'FileManager' => 'Gerenciador de Arquivo', 'show: CPU / MEM / NET / DISK' => 'mostrar: CPU / MEM / NET / DISK', - 'sort by' => 'ordenar por', + 'sort by' => 'ordenar', 'Date' => 'Data', 'Starred' => 'Estreado', 'Name' => 'Nome', + 'File Manager' => 'File Manager', - 'type' => 'tipo', 'size' => 'tamanho', 'date' => 'data', 'name' => 'nome', @@ -514,10 +591,13 @@ $LANG['pt-BR'] = array( 'NEW DIR' => 'NOVO DIR', 'DELETE' => 'DELETAR', 'RENAME' => 'RENOMEAR', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPIAR', 'ARCHIVE' => 'ARQUIVAR', 'EXTRACT' => 'EXTAIR', 'DOWNLOAD' => 'BAIXAR', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Acertar', 'to reload the page' => 'recarregar a página', 'Directory name cannot be empty' => 'Nome do diretório não pode estar vazio', @@ -532,12 +612,20 @@ $LANG['pt-BR'] = array( 'Copy' => 'Copiar', 'Cancel' => 'Cancelar', 'Rename' => 'Renomear', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Deletar', 'Extract' => 'Extrair', 'Create' => 'Criar', 'Compress' => 'Comprimir', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Tem certeza que deseja copiar', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Tem certeza que deseja deletar', 'into' => 'dentro', 'existing files will be replaced' => 'arquivos existentes serão substituídos', @@ -546,7 +634,17 @@ $LANG['pt-BR'] = array( 'already exists' => 'já existe', 'Create file' => 'Criar arquivo', 'Create directory' => 'Criar diretório', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Adicionar novo objeto', 'Save Form' => 'Salvar formulário', 'Cancel saving form' => 'Cancelar salvamento do formulário', @@ -562,29 +660,29 @@ $LANG['pt-BR'] = array( 'Move backward through top menu' => 'Mover para trás através do menu superior', 'Move forward through top menu' => 'Mover para frente através do menu superior', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Enviar', 'New File' => 'Novo Arquivo', 'New Folder' => 'Novo Diretório', 'Download' => 'Baixar', - 'Rename' => 'Renomear', - 'Copy' => 'Copiar', 'Archive' => 'Arquivar', - 'Delete' => 'Deletar', 'Save File (in text editor)' => 'Salvar Arquivo (no editor de texto)', 'Close Popup / Cancel' => 'Fechar Popup / Cancelar', 'Move Cursor Up' => 'Mover o Cursor para Cima', - 'Move Cursor Dow' => 'Mover o Cursor para Baixo', + 'Move Cursor Down' => 'Mover o Cursor para Baixo', 'Switch to Left Tab' => 'Alternar para a Guia à Esquerda', 'Switch to Right Tab' => 'Alternar para a Guia à Direita', 'Switch Tab' => 'Alternar Guia', - 'Go to the Top of File List' => 'Ir para o Início da Lista de Arquivo', + 'Go to the Top of the File List' => 'Ir para o Início da Lista de Arquivo', 'Go to the Last File' => 'Ir para o último Arquivo', - 'Open File/Enter Directory' => 'Abrir Arquivo/Digitar Diretório', + 'Open File / Enter Directory' => 'Abrir Arquivo/Digitar Diretório', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Ir para o diretório principal', 'Select Current File' => 'Selecionar o Arquivo Atual', 'Select Bunch of Files' => 'Selecionar Vários Arquivos', - 'Append File to the Current Selection' => 'Acrescentar Arquivo à Seleção Atual', + 'Add File to the Current Selection' => 'Acrescentar Arquivo à Seleção Atual', 'Select All Files' => 'Selecionar Todos os Arquivos', 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'atalhos são inspirados pela magnífica GNU Midnight Commander Gerenciador de Arquivos', @@ -598,6 +696,34 @@ $LANG['pt-BR'] = array( 'Licence Deactivated' => 'Licença Desativada', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restringir usuários para que eles não possam usar SSH e acessar apenas seu diretório home.', 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copiar, editar, ver, e recuperar todos os arquivos de seu domínio web usando o completo Gerenciador de Arquivos.', - 'This is a commercial module, you would need to purchace license key to enable it.' => 'Éste é um módulo comercial que você poderia comprar uma chave de licença para habilita-lo.' + 'This is a commercial module, you would need to purchace license key to enable it.' => 'Éste é um módulo comercial que você poderia comprar uma chave de licença para habilita-lo.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', ); diff --git a/web/inc/i18n/pt.php b/web/inc/i18n/pt.php index 8eea0582..dc78e38a 100644 --- a/web/inc/i18n/pt.php +++ b/web/inc/i18n/pt.php @@ -25,6 +25,21 @@ $LANG['pt'] = array( 'CRON' => 'TAREFA', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Adicionar Usuário', 'Add Domain' => 'Adicionar Domínio', 'Add Web Domain' => 'Adicionar Domínio Web', @@ -160,13 +175,14 @@ $LANG['pt'] = array( 'Web Aliases' => 'Apelidos Web', 'per domain' => 'por domínio', 'DNS Domains' => 'Domínios DNS', - 'DNS Domains' => 'Domínios DNS', + 'DNS domains' => 'Domínios DNS', 'DNS records' => 'Registros DNS', 'Name Servers' => 'Servidores de Nome', 'Mail Domains' => 'Domínios de Email', 'Mail Accounts' => 'Contas de Email', 'Cron Jobs' => 'Tarefas', 'SSH Access' => 'Acesso SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'Endereços IP', 'Backups' => 'Backups', 'Backup System' => 'Sistema de Backup', @@ -178,10 +194,12 @@ $LANG['pt'] = array( 'Proxy Extensions' => 'Extenções do Proxy', 'Web Statistics' => 'Estatísticas Web', 'Additional FTP Account' => 'Contas FTP Adicionais', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Expira', 'Records' => 'registros', + 'Serial' => 'Serial', 'Catchall email' => 'Pegar todos os emails', 'AntiVirus Support' => 'Suporte a Antivírus', 'AntiSpam Support' => 'Suporte a Antispam', @@ -191,6 +209,16 @@ $LANG['pt'] = array( 'Autoreply' => 'Auto resposta', 'Forward to' => 'Encaminhar para', 'Do not store forwarded mail' => 'Não armazenar email encaminhado', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'banco de dados', 'User' => 'Usuário', 'Host' => 'Host', @@ -212,11 +240,13 @@ $LANG['pt'] = array( 'Users' => 'Usuários', 'Load Average' => 'Carga Média', 'Memory Usage' => 'Uso de Memória', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'Uso do HTTPD', 'NGINX Usage' => 'Uso do NGINX', 'MySQL Usage on localhost' => 'Uso do MySQL MySQL em localhost', 'PostgreSQL Usage on localhost' => 'Uso do PostgreSQL em localhost', 'Bandwidth Usage eth0' => 'Uso de Banda em eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'Uso do FTP', 'SSH Usage' => 'Uso do SSH', 'reverse proxy' => 'proxy reverso', @@ -229,6 +259,8 @@ $LANG['pt'] = array( 'database server' => 'servidor de banco de dados', 'ftp server' => 'servidor ftp', 'job scheduler' => 'agendador de tarefas', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Memória', 'Uptime' => 'Tempo em Atividade', @@ -239,7 +271,6 @@ $LANG['pt'] = array( 'Release' => 'Release', 'Architecture' => 'Arquitetura', 'Object' => 'Objeto', - 'Owner' => 'Dono', 'Username' => 'Usuário', 'Password' => 'Senha', 'Email' => 'Email', @@ -333,6 +364,8 @@ $LANG['pt'] = array( 'ftp user password' => 'ftp usuário senha', 'ftp user' => 'ftp usuário', 'Last 70 lines of %s.%s.log' => 'Últimas 70 linhas de %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Baixar AccessLog', 'Download ErrorLog' => 'Baixar ErrorLog', 'Country' => 'País', @@ -347,8 +380,26 @@ $LANG['pt'] = array( 'Banlist' => 'Lista Negra', 'ranges are acceptable' => 'variações são permitidas', 'CIDR format is supported' => 'formato CIDR é suportado', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Adicionar um ou mais Servidores de Nome', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'ilimitado', '1 account' => '1 conta', '%s accounts' => '%s contas', @@ -364,6 +415,8 @@ $LANG['pt'] = array( '%s cron jobs' => '%s tarefas', '1 archive' => '1 arquivo', '%s archives' => '%s aquivos', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 pacote', '%s packages' => '%s pacotes', '1 IP address' => '1 endereço IP', @@ -391,6 +444,7 @@ $LANG['pt'] = array( 'PACKAGE_CREATED_OK' => 'Pacote %s criado com sucesso.', 'SSL_GENERATED_OK' => 'Certificado SSL criado sucesso.', 'RULE_CREATED_OK' => 'Regra criada com sucesso.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Atualização automática ativada com sucesso', 'Autoupdate has been successfully disabled' => 'Atualização automática desativado com sucesso', 'Cronjob email reporting has been successfully enabled' => 'Relatórios de tarefas ativado com sucesso', @@ -441,12 +495,12 @@ $LANG['pt'] = array( 'RESTORE_SCHEDULED' => 'A tarefa foi adicionada à fila. Você receberá um email de confirmação.', 'RESTORE_EXISTS' => 'Uma tarefa de restauração já está em execução. Por favor aguarde até que a mesma termine.', - 'WEB_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir diretórios específicos use o seguinte formato: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *", - 'MAIL_EXCLUSIONS' => "Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir contas específicas use o seguinte formato: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Digite o nome completo do banco de dados, um por linha. Para excluir todos os bancos de dados use *", - 'CRON_EXCLUSIONS' => "Para excluir todas as tarefas *", - 'USER_EXCLUSIONS' => "Digite o nome do diretório, um por linha. Para excluir todos os diretórios use *", + 'WEB_EXCLUSIONS' => 'Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir diretórios específicos use o seguinte formato: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Digite o nome de domínio, um por linha. Para excluir todos os domínios use *', + 'MAIL_EXCLUSIONS' => 'Digite o nome de domínio, um por linha. Para excluir todos os domínios use *. Para excluir contas específicas use o seguinte formato: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Digite o nome completo do banco de dados, um por linha. Para excluir todos os bancos de dados use *', + 'CRON_EXCLUSIONS' => 'Para excluir todas as tarefas *', + 'USER_EXCLUSIONS' => 'Digite o nome do diretório, um por linha. Para excluir todos os diretórios use *', 'Welcome to Vesta Control Panel' => 'Bem vindo ao Painel de Controle Vesta', 'MAIL_FROM' => 'Painel de Controle Vesta ', @@ -466,7 +520,7 @@ $LANG['pt'] = array( 'Confirm Password' => 'Confirmar senha', 'Reset' => 'Redefinir', 'Reset Code' => 'Código de Redefinição', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'O código de redefinição de senha foi enviado para o seu email
', 'MAIL_RESET_SUBJECT' => 'Senha Redefinida em %s', 'PASSWORD_RESET_REQUEST' => "Para redefinir sua senha do Painel de Controle, por favor use o seguinte link:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nComo alternativa, você pode visitar https://%s/reset/?action=code&user=%s e digitar o seguinte código de redefinição:\n%s\n\nSe você não solicitou uma redefinição de senha, por favor ignore esse mensagem e aceite nossas desculpas.\n\n--\nPainel de Controle Vesta\n", @@ -488,6 +542,29 @@ $LANG['pt'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Fuso Horário', 'Default Language' => 'Linguagem Padrão', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'Cota de Disco', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'pré-visualizar', @@ -498,13 +575,13 @@ $LANG['pt'] = array( 'FileManager' => 'Gerenciador de Arquivo', 'show: CPU / MEM / NET / DISK' => 'mostrar: CPU / MEM / NET / DISK', - 'sort by' => 'ordenar por', + 'sort by' => 'ordenar', 'Date' => 'Data', 'Starred' => 'Estreado', 'Name' => 'Nome', + 'File Manager' => 'File Manager', - 'type' => 'tipo', 'size' => 'tamanho', 'date' => 'data', 'name' => 'nome', @@ -514,10 +591,13 @@ $LANG['pt'] = array( 'NEW DIR' => 'NOVO DIR', 'DELETE' => 'DELETAR', 'RENAME' => 'RENOMEAR', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPIAR', 'ARCHIVE' => 'ARQUIVAR', 'EXTRACT' => 'EXTAIR', 'DOWNLOAD' => 'BAIXAR', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Acertar', 'to reload the page' => 'recarregar a página', 'Directory name cannot be empty' => 'Nome do diretório não pode estar vazio', @@ -532,12 +612,20 @@ $LANG['pt'] = array( 'Copy' => 'Copiar', 'Cancel' => 'Cancelar', 'Rename' => 'Renomear', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Deletar', 'Extract' => 'Extrair', 'Create' => 'Criar', 'Compress' => 'Comprimir', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Tem certeza que deseja copiar', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Tem certeza que deseja deletar', 'into' => 'dentro', 'existing files will be replaced' => 'arquivos existentes serão substituídos', @@ -546,7 +634,17 @@ $LANG['pt'] = array( 'already exists' => 'já existe', 'Create file' => 'Criar arquivo', 'Create directory' => 'Criar diretório', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Adicionar novo objeto', 'Save Form' => 'Salvar formulário', 'Cancel saving form' => 'Cancelar salvamento do formulário', @@ -562,29 +660,29 @@ $LANG['pt'] = array( 'Move backward through top menu' => 'Mover para trás através do menu superior', 'Move forward through top menu' => 'Mover para frente através do menu superior', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Enviar', 'New File' => 'Novo Arquivo', 'New Folder' => 'Novo Diretório', 'Download' => 'Baixar', - 'Rename' => 'Renomear', - 'Copy' => 'Copiar', 'Archive' => 'Arquivar', - 'Delete' => 'Deletar', 'Save File (in text editor)' => 'Salvar Arquivo (no editor de texto)', 'Close Popup / Cancel' => 'Fechar Popup / Cancelar', 'Move Cursor Up' => 'Mover o Cursor para Cima', - 'Move Cursor Dow' => 'Mover o Cursor para Baixo', + 'Move Cursor Down' => 'Mover o Cursor para Baixo', 'Switch to Left Tab' => 'Alternar para a Guia à Esquerda', 'Switch to Right Tab' => 'Alternar para a Guia à Direita', 'Switch Tab' => 'Alternar Guia', - 'Go to the Top of File List' => 'Ir para o Início da Lista de Arquivo', + 'Go to the Top of the File List' => 'Ir para o Início da Lista de Arquivo', 'Go to the Last File' => 'Ir para o último Arquivo', - 'Open File/Enter Directory' => 'Abrir Arquivo/Digitar Diretório', + 'Open File / Enter Directory' => 'Abrir Arquivo/Digitar Diretório', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Ir para o diretório principal', 'Select Current File' => 'Selecionar o Arquivo Atual', 'Select Bunch of Files' => 'Selecionar Vários Arquivos', - 'Append File to the Current Selection' => 'Acrescentar Arquivo à Seleção Atual', + 'Add File to the Current Selection' => 'Acrescentar Arquivo à Seleção Atual', 'Select All Files' => 'Selecionar Todos os Arquivos', 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'atalhos são inspirados pela magnífica GNU Midnight Commander Gerenciador de Arquivos', @@ -598,6 +696,34 @@ $LANG['pt'] = array( 'Licence Deactivated' => 'Licença Desativada', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restringir usuários para que eles não possam usar SSH e acessar apenas seu diretório home.', 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Browse, copiar, editar, ver, e recuperar todos os arquivos de seu domínio web usando o completo Gerenciador de Arquivos.', - 'This is a commercial module, you would need to purchace license key to enable it.' => 'Éste é um módulo comercial que você poderia comprar uma chave de licença para habilita-lo.' + 'This is a commercial module, you would need to purchace license key to enable it.' => 'Éste é um módulo comercial que você poderia comprar uma chave de licença para habilita-lo.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', ); diff --git a/web/inc/i18n/ro.php b/web/inc/i18n/ro.php index 85c3a3a6..77e0eb8f 100644 --- a/web/inc/i18n/ro.php +++ b/web/inc/i18n/ro.php @@ -3,49 +3,63 @@ * Vesta language file * skid (skid@vestacp.com) * bbl (sergiu.badan@gmail.com) - * Ionescu Bogdan | https://github.com/ionescu-bogdan */ $LANG['ro'] = array( 'Packages' => 'Pachete', - 'IP' => 'IP-uri', - 'Graphs' => 'Grafice', + 'IP' => 'IP', + 'Graphs' => 'Graficele', 'Statistics' => 'Statistică', - 'Log' => 'Jurnal', + 'Log' => 'Log', 'Server' => 'Server', 'Services' => 'Servicii', 'Firewall' => 'Firewall', 'Updates' => 'Actualizări', - 'Log in' => 'Login', # Translation is `Autentificare`, but also `Login` is corect - 'Log out' => 'Logout', # Translation is `Ieșire`, but also `Logout` is corect + 'Log in' => 'Log in', + 'Log out' => 'Log out', - 'USER' => 'CONT', # Translation is `UTILIZATOR`, but it is too long + 'USER' => 'USER', 'WEB' => 'WEB', 'DNS' => 'DNS', - 'MAIL' => 'E-MAIL', - 'DB' => 'BD', + 'MAIL' => 'MAIL', + 'DB' => 'DB', 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', - 'Add User' => 'Adăugare Utilizator', - 'Add Domain' => 'Adăugare Domeniu', - 'Add Web Domain' => 'Adăugare Domeniu WEB', - 'Add DNS Domain' => 'Adăugare Domeniu DNS', - 'Add DNS Record' => 'Adăugare Înregistrare DNS', - 'Add Mail Domain' => 'Adăugare Domeniu E-MAIL', - 'Add Mail Account' => 'Adăugare Cont de e-mail', - 'Add Database' => 'Adăugare Baza de Date', - 'Add Cron Job' => 'Adăugare Sarcină', - 'Create Backup' => 'Creare Backup', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + + 'Add User' => 'Adăugare utilizator', + 'Add Domain' => 'Adăugare domeniu', + 'Add Web Domain' => 'Adăugare domeniu', + 'Add DNS Domain' => 'Adăugare domeniu', + 'Add DNS Record' => 'Adăugare', + 'Add Mail Domain' => 'Adăugare domeniu', + 'Add Mail Account' => 'Adăugare countul', + 'Add Database' => 'Adăugare BD', + 'Add Cron Job' => 'Adăugare sarcină', + 'Create Backup' => 'Creare un backup', 'Configure' => 'Configurare', - 'Restore All' => 'Restaurează Tot', - 'Add Package' => 'Adăugare Pachet', + 'Restore All' => 'Restaurare toate', + 'Add Package' => 'Adăugare pachet', 'Add IP' => 'Adăugare IP', - 'Add Rule' => 'Adăugare Regulă', - 'Ban IP Address' => 'Blocare Adresă IP', + 'Add Rule' => 'Adăugare regulă', + 'Ban IP Address' => 'Blocare IP', 'Search' => 'Сăutare', - 'Add one more FTP Account' => 'Adaugă încă un cont FTP', - 'Overall Statistics' => 'Statistică Generală', + 'Add one more FTP Account' => 'Inca un FTP count', + 'Overall Statistics' => 'Statistică rezumativă', 'Daily' => 'Zilnic', 'Weekly' => 'Săptămânal', 'Monthly' => 'Lunar', @@ -55,90 +69,90 @@ $LANG['ro'] = array( 'Save' => 'Salvează', 'Submit' => 'OK', - 'toggle all' => 'selectează toate', - 'apply to selected' => 'aplică la selecție', - 'rebuild' => 'reconstruire', - 'rebuild web' => 'reconstruire WEB', - 'rebuild dns' => 'reconstruire DNS', - 'rebuild mail' => 'reconstruire MAIL', - 'rebuild db' => 'reconstruire DB', - 'rebuild cron' => 'reconstruire CRON', - 'update counters' => 'actualizare contoare', + 'toggle all' => 'toate', + 'apply to selected' => 'aplică la selectat', + 'rebuild' => 'reconstrui', + 'rebuild web' => 'reconstrui WEB', + 'rebuild dns' => 'reconstrui DNS', + 'rebuild mail' => 'reconstrui MAIL', + 'rebuild db' => 'reconstrui DB', + 'rebuild cron' => 'reconstrui CRON', + 'update counters' => 'actualizeze contoare', 'suspend' => 'suspendare', - 'unsuspend' => 'activare', + 'unsuspend' => 'unsuspendeze', 'delete' => 'ștergere', - 'show per user' => 'arată pentru utilizator', + 'show per user' => 'arata pentru utilizator', 'login as' => 'intră ca', 'logout' => 'logout', 'edit' => 'editare', - 'open webstats' => 'vizualizare statistica', - 'view logs' => 'vizualizare jurnale', + 'open webstats' => 'deschide raportul de analiză', + 'view logs' => 'vizualiza loguri', 'list records' => 'arată inregistrarile: %s', 'add record' => 'adaugă înregistrare', 'list accounts' => 'arata conturi: %s', - 'add account' => 'adaugă cont', + 'add account' => 'adaugă contul', 'open webmail' => 'deschide webmail', - 'list fail2ban' => 'afișare fail2ban', + 'list fail2ban' => 'arată fail2ban', 'open %s' => 'deschide %s', - 'download' => 'descarcă', - 'restore' => 'restabilește', + 'download' => 'descărca', + 'restore' => 'restabili', 'configure restore settings' => 'configurare parametri de restaurare', 'stop' => 'oprește', 'start' => 'pornește', 'restart' => 'repornește', - 'update' => 'actualizează', + 'update' => 'actualiza', 'generate' => 'generează', - 'Generate CSR' => 'Generează CSR', + 'Generate CSR' => 'Genera cere CSR', 'reread IP' => 'recitește IP', 'enable autoupdate' => 'activează actualizarea automată', 'disable autoupdate' => 'dezactivează actualizarea automată', 'turn on notifications' => 'activează notificările', 'turn off notifications' => 'dezactivează notificările', - 'Adding User' => 'Adăugare Utilizator', - 'Editing User' => 'Editare Utilizator', - 'Adding Domain' => 'Adăugare Domeniu', - 'Editing Domain' => 'Editare Domeniu', - 'Adding DNS Domain' => 'Adăugare Domeniu DNS', - 'Editing DNS Domain' => 'Editare Domeniu DNS', - 'Adding DNS Record' => 'Adăugare Înregistrare DNS', - 'Editing DNS Record' => 'Editare Înregistrare DNS', - 'Adding Mail Domain' => 'Adăugare Domeniu E-MAIL', - 'Editing Mail Domain' => 'Editare Domeniu E-MAIL', - 'Adding Mail Account' => 'Adăugare Cont de E-mail', - 'Editing Mail Account' => 'Editare Cont de E-mail', - 'Adding database' => 'Adăugare Baze de Date', - 'Editing Database' => 'Editare Baze de Date', - 'Adding Cron Job' => 'Adăugare Sarcină', - 'Editing Cron Job' => 'Editare Sarcină', - 'Adding Package' => 'Adăugare Pachet', - 'Editing Package' => 'Editare Pachet', - 'Adding IP address' => 'Adăugare Adresă IP', - 'Editing IP Address' => 'Editare Adresă IP', - 'Editing Backup Exclusions' => 'Editare Excluderi din Backup', + 'Adding User' => 'Adăugare utilizator', + 'Editing User' => 'Editare utilizator', + 'Adding Domain' => 'Adăugare domeniu', + 'Editing Domain' => 'Editare domeniu', + 'Adding DNS Domain' => 'Adăugare domeniu DNS', + 'Editing DNS Domain' => 'Editare domeniu DNS', + 'Adding DNS Record' => 'Adăugare de înregistrare DNS', + 'Editing DNS Record' => 'Editare de înregistrare DNS', + 'Adding Mail Domain' => 'Adăugare domeniu poștal', + 'Editing Mail Domain' => 'Editare domeniu poștal', + 'Adding Mail Account' => 'Adăugare contul de poștă electronică', + 'Editing Mail Account' => 'Editare contul de poștă electronică', + 'Adding database' => 'Adăugare baze de date', + 'Editing Cron Job' => 'Editare sarcina cron', + 'Adding Cron Job' => 'Adăugare sarcina cron', + 'Editing Database' => 'Editare baze de date', + 'Adding Package' => 'Adăugare pachetul', + 'Editing Package' => 'Editare pachetul', + 'Adding IP address' => 'Adăugare adresă IP', + 'Editing IP Address' => 'Editare adresă IP', + 'Editing Backup Exclusions' => 'Editare excluderi', 'Generating CSR' => 'Generare CSR', 'Listing' => 'Vizualizare', - 'Search Results' => 'Rezultate Căutări', - 'Adding Firewall Rule' => 'Adăugare Regulă', - 'Editing Firewall Rule' => 'Editare Regulă', - 'Adding IP Address to Banlist' => 'Adăugare Adresă IP în Listă', + 'Search Results' => 'Rezultatele căutării', + 'Adding Firewall Rule' => 'Adăugare regulă', + 'Editing Firewall Rule' => 'Editare regulă', + 'Adding IP Address to Banlist' => 'Blocarea IP', 'active' => 'activ', 'spnd' => 'suspendat', 'suspended' => 'suspendat', 'running' => 'rulează', 'stopped' => 'oprit', - 'outdated' => 'învechit', + 'outdated' => 'depășit', 'updated' => 'actualizat', 'yes' => 'da', 'no' => 'nu', 'none' => 'nu', - 'pb' => 'Pb', - 'tb' => 'Tb', - 'gb' => 'Gb', - 'mb' => 'Mb', - 'minute' => 'minute', + 'pb' => 'pb', + 'tb' => 'tb', + 'gb' => 'gb', + 'mb' => 'mb', + 'minute' => 'minuta', 'hour' => 'oră', 'day' => 'zi', 'days' => 'zile', @@ -146,57 +160,70 @@ $LANG['ro'] = array( 'minutes' => 'minute', 'month' => 'lună', 'package' => 'pachet', - 'Bandwidth' => 'Trafic Rețea', - 'Disk' => 'Spațiu Disc', + 'Bandwidth' => 'Trafic', + 'Disk' => 'Disk', 'Web' => 'Web', - 'Mail' => 'E-mail', + 'Mail' => 'Poștă', 'Databases' => 'Baze de date', 'User Directories' => 'Fișiere', 'Template' => 'Șablon', - 'Web Template' => 'Șablon WEB', - 'Backend Template' => 'Șablon BACKEND', - 'Proxy Template' => 'Șablon PROXY', - 'DNS Template' => 'Șablon DNS', - 'Web Domains' => 'Domenii WEB', + 'Web Template' => 'Șablonul Web', + 'Backend Template' => 'Șablonul Backend', + 'Proxy Template' => 'Șablonul Proxy', + 'DNS Template' => 'Șablonul DNS', + 'Web Domains' => 'Domenii web', 'SSL Domains' => 'Domenii SSL', - 'Web Aliases' => 'Aliasuri WEB', + 'Web Aliases' => 'Aliasuri web', 'per domain' => 'per domeniu', - 'DNS domains' => 'Domenii DNS', 'DNS Domains' => 'Domenii DNS', + 'DNS domains' => 'Domenii DNS', 'DNS records' => 'Înregistrări DNS', 'Name Servers' => 'Servere NS', - 'Mail Domains' => 'Domenii E-MAIL', - 'Mail Accounts' => 'Conturi de e-mail', - 'Cron Jobs' => 'Sarcini CRON', + 'Mail Domains' => 'Domenii de poștă', + 'Mail Accounts' => 'Conturi de poștă', + 'Cron Jobs' => 'Sarcini cron', 'SSH Access' => 'Acces SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'Adrese IP', - 'Backups' => 'BACKUP-uri', + 'Backups' => 'Copii de rezervă', 'Backup System' => 'Sistem de backup', 'backup exclusions' => 'excluderi', 'template' => 'șablon', - 'SSL Support' => 'Suport SSL', - 'SSL Home Directory' => 'Director Rădăcină SSL', - 'Proxy Support' => 'Suport PROXY', + 'SSL Support' => 'Support SSL', + 'SSL Home Directory' => 'Mapa SSL', + 'Proxy Support' => 'Support Proxy', 'Proxy Extensions' => 'Extensii Proxy', - 'Web Statistics' => 'Statistică WEB', + 'Web Statistics' => 'Statistici web', 'Additional FTP Account' => 'Cont suplimentar FTP', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Expiră', - 'Records' => 'Înregistrări', - 'Catchall email' => 'Adresă implicită (catchall)', - 'AntiVirus Support' => 'Suport Antivirus', - 'AntiSpam Support' => 'Suport Antispam', - 'DKIM Support' => 'Suport DKIM', + 'Records' => 'DNS înregistrări', + 'Serial' => 'Serial', + 'Catchall email' => 'E-mail catchall', + 'AntiVirus Support' => 'Antivirus', + 'AntiSpam Support' => 'Antispam', + 'DKIM Support' => 'DKIM', 'Accounts' => 'Conturi', - 'Quota' => 'Spațiu Disc', + 'Quota' => 'cotă', 'Autoreply' => 'Răspuns automat', 'Forward to' => 'Redirectare către', 'Do not store forwarded mail' => 'Redirectare fără stocare email', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'bază de date', 'User' => 'Utilizator', 'Host' => 'Host', - 'Charset' => 'Set de caractere', + 'Charset' => 'Setul de caractere', 'Min' => 'Min', 'Hour' => 'Oră', 'Day' => 'Zi', @@ -204,82 +231,81 @@ $LANG['ro'] = array( 'Day of week' => 'Ziua săptămânii', 'local' => 'local', 'Run Time' => 'Executat în', - 'Backup Size' => 'Mărime Backup', + 'Backup Size' => 'Mărime de backup', 'SYS' => 'Sistem', 'Domains' => 'Domenii', - 'Status' => 'Stare', - 'shared' => 'comun', + 'Status' => 'Starea', + 'shared' => 'comună', 'dedicated' => 'dedicat', 'Owner' => 'Proprietar', 'Users' => 'Utilizatori', - 'Load Average' => 'Medie Încărcare', - 'Memory Usage' => 'Utilizare RAM', - 'HTTPD Usage' => 'Utilizare HTTPD', - 'NGINX Usage' => 'Utilizare NGINX', - 'MySQL Usage on localhost' => 'Utilizare MySQL (localhost)', - 'PostgreSQL Usage on localhost' => 'Utilizare PostgreSQL (localhost)', - 'Bandwidth Usage eth0' => 'Utilizare Rețea eth0', - 'Bandwidth Usage eth1' => 'Utilizare Rețea eth1', - 'Bandwidth Usage eth2' => 'Utilizare Rețea eth2', - 'Bandwidth Usage eth3' => 'Utilizare Rețea eth3', - 'FTP Usage' => 'Utilizare FTP ', - 'SSH Usage' => 'Utilizare SSH', - 'Exim Usage' => 'Utilizare Exim', + 'Load Average' => 'Load Average', + 'Memory Usage' => 'Utilizare de memorie', + 'APACHE2 Usage' => 'APACHE2 Usage', + 'HTTPD Usage' => 'HTTPD', + 'NGINX Usage' => 'Proxy', + 'MySQL Usage on localhost' => 'MySQL', + 'PostgreSQL Usage on localhost' => 'PostgreSQL', + 'Bandwidth Usage eth0' => 'Utilizare rețelei eth0', + 'Exim Usage' => 'Exim Usage', + 'FTP Usage' => 'FTP ', + 'SSH Usage' => 'SSH', 'reverse proxy' => 'proxy inversă', 'web server' => 'server web', 'dns server' => 'server dns', - 'mail server' => 'server e-mail', + 'mail server' => 'serverul de poștă', 'pop/imap server' => 'server pop/imap', - 'email antivirus' => 'antivirus e-mail', - 'email antispam' => 'antispam e-mail', - 'database server' => 'server baze de date', + 'email antivirus' => 'e-mail antivirus', + 'email antispam' => 'e-mail antispam', + 'database server' => 'server de baze de date', 'ftp server' => 'server ftp', - 'job scheduler' => 'sarcină programată', + 'job scheduler' => 'job scheduler', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', - 'Memory' => 'RAM', - 'Uptime' => 'UPTIME', - 'core package' => 'pachet bază', - 'php interpreter' => 'interpretor php', - 'internal web server' => 'server web intern', + 'Memory' => 'Memorie', + 'Uptime' => 'Uptime', + 'core package' => 'pachetul de bază', + 'php interpreter' => 'php interpret', + 'internal web server' => 'serverul web intern', 'Version' => 'Versiune', - 'Release' => 'Lansare', + 'Release' => 'Release', 'Architecture' => 'Arhitectură', 'Object' => 'Obiect', - 'Owner' => 'Proprietar', 'Username' => 'Nume utilizator', 'Password' => 'Parolă', 'Email' => 'E-mail', 'Package' => 'Pachet', 'Language' => 'Limbă', - 'First Name' => 'Prenume', - 'Last Name' => 'Nume', - 'Send login credentials to email address' => 'Trimite datele de autentificare la adresa de e-mail', + 'First Name' => 'Nume', + 'Last Name' => 'Prenume', + 'Send login credentials to email address' => 'Trimite datele de autentificare la adresa', 'Default Template' => 'Șablon implicit', - 'Default Name Servers' => 'Serverele NS implicite', + 'Default Name Servers' => 'Serverele NS', 'Domain' => 'Domeniu', - 'DNS Support' => 'Suport DNS', - 'Mail Support' => 'Suport E-MAIL', + 'DNS Support' => 'Support DNS', + 'Mail Support' => 'Support E-mail', 'Advanced options' => 'Opțiuni avansate', 'Aliases' => 'Aliasuri', 'SSL Certificate' => 'Certificat SSL', 'SSL Key' => 'Cheia SSL', - 'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediar', + 'SSL Certificate Authority / Intermediate' => 'SSL Intermediar / Certificate Authority', 'SSL CSR' => 'Cerere CSR', 'optional' => 'opțional', 'internal' => 'intern', - 'Statistics Authorization' => 'Autorizare pt. Statistică', - 'Statistics Auth' => 'Autorizare pt. Statistică', + 'Statistics Authorization' => 'Autorizarea statistici', + 'Statistics Auth' => 'Autorizarea statistici', 'Account' => 'Cont', - 'Prefix will be automaticaly added to username' => 'Prefixul %s va fi adăugat automat la numele de utilizator', - 'Send FTP credentials to email' => 'Trimite datele FTP la adresa de e-mail', - 'Expiration Date' => 'Data de Expirare', - 'YYYY-MM-DD' => 'YYYY-MM-DD', + 'Prefix will be automaticaly added to username' => 'Prefix %s va fi adăugat automat la numele de utilizator', + 'Send FTP credentials to email' => 'Trimite datele FTP la e-mail', + 'Expiration Date' => 'Data de expirare', + 'YYYY-MM-DD' => 'AAAA-LL-ZZ', 'Name servers' => 'Server NS', - 'Record' => 'Înregistrare', - 'IP or Value' => 'IP sau Valoare', + 'Record' => 'Înregistrare / Subdomeniu', + 'IP or Value' => 'IP adresa sau valoare', 'Priority' => 'Prioritate', - 'Record Number' => 'Număr Înregistrare', - 'in megabytes' => 'în Mb', + 'Record Number' => 'Numărul de înregistrare', + 'in megabytes' => 'în mb.', 'Message' => 'Mesaj', 'use local-part' => 'doar nume de cont înainte de @', 'one or more email addresses' => 'una sau mai multe adrese de e-mail', @@ -291,32 +317,32 @@ $LANG['ro'] = array( 'Package Name' => 'Nume Pachet', 'Netmask' => 'Mască rețea', 'Interface' => 'Interfață', - 'Shared' => 'Comun', + 'Shared' => 'Comună', 'Assigned user' => 'Utilizator asignat', 'Assigned domain' => 'Domeniu asignat', 'NAT IP association' => 'Asociere IP NAT', - 'shell' => 'shell', + 'shell' => 'access ssh', 'web domains' => 'domenii web', 'web aliases' => 'aliasuri web', 'dns records' => 'înregistrări dns', - 'mail domains' => 'domenii e-mail', - 'mail accounts' => 'conturi e-mail', + 'mail domains' => 'domenii de poștă', + 'mail accounts' => 'conturi de poștă', 'accounts' => 'conturi', 'databases' => 'baze de date', 'cron jobs' => 'sarcini cron', - 'backups' => 'backup-uri', + 'backups' => 'copii de rezervă', 'quota' => 'cotă', 'day of week' => 'ziua săptămânii', 'cmd' => 'comandă', - 'users' => 'utilizatori', + 'users' => 'utilizatorii', 'domains' => 'domenii', 'aliases' => 'aliasuri', 'records' => 'înregistrări', - 'jobs' => 'sarcini', + 'jobs' => 'sarcinile', 'username' => 'utilizator', 'password' => 'parolă', 'type' => 'tip', - 'charset' => 'set de caractere', + 'charset' => 'setul de caractere', 'domain' => 'domeniu', 'ip' => 'IP', 'ip address' => 'adresa ip', @@ -328,87 +354,110 @@ $LANG['ro'] = array( 'ns2' => 'ns2', 'user' => 'utilizator', 'email' => 'e-mail', - 'first name' => 'prenume', # In Romanian language `first name` is `last name` - 'last name' => 'nume', # In Romanian language `last name` is `first name` + 'first name' => 'nume', + 'last name' => 'prenume', 'account' => 'cont', 'ssl certificate' => 'certificat SSL', 'ssl key' => 'cheia SSL', - 'stats user password' => 'parola de utilizator pt. statistici', - 'stats username' => 'nume de utilizator pt. statistici', - 'stats password' => 'parola de utilizator pt. statistici', - 'ftp user password' => 'parola de utilizator pt. FTP', - 'ftp user' => 'utilizator FTP', - 'Last 70 lines of %s.%s.log' => 'Ultimele 70 de linii ale %s.%s.log', + 'stats user password' => 'parola de utilizator statistici', + 'stats username' => 'nume de utilizator statistici', + 'stats password' => 'parola de utilizator statistici', + 'ftp user password' => 'parola de FTP', + 'ftp user' => 'cont FTP', + 'Last 70 lines of %s.%s.log' => 'Ultimele 70 linii de %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Descarcă AccessLog', 'Download ErrorLog' => 'Descarcă ErrorLog', 'Country' => 'Țară', '2 letter code' => 'cod de 2 litere', - 'State / Province' => 'Stat / Provincie / Județ', + 'State / Province' => 'Județ', 'City / Locality' => 'Oraș / Localitate', 'Organization' => 'Organizație', 'Action' => 'Acțiune', 'Protocol' => 'Protocol', 'Port' => 'Port', 'Comment' => 'Comentariu', - 'Banlist' => 'Blocare', - 'ranges are acceptable' => 'intervalele sunt acceptate', - 'CIDR format is supported' => 'formatul CIDR este suportat', - 'Add one more Name Server' => 'Adaugă unul sau mai multe servere NS', + 'Banlist' => 'Banlist', + 'ranges are acceptable' => 'intervale sunt acceptabile', + 'CIDR format is supported' => 'format CIDR este suportat', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', + 'Add one more Name Server' => 'Add one more Name Server', - 'unlimited' => 'nelimitat', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + + 'unlimited' => 'unlimited', '1 account' => '1 utilizator', '%s accounts' => '%s utilizatori', '1 domain' => '1 domeniu', '%s domains' => '%s domenii', - '1 record' => '1 înregistrare', + '1 record' => '1 înregistra', '%s records' => '%s înregistrări', - '1 mail account' => '1 cont de e-mail', - '%s mail accounts' => '%s conturi de e-mail', - '1 database' => '1 bază de date', + '1 mail account' => '1 cont de poștă', + '%s mail accounts' => '%s conturi de poștă', + '1 database' => '1 baza de date', '%s databases' => '%s baze de date', '1 cron job' => '1 sarcină', '%s cron jobs' => '%s sarcini', - '1 archive' => '1 arhivă', + '1 archive' => '1 arhiva', '%s archives' => '%s arhive', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 pachet', '%s packages' => '%s pachete', - '1 IP address' => '1 adresă IP', - '%s IP addresses' => '%s adrese IP', - '1 month' => '1 lună', + '1 IP address' => '1 IP adresa', + '%s IP addresses' => '%s IP adrese', + '1 month' => '1 luna', '%s months' => '%s luni', - '1 log record' => '1 înregistrare', + '1 log record' => '1 înregistra', '%s log records' => '%s înregistrări', '1 object' => '1 obiect', '%s objects' => '%s obiecte', - 'no exclusions' => 'nu sunt excluderi', + 'no exclusions' => 'nu există excluderi', '1 rule' => '1 regulă', '%s rules' => '%s reguli', - 'There are no currently banned IP' => 'Nu sunt IP-uri blocate în prezent', + 'There are no currently banned IP' => 'La moment nu există IP interzise', - 'USER_CREATED_OK' => 'Utilizatorul %s a fost creat cu succes.', - 'WEB_DOMAIN_CREATED_OK' => 'Domeniul %s a fost creat cu succes.', - 'DNS_DOMAIN_CREATED_OK' => 'Domeniul %s a fost creat cu succes.', - 'DNS_RECORD_CREATED_OK' => 'Înregistrarea %s.%s a fost creată cu succes.', - 'MAIL_DOMAIN_CREATED_OK' => 'Domeniul %s a fost creat cu succes.', - 'MAIL_ACCOUNT_CREATED_OK' => 'Contul de e-mail %s@%s a fost creat cu succes.', - 'DATABASE_CREATED_OK' => 'Baza de date %s a fost creată cu succes.', + 'USER_CREATED_OK' => 'Utilizator %s a fost creat cu succes', + 'WEB_DOMAIN_CREATED_OK' => 'Domeniu %s a fost creat cu succes.', + 'DNS_DOMAIN_CREATED_OK' => 'Domeniu %s a fost creat cu succes.', + 'DNS_RECORD_CREATED_OK' => 'Înregistrare %s.%s a fost creată cu succes.', + 'MAIL_DOMAIN_CREATED_OK' => 'Domeniu %s a fost creat cu succes.', + 'MAIL_ACCOUNT_CREATED_OK' => 'Contul de poștă %s@%s a fost creat cu succes', + 'DATABASE_CREATED_OK' => 'Baza de date %s a fost creată cu succes', 'CRON_CREATED_OK' => 'Sarcina a fost creată cu succes.', - 'IP_CREATED_OK' => 'Adresa IP %s a fost creată cu succes.', - 'PACKAGE_CREATED_OK' => 'Pachetul %s a fost creat cu succes.', - 'SSL_GENERATED_OK' => 'Certificatul SSL a fost generat cu succes.', - 'RULE_CREATED_OK' => 'Regula a fost creată cu succes.', - 'Autoupdate has been successfully enabled' => 'Actualizarea automată a fost activată cu succes.', - 'Autoupdate has been successfully disabled' => 'Actualizarea automată a fost deactivată cu success.', - 'Cronjob email reporting has been successfully enabled' => 'Notificarea prin e-mail a fost activată cu succes.', - 'Cronjob email reporting has been successfully disabled' => 'Notificarea prin e-mail a fost deactivată cu succes.', + 'IP_CREATED_OK' => '"IP adresa %s a fost creată cu succes.', + 'PACKAGE_CREATED_OK' => 'Pachet %s a fost creat cu succes.', + 'SSL_GENERATED_OK' => 'SSL certificat a fost generat cu succes.', + 'RULE_CREATED_OK' => 'Regula a fost creata cu succes.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text + 'Autoupdate has been successfully enabled' => 'Autoupdate a fost activat cu succes', + 'Autoupdate has been successfully disabled' => 'Autoupdate a fost deactivat cu success', + 'Cronjob email reporting has been successfully enabled' => 'Raportare cron a fost activată cu succes', + 'Cronjob email reporting has been successfully disabled' => 'Raportare cron a fost deactivată cu succes', 'Changes has been saved.' => 'Modificările au fost salvate.', 'Confirmation' => 'Confirmare', - 'DELETE_USER_CONFIRMATION' => 'Ești sigur că dorești să ștergi utilizatorul %s?', - 'SUSPEND_USER_CONFIRMATION' => 'Ești sigur că dorești să suspenzi utilizatorul %s?', - 'UNSUSPEND_USER_CONFIRMATION' => 'Ești sigur că dorești să activezi utilizatorul %s?', - 'DELETE_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să ștergi domeniul %s?', - 'SUSPEND_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să suspenzi domeniul %s?', - 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să activezi domeniul %s?', + 'DELETE_USER_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?', + 'SUSPEND_USER_CONFIRMATION' => 'Ești sigur că dorești să suspendezi %s?', + 'UNSUSPEND_USER_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi %s?', + 'DELETE_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?', + 'SUSPEND_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să suspendezi %s?', + 'UNSUSPEND_DOMAIN_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi %s?', 'DELETE_RECORD_CONFIRMATION' => 'Ești sigur că dorești să ștergi înregistrea %s?', 'SUSPEND_RECORD_CONFIRMATION' => 'Ești sigur că dorești să suspenzi înregistrea %s?', 'UNSUSPEND_RECORD_CONFIRMATION' => 'Ești sigur că dorești să activezi înregistrea %s?', @@ -430,15 +479,15 @@ $LANG['ro'] = array( 'UNSUSPEND_RULE_CONFIRMATION' => 'Ești sigur că dorești să activezi regula #%s?', 'LEAVE_PAGE_CONFIRMATION' => 'Părăsești pagina?', 'RESTART_CONFIRMATION' => 'Ești sigur că dorești să restartezi %s?', - 'Welcome' => 'Bine ai venit', - 'LOGGED_IN_AS' => 'Te-ai autentificat ca utilizatorul %s', + 'Welcome' => 'Bun venit', + 'LOGGED_IN_AS' => 'Ai intrat ca utilizator %s', 'Error' => 'Eroare', - 'Invalid username or password' => 'Numele de utilizator sau parola este greșită', - 'Invalid username or code' => 'Numele de utilizator sau codul este greșit', - 'Passwords not match' => 'Parolele nu corespund', - 'Please enter valid email address.' => 'Introduceți o adresă de e-mail validă.', - 'Field "%s" can not be blank.' => 'Câmpul "%s" nu poate fi gol.', - 'Password is too short.' => 'Parola este prea scurtă. Utilizați minimum 6 caractere.', + 'Invalid username or password' => 'Numele de utilizator sau parola greșita', + 'Invalid username or code' => 'Numele de utilizator sau cod greșit', + 'Passwords not match' => 'Parolele nu corespunde', + 'Please enter valid email address.' => 'Introduceti adresa de e-mail validă.', + 'Field "%s" can not be blank.' => 'Cîmp "%s" nu poate fi gol.', + 'Password is too short.' => 'Parola este prea scurt. Utilizați minim 6 de simboluri.', 'Error code:' => 'Cod de eroare: %s', 'SERVICE_ACTION_FAILED' => '"%s" "%s" failed', 'IP address is in use' => 'Adresa IP este utilizată', @@ -447,83 +496,109 @@ $LANG['ro'] = array( 'RESTORE_SCHEDULED' => 'Sarcina a fost adăugată la coadă. Vei primi o notificare prin e-mail atunci cand restaurarea va fi gata.', 'RESTORE_EXISTS' => 'O restaurare este în progres. Te rog să aștepți finalizarea acesteia.', - 'WEB_EXCLUSIONS' => "Adaugă un domeniu pe linie. Pentru a exclude toate domeniile folosește *. Pentru a exclude dosare specifice completează în formatul: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Adaugă un domeniu pe linie. Pentru a exclude toate domeniile folosește *.", - 'MAIL_EXCLUSIONS' => "Adaugă un domeniu pe linie. Pentru a exclude toate domeniile folosește *. Pentru a exclude conturile specifice completează în formatul: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Adaugă o bază de date pe linie. Pentru a exclude toate bazele de date folosește *.", - 'CRON_EXCLUSIONS' => "Pentru a exclude toate sarcinile folosește *.", - 'USER_EXCLUSIONS' => "Adaugă un dosar pe linie. Pentru a exclude toate dosarele folosește *.", + 'WEB_EXCLUSIONS' => 'Adauga domeniu câte unul pe linie. Pentru a exclude toate domeniile bagă *. Format pentru a exclude directoare specifice: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Adauga domeniu câte unul pe linie. Pentru a exclude toate domeniile bagă *', + 'MAIL_EXCLUSIONS' => 'Adauga domeniu câte unul pe linie. Pentru a exclude toate domeniile bagă *. Format pentru a exclude conturile specifice: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Adauga câte o baza pe linie. Pentru a exclude toate baze bagă *', + 'CRON_EXCLUSIONS' => 'Pentru a exclude toate sarcinile bagă *', + 'USER_EXCLUSIONS' => 'Adauga câte o directoria pe linie. Pentru a exclude toate bagă *', - 'Welcome to Vesta Control Panel' => 'Bine ai venit la panoul de control Vesta', + 'Welcome to Vesta Control Panel' => 'Bine ați venit la panoul de control Vesta', 'MAIL_FROM' => 'Vesta Control Panel ', 'GREETINGS_GORDON_FREEMAN' => "Salut, %s %s,\n", 'GREETINGS' => "Salut,\n", - 'ACCOUNT_READY' => "Contul tău a fost creat și este gata pentru utilizare.\n\nhttps://%s/login/\nUtilizator: %s\nParolă: %s\n\n--\nPanoul de control Vesta\n", + 'ACCOUNT_READY' => "Contul dvs.este gata.\n\nhttps://%s/login/\nUtilizator: %s\nParolă: %s\n\n--\nPanoul de control Vesta\n", 'FTP login credentials' => 'Datele de autentificare FTP', - 'FTP_ACCOUNT_READY' => "Contul FTP a fost creat și este gata pentru utilizare.\n\nHost: %s\nUtilizator: %s_%s\nParolă: %s\n\n--\nPanoul de control Vesta\n", + 'FTP_ACCOUNT_READY' => "Contul FTP dvs. este gata.\n\nHost: %s\nUtilizator: %s_%s\nParolă: %s\n\n--\nPanoul de control Vesta\n", 'Database Credentials' => 'Datele de autentificare BD', 'DATABASE_READY' => "Baza de date a fost creată și este gata pentru utilizare.\n\nBD: %s\nUtilizator: %s\nParolă: %s\n%s\n\n--\nPanoul de control Vesta\n", - 'forgot password' => 'am uitat parola', - 'Confirm' => 'Confirmare', + 'forgot password' => 'uitat parola', + 'Confirm' => 'Confirma', 'New Password' => 'Noua parolă', - 'Confirm Password' => 'Repetare parolă', - 'Reset' => 'Resetare', + 'Confirm Password' => 'Repetarea parolei', + 'Reset' => 'Reseta', 'Reset Code' => 'Cod de resetare', - 'RESET_NOTICE' => '', - 'RESET_CODE_SENT' => 'Codul de resetare a fost trimis la adresa ta de e-mail.
', - 'MAIL_RESET_SUBJECT' => 'Schimbare parola %s', - 'PASSWORD_RESET_REQUEST'=>"Pentru schimbarea parolei, te rog să urmezi link-ul:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n\n\nDacă nu ai solicitat resetarea parolei, ignoră acest mesaj.\n\n--\nPanoul de control Vesta\n", + 'RESET_NOTICE' => '', // should we add something here? + 'RESET_CODE_SENT' => 'Cod de resetare a fost trimis la email dvs..
', + 'MAIL_RESET_SUBJECT' => 'Schimbarea parolei %s', + 'PASSWORD_RESET_REQUEST'=>"Pentru a shimba parolei, vă rugăm faceți clic aici:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n\n\nDacă nu ați solicitat o procedură de resetarea parolei, vă rugăm să ignorați această scrisoare.\n\n--\nPanoul de control Vesta\n", - 'Jan' => 'Ian', + 'Jan' => 'Jan', 'Feb' => 'Feb', 'Mar' => 'Mar', 'Apr' => 'Apr', - 'May' => 'Mai', - 'Jun' => 'Iun', - 'Jul' => 'Iul', + 'May' => 'May', + 'Jun' => 'Jun', + 'Jul' => 'Jul', 'Aug' => 'Aug', 'Sep' => 'Sep', 'Oct' => 'Oct', - 'Nov' => 'Noi', + 'Nov' => 'Nov', 'Dec' => 'Dec', - 'Configuring Server' => 'Configurare Server', - 'Hostname' => 'Nume Host', - 'Time Zone' => 'Fus Orar', - 'Default Language' => 'Limba Implicită', - 'FileSystem Disk Quota' => 'Cota Spațiu (Disk Quota)', - 'Vesta Control Panel Plugins' => 'VESTA', - 'preview' => 'previzualizare', - 'Reseller Role' => 'Rol de Revânzător', - 'Web Config Editor' => 'Editor Configurare Web', - 'Template Manager' => 'Manager Șabloane', - 'Backup Migration Manager' => 'Manager Migrare Backup', - 'FileManager' => 'Manager Fișiere', - 'show: CPU / MEM / NET / DISK' => 'afișare: CPU / MEM / NET / DISK', + 'Configuring Server' => 'Configuring Server', + 'Hostname' => 'Hostname', + 'Time Zone' => 'Time Zone', + 'Default Language' => 'Default Language', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => 'FileSystem Disk Quota', + 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', + 'preview' => 'preview', + 'Reseller Role' => 'Reseller Role', + 'Web Config Editor' => 'Web Config Editor', + 'Template Manager' => 'Template Manager', + 'Backup Migration Manager' => 'Backup Migration Manager', + 'FileManager' => 'FileManager', + 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', - 'sort by' => 'sortare după', + 'sort by' => 'sort by', 'Date' => 'Data', - 'Starred' => 'Stea', - 'Name' => 'Nume', + 'Starred' => 'Starred', + 'Name' => 'Name', - 'File Manager' => 'Manager Fișiere', - 'type' => 'tip', - 'size' => 'marime', - 'date' => 'dată', - 'name' => 'nume', - 'Initializing' => 'Inițializare', - 'UPLOAD' => 'ÎNCARCĂ', - 'NEW FILE' => 'FIȘIER NOU', - 'NEW DIR' => 'DOSAR NOU', - 'DELETE' => 'ȘTERGE', - 'RENAME' => 'REDENUMEȘTE', - 'COPY' => 'COPIAZĂ', - 'ARCHIVE' => 'ARHIVEAZĂ', - 'EXTRACT' => 'EXTRAGE', - 'DOWNLOAD' => 'DESCARCĂ', + + 'File Manager' => 'File Manager', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -538,12 +613,20 @@ $LANG['ro'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -552,7 +635,17 @@ $LANG['ro'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -568,31 +661,31 @@ $LANG['ro'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -604,5 +697,34 @@ $LANG['ro'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + ); diff --git a/web/inc/i18n/ru.php b/web/inc/i18n/ru.php index 4e26d8e4..0055bf0a 100644 --- a/web/inc/i18n/ru.php +++ b/web/inc/i18n/ru.php @@ -6,7 +6,6 @@ */ $LANG['ru'] = array( - 'Packages' => 'Пакеты', 'IP' => 'IP', 'Graphs' => 'Графики', @@ -27,6 +26,21 @@ $LANG['ru'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Добавить аккаунт', 'Add Domain' => 'Добавить домен', 'Add Web Domain' => 'Добавить домен', @@ -46,9 +60,9 @@ $LANG['ru'] = array( 'Search' => 'Поиск', 'Add one more FTP Account' => 'Добавить еще один FTP аккаунт', 'Overall Statistics' => 'Сводная статистика', - 'Daily' => 'Ежедневые', - 'Weekly' => 'Еженедельные', - 'Monthly' => 'Ежемесячные', + 'Daily' => 'по дням', + 'Weekly' => 'по дням недели', + 'Monthly' => 'по месяцам', 'Yearly' => 'Ежегодные', 'Add' => 'Добавить', 'Back' => 'Назад', @@ -92,8 +106,8 @@ $LANG['ru'] = array( 'reread IP' => 'перечитать IP', 'enable autoupdate' => 'включить автообновление', 'disable autoupdate' => 'выключить автообновление', - 'turn on notifications' => 'включить почтовые уведомления', - 'turn off notifications' => 'выключить почтовые уведомления', + 'turn on notifications' => 'вкл. уведомления', + 'turn off notifications' => 'выкл. уведомления', 'Adding User' => 'Добавление аккаунта', 'Editing User' => 'Редактирование аккаунта', @@ -116,9 +130,9 @@ $LANG['ru'] = array( 'Adding IP address' => 'Добавление IP адреса', 'Editing IP Address' => 'Редактирование IP адреса', 'Editing Backup Exclusions' => 'Редактирование исключений', + 'Generating CSR' => 'Генерирование CSR запроса', 'Listing' => 'Просмотр', 'Search Results' => 'Результаты поиска', - 'Generating CSR' => 'Генерирование CSR запроса', 'Adding Firewall Rule' => 'Добавление правила фаервола', 'Editing Firewall Rule' => 'Редактирование правила фаервола', 'Adding IP Address to Banlist' => 'Блокирование IP адреса', @@ -162,13 +176,14 @@ $LANG['ru'] = array( 'Web Aliases' => 'Веб алиасы', 'per domain' => 'на домен', 'DNS Domains' => 'DNS домены', - 'DNS Domains' => 'DNS домены', + 'DNS domains' => 'DNS домены', 'DNS records' => 'DNS записи', 'Name Servers' => 'Сервер имен', 'Mail Domains' => 'Почтовые домены', 'Mail Accounts' => 'Почтовые аккаунты', 'Cron Jobs' => 'Cron задания', 'SSH Access' => 'Доступ по SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP адреса', 'Backups' => 'Резервные копии', 'Backup System' => 'Система резервного копирования', @@ -180,10 +195,12 @@ $LANG['ru'] = array( 'Proxy Extensions' => 'Обработка Proxy', 'Web Statistics' => 'Статистика сайта', 'Additional FTP Account' => 'Дополнительный ftp', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Истекает', 'Records' => 'DNS записи', + 'Serial' => 'Serial', 'Catchall email' => 'Ловушка почты', 'AntiVirus Support' => 'Антивирус', 'AntiSpam Support' => 'Антиспам', @@ -193,12 +210,22 @@ $LANG['ru'] = array( 'Autoreply' => 'Автоответчик', 'Forward to' => 'Пересылка', 'Do not store forwarded mail' => 'Не сохранять перенаправленные письма', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'база данных', 'User' => 'Пользователь', 'Host' => 'Сервер', 'Charset' => 'Кодировка', 'Min' => 'Мин', - 'Hour' => 'Час', + 'Hour' => 'Часы', 'Day' => 'День', 'Month' => 'Месяц', 'Day of week' => 'День недели', @@ -214,11 +241,13 @@ $LANG['ru'] = array( 'Users' => 'Пользователи', 'Load Average' => 'Общая нагрузка', 'Memory Usage' => 'Использование памяти', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'Веб сервер', 'NGINX Usage' => 'Proxy', 'MySQL Usage on localhost' => 'Сервер базы данных MySQL', 'PostgreSQL Usage on localhost' => 'Сервер базы данных PostgreSQL', 'Bandwidth Usage eth0' => 'Использование cети: eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP сервер', 'SSH Usage' => 'SSH сервер', 'reverse proxy' => 'обратный прокси', @@ -231,6 +260,8 @@ $LANG['ru'] = array( 'database server' => 'сервер баз данных', 'ftp server' => 'ftp сервер', 'job scheduler' => 'планировщик заданий', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'Процессор', 'Memory' => 'Память', 'Uptime' => 'Запущен', @@ -241,7 +272,6 @@ $LANG['ru'] = array( 'Release' => 'Релиз', 'Architecture' => 'Архитектура', 'Object' => 'Объект', - 'Owner' => 'Владелец', 'Username' => 'Аккаунт', 'Password' => 'Пароль', 'Email' => 'E-mail', @@ -282,7 +312,7 @@ $LANG['ru'] = array( 'Prefix will be automaticaly added to database name and database user' => 'Префикс %s будет автоматически добавлен к БД и пользователю БД', 'Database' => 'База данных', 'Type' => 'Тип', - 'Minute' => 'Минута', + 'Minute' => 'Минуты', 'Command' => 'Команда', 'Package Name' => 'Название пакета', 'Netmask' => 'Маска подсети', @@ -335,6 +365,8 @@ $LANG['ru'] = array( 'ftp user password' => 'пароль для доступа к FTP', 'ftp user' => 'пользователь FTP', 'Last 70 lines of %s.%s.log' => 'Последние 70 строк файла %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Скачать AccessLog', 'Download ErrorLog' => 'Скачать ErrorLog', 'Country' => 'Страна', @@ -349,8 +381,26 @@ $LANG['ru'] = array( 'Banlist' => 'Черный список', 'ranges are acceptable' => 'можно использовать диапазоны', 'CIDR format is supported' => 'поддерживается формат CIDR', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Добавить ещё один Сервер Имён', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'неограничено', '1 account' => ' пользователей на странице: 1', '%s accounts' => 'пользователей на странице: %s', @@ -366,6 +416,8 @@ $LANG['ru'] = array( '%s cron jobs' => 'заданий на странице: %s', '1 archive' => 'архивов на странице: 1', '%s archives' => 'архивов на странице: %s', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => 'пакетов на странице: 1', '%s packages' => 'пакетов на странице: %s', '1 IP address' => 'IP адресов на странице: 1', @@ -393,6 +445,7 @@ $LANG['ru'] = array( 'PACKAGE_CREATED_OK' => 'Пакет %s успешно создан.', 'SSL_GENERATED_OK' => 'SSL cертификат был успешно сгенерирован.', 'RULE_CREATED_OK' => 'Правило было успешно добавлено', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Автообновление было успешно включено', 'Autoupdate has been successfully disabled' => 'Автобновление было успешно выключено', 'Cronjob email reporting has been successfully enabled' => 'Cron уведомления были успешно включены', @@ -443,12 +496,12 @@ $LANG['ru'] = array( 'RESTORE_SCHEDULED' => 'Задание успешно добавлено в очередь. После завершения вы получите полный отчет по почте.', 'RESTORE_EXISTS' => 'Задание уже выполняется, пожалуйста дождитесь окончания.', - 'WEB_EXCLUSIONS' => "Укажите домены по одному в строке. Для того чтобы исключить все, используйте *. Чтобы исключить только некоторые папки, используйте следующий формат: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Укажите домены по одному в строке. Для того чтобы исключить все, используйте *", - 'MAIL_EXCLUSIONS' => "Укажите домены по одному в строке. Для того чтобы исключить все, используйте *. Чтобы исключить отдельные аккаунты, используйте следующий формат: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Укажите базы по одной в строке. Для того чтобы исключить все, используйте *", - 'CRON_EXCLUSIONS' => "Для того чтобы исключить все задания, используйте *", - 'USER_EXCLUSIONS' => "Укажите папки по одной в строке. Для того чтобы исключить все, используйте *", + 'WEB_EXCLUSIONS' => 'Укажите домены по одному в строке. Для того чтобы исключить все, используйте *. Чтобы исключить только некоторые папки, используйте следующий формат: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Укажите домены по одному в строке. Для того чтобы исключить все, используйте *', + 'MAIL_EXCLUSIONS' => 'Укажите домены по одному в строке. Для того чтобы исключить все, используйте *. Чтобы исключить отдельные аккаунты, используйте следующий формат: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Укажите базы по одной в строке. Для того чтобы исключить все, используйте *', + 'CRON_EXCLUSIONS' => 'Для того чтобы исключить все задания, используйте *', + 'USER_EXCLUSIONS' => 'Укажите папки по одной в строке. Для того чтобы исключить все, используйте *', 'Welcome to Vesta Control Panel' => 'Добро пожаловать в панель управления Vesta', 'MAIL_FROM' => 'Vesta Control Panel ', @@ -468,7 +521,7 @@ $LANG['ru'] = array( 'Confirm Password' => 'Подтверждение пароля', 'Reset' => 'Сбросить', 'Reset Code' => 'Код восстановления', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Код для восстановления пароля был выслан на ваш электронный адрес.
', 'MAIL_RESET_SUBJECT' => 'Восстановление пароля %s', 'PASSWORD_RESET_REQUEST'=>"Чтобы восстановить пароль, пройдите по ссылке:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nВы также можете октрыть страницу https://%s/reset/?action=code&user=%s и вручную ввести код для восстановления:\n%s\n\nЕсли вы не запрашивали процедуру восстановления пароля, пожалуйста проигнорируйте это письмо и примите наши извинения.\n\n--\nПанель управления Vesta\n", @@ -490,6 +543,29 @@ $LANG['ru'] = array( 'Hostname' => 'Имя Хоста', 'Time Zone' => 'Часовой Пояс', 'Default Language' => 'Язык по умолчанию', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Плагины', 'preview' => 'превью', @@ -505,8 +581,8 @@ $LANG['ru'] = array( 'Starred' => 'Избранные', 'Name' => 'Имя', + 'File Manager' => 'Файлы', - 'type' => 'тип', 'size' => 'размер', 'date' => 'дата', 'name' => 'имя', @@ -516,10 +592,13 @@ $LANG['ru'] = array( 'NEW DIR' => 'ПАПКА', 'DELETE' => 'УДАЛИТЬ', 'RENAME' => 'ПЕРЕИМЕНОВАТЬ', + 'MOVE' => 'ПЕРЕМЕСТИТЬ', + 'RIGHTS' => 'ПРАВА', 'COPY' => 'КОПИЯ', 'ARCHIVE' => 'АРХИВ', 'EXTRACT' => 'РАСПАКОВАТЬ', 'DOWNLOAD' => 'СКАЧАТЬ', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Нажмите', 'to reload the page' => 'чтобы перегрузить страницу', 'Directory name cannot be empty' => 'Название директории не может быть пустым', @@ -534,12 +613,20 @@ $LANG['ru'] = array( 'Copy' => 'Скопировать', 'Cancel' => 'Отмена', 'Rename' => 'Переименовать', + 'Move' => 'Пемеместить', + 'Change Rights' => 'Сменить права', 'Delete' => 'Удалить', 'Extract' => 'Распаковать', 'Create' => 'Создать', 'Compress' => 'Запаковать', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Переместить файлы', 'Are you sure you want to copy' => 'Вы уверены, что хотите скопировать', + 'Are you sure you want to move' => 'Вы уверены, что хотите переместить', 'Are you sure you want to delete' => 'Вы уверены, что хотите удалить', 'into' => 'в', 'existing files will be replaced' => 'существующие файлы будут перезаписаны', @@ -548,7 +635,17 @@ $LANG['ru'] = array( 'already exists' => 'уже существует', 'Create file' => 'Создать файл', 'Create directory' => 'Создать папку', + 'read by owner' => 'чтение для владельца', + 'write by owner' => 'запись для владельца', + 'execute/search by owner' => 'запуск/поиск для владельца', + 'read by group' => 'чтение для группы', + 'write by group' => 'запись для группы', + 'execute/search by group' => 'запуск/поиск для группы', + 'read by others' => 'чтение для остальных', + 'write by others' => 'запись для остальных', + 'execute/search by others' => 'запуск/поиск для остальных', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Перейти к Форме Добавления', 'Save Form' => 'Сохрнанить Форму', 'Cancel saving form' => 'Отменить Сохранение', @@ -564,31 +661,31 @@ $LANG['ru'] = array( 'Move backward through top menu' => 'Фокус на предыдущий пункт меню', 'Move forward through top menu' => 'Фокус на следующий пункт меню', 'Enter focused element' => 'Перейти в активный пункт меню', + 'Move up through elements list' => 'Фокус на предыдущий элемент списка', + 'Move down through elements list' => 'Фокус на следующий элемент списка', 'Upload' => 'Загрузить файл', 'New File' => 'Создать Файл', 'New Folder' => 'Создать Папку', 'Download' => 'Скачать', - 'Rename' => 'Переименовать', - 'Copy' => 'Скопировать', 'Archive' => 'Заархивировать', - 'Delete' => 'Удалить', 'Save File (in text editor)' => 'Сохранить Файл (в рамках текстового редактора)', 'Close Popup / Cancel' => 'Закрыть Попап / Отмена', - 'Move Cursor Up' => 'Переемстить курсор вверх', - 'Move Cursor Dow' => 'Переместить курсор вниз', + 'Move Cursor Up' => 'Переместить курсор вверх', + 'Move Cursor Down' => 'Переместить курсор вниз', 'Switch to Left Tab' => 'Переключиться на таб слева', 'Switch to Right Tab' => 'Переключиться на таб справа', 'Switch Tab' => 'Переключить активный таб', - 'Go to the Top of File List' => 'Перейти к первому файлу', + 'Go to the Top of the File List' => 'Перейти к первому файлу', 'Go to the Last File' => 'Перейти к последнему файлу', - 'Open File/Enter Directory' => 'Открыть Файл/Папку', + 'Open File / Enter Directory' => 'Открыть Файл/Папку', + 'Edit File' => 'Редактировать Файл', 'Go to Parent Directory' => 'Перейти в родительскую директорию', 'Select Current File' => 'Выбрать активный файл', 'Select Bunch of Files' => 'Выбрать блок файлов', - 'Append File to the Current Selection' => 'Добавить файл к выбранным', + 'Add File to the Current Selection' => 'Добавить файл к выбранным', 'Select All Files' => 'Выбрать все файлы', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'горячие клавиши заимствованы из великолепного файл менеджера GNU Midnight Commander', 'Licence Key' => 'Лицензионный Ключ', @@ -600,6 +697,34 @@ $LANG['ru'] = array( 'Licence Deactivated' => 'Лицензия Отключена', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' => 'Это коммерческий модуль, чтобы включить его, вам необходимо приобрести лицензию.', -); \ No newline at end of file + 'Minutes' => 'по минутам', + 'Hourly' => 'по часам', + 'Run Command' => 'Выполнять', + 'every month' => 'каждый месяц', + 'every odd month' => 'каждый нечётный месяц', + 'every even month' => 'каждый чётный месяц', + 'every day' => 'каждый день', + 'every odd day' => 'каждый нечётный день', + 'every even day' => 'каждый чётный день', + 'weekdays (5 days)' => 'рабочие дни', + 'weekend (2 days)' => 'выходные', + 'Monday' => 'понедельник', + 'Tuesday' => 'вторник', + 'Wednesday' => 'среда', + 'Thursday' => 'четверг', + 'Friday' => 'пятница', + 'Saturday' => 'суббота', + 'Sunday' => 'воскресенье', + 'every hour' => 'каждый час', + 'every two hours' => 'каждые два часа', + 'every minute' => 'каждую минуту', + 'every two minutes' => 'каждые 2 минуты', + 'every' => 'каждые', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/se.php b/web/inc/i18n/se.php index 70b85165..112ab91e 100644 --- a/web/inc/i18n/se.php +++ b/web/inc/i18n/se.php @@ -10,6 +10,7 @@ $LANG['se'] = array( 'Graphs' => 'Grafer', 'Statistics' => 'Statistik', 'Log' => 'Loggar', + 'Server' => 'Server', 'Services' => 'Tjänster', 'Firewall' => 'Brandvägg', 'Updates' => 'Uppdateringar', @@ -24,6 +25,21 @@ $LANG['se'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUPER', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Lägg till användare', 'Add Domain' => 'Lägg till domän', 'Add Web Domain' => 'Lägg till Webbhotellsdomän', @@ -151,6 +167,7 @@ $LANG['se'] = array( 'User Directories' => 'Användarkataloger', 'Template' => 'Mall', 'Web Template' => 'Apache-mall', + 'Backend Template' => 'Backend Template', 'Proxy Template' => 'Nginx-mall', 'DNS Template' => 'DNS-mall', 'Web Domains' => 'Webb-domäner', @@ -158,13 +175,14 @@ $LANG['se'] = array( 'Web Aliases' => 'Webb-alias', 'per domain' => 'per domän', 'DNS Domains' => 'DNS-domäner', - 'DNS Domains' => 'DNS-domäner', - 'DNS records' => 'DNS-poster' , + 'DNS domains' => 'DNS-domäner', + 'DNS records' => 'DNS-poster', 'Name Servers' => 'Namnservrar', 'Mail Domains' => 'Mail-domäner', 'Mail Accounts' => 'Mailkonto', 'Cron Jobs' => 'Cron-uppdrag', 'SSH Access' => 'SSH-tillgång', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP-adresser', 'Backups' => 'Säkerhetskopieringar', 'Backup System' => 'Backup-systemet', @@ -176,10 +194,12 @@ $LANG['se'] = array( 'Proxy Extensions' => 'Nginx-tillägg', 'Web Statistics' => 'Webbstatistik', 'Additional FTP Account' => 'Ytterligare FTP-konto', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Utgår', 'Records' => 'Poster', + 'Serial' => 'Serial', 'Catchall email' => 'Fånga-allt-adress', 'AntiVirus Support' => 'Antivirus-stöd', 'AntiSpam Support' => 'Antispam-stöd', @@ -189,6 +209,16 @@ $LANG['se'] = array( 'Autoreply' => 'Automatsvar', 'Forward to' => 'Vidarebefordra till', 'Do not store forwarded mail' => 'Lagra inte vidarebefordrad mail', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'databas', 'User' => 'Användare', 'Host' => 'Värd', @@ -210,11 +240,13 @@ $LANG['se'] = array( 'Users' => 'Användare', 'Load Average' => 'Genomsnittsbelastning', 'Memory Usage' => 'Minnesanvändande', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD-användning', 'NGINX Usage' => 'NGINX-användande', 'MySQL Usage on localhost' => 'MySQL-användande på localhost', 'PostgreSQL Usage on localhost' => 'PostgreSQL-användande på localhost', 'Bandwidth Usage eth0' => 'Bandbreddsanvändande på eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP-användande', 'SSH Usage' => 'SSH-användande', 'reverse proxy' => 'omvänd proxy', @@ -227,6 +259,8 @@ $LANG['se'] = array( 'database server' => 'databasserver', 'ftp server' => 'ftp-server', 'job scheduler' => 'schemaläggare för uppdrag', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'Processor', 'Memory' => 'Minne', 'Uptime' => 'Upptid', @@ -237,7 +271,6 @@ $LANG['se'] = array( 'Release' => 'Utgåva', 'Architecture' => 'Arkitektur', 'Object' => 'Objekt', - 'Owner' => 'Ägare', 'Username' => 'Användarnamn', 'Password' => 'Lösenord', 'Email' => 'Email', @@ -331,6 +364,8 @@ $LANG['se'] = array( 'ftp user password' => 'lösenord för ftp-användare', 'ftp user' => 'ftp-användare', 'Last 70 lines of %s.%s.log' => 'Sista 70 raderna av %s.%s.-loggen', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Ladda ned åtkomst-loggen', 'Download ErrorLog' => 'Ladda ned fel-loggen', 'Country' => 'Land', @@ -345,8 +380,26 @@ $LANG['se'] = array( 'Banlist' => 'Blockeringslista', 'ranges are acceptable' => 'spannet är acceptabelt', 'CIDR format is supported' => 'Stöd finns för CIDR-format', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'unlimited', '1 account' => '1 konto', '%s accounts' => '%s konton', @@ -362,6 +415,8 @@ $LANG['se'] = array( '%s cron jobs' => '%s cron-uppdrag', '1 archive' => '1 arkiv', '%s archives' => '%s arkiv', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 webhotell-paket', '%s packages' => '%s webhotell-paket', '1 IP address' => '1 IP-adress', @@ -389,6 +444,7 @@ $LANG['se'] = array( 'PACKAGE_CREATED_OK' => 'Webbhotell-paketet %s har skapats.', 'SSL_GENERATED_OK' => 'Certifikat genererat.', 'RULE_CREATED_OK' => 'Regel skapad.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Automatisk uppdatering har aktiverats.', 'Autoupdate has been successfully disabled' => 'Automatisk uppdatering har avaktiverats.', 'Cronjob email reporting has been successfully enabled' => 'emailrapport för cron-uppdrag har aktiverats', @@ -439,12 +495,12 @@ $LANG['se'] = array( 'RESTORE_SCHEDULED' => 'Uppdraget har lagts till i kön. Du kommer att erhålla ett mail när det är klart.', 'RESTORE_EXISTS' => 'Det finns redan ett pågående återskapar-uppdrag. Var god vänta tills det är klart innan du försöker igen.', - 'WEB_EXCLUSIONS' => "Ange domännamn, ett per rad. För att utesluta alla domäner - använd *. För att utesluta specifika kataloger - använd följande format: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Ange domännamn, ett per rad. För att utesluta alla domäner - använd *", - 'MAIL_EXCLUSIONS' => "Ange domännamn, ett per rad. För att utesluta alla domäner - använd *. För att utesluta specifika konton - använd följande format: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Ange hela databasnamnet, ett per rad. För att utesluta alla databaser, använd *", - 'CRON_EXCLUSIONS' => "För att utesluta alla cronuppdrag, använd *", - 'USER_EXCLUSIONS' => "Ange katalognamn, ett per rad. För att utesluta alla kataloger, använd *", + 'WEB_EXCLUSIONS' => 'Ange domännamn, ett per rad. För att utesluta alla domäner - använd *. För att utesluta specifika kataloger - använd följande format: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Ange domännamn, ett per rad. För att utesluta alla domäner - använd *', + 'MAIL_EXCLUSIONS' => 'Ange domännamn, ett per rad. För att utesluta alla domäner - använd *. För att utesluta specifika konton - använd följande format: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Ange hela databasnamnet, ett per rad. För att utesluta alla databaser, använd *', + 'CRON_EXCLUSIONS' => 'För att utesluta alla cronuppdrag, använd *', + 'USER_EXCLUSIONS' => 'Ange katalognamn, ett per rad. För att utesluta alla kataloger, använd *', 'Welcome to Vesta Control Panel' => 'Välkommen till Kontrollpanelen Vesta', 'MAIL_FROM' => 'Kontrollpanelen Vesta ', @@ -464,7 +520,7 @@ $LANG['se'] = array( 'Confirm Password' => 'Bekräfta lösenordet', 'Reset' => 'Återställ', 'Reset Code' => 'Återställ kod', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Koden för lösenordsåterställning har skickats till din emailadress
', 'MAIL_RESET_SUBJECT' => 'Lösenord återställt %s', 'PASSWORD_RESET_REQUEST' => "För att återställa lösenordet till kontrollpanelen, vänligen följ denna länk:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nEller så kan du gåt till https://%s/reset/?action=code&user=%s och ange följande återställningskod:\n%s\n\nOm du inte har begärt lösenordsåterställning, var god ignorera detta meddelande och acceptera vår ödmjuka ursäkt.\n\n--\nKontrollpanelen Vesta\n", @@ -486,6 +542,29 @@ $LANG['se'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Time Zone', 'Default Language' => 'Default Language', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'preview', @@ -501,8 +580,8 @@ $LANG['se'] = array( 'Starred' => 'Starred', 'Name' => 'Name', + 'File Manager' => 'File Manager', - 'type' => 'type', 'size' => 'size', 'date' => 'date', 'name' => 'name', @@ -512,10 +591,13 @@ $LANG['se'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -530,12 +612,20 @@ $LANG['se'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', 'Compress' => 'Compress', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Are you sure you want to delete', 'into' => 'into', 'existing files will be replaced' => 'existing files will be replaced', @@ -544,7 +634,17 @@ $LANG['se'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -560,31 +660,31 @@ $LANG['se'] = array( 'Move backward through top menu' => 'Move backward through top menu', 'Move forward through top menu' => 'Move forward through top menu', 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Upload', 'New File' => 'New File', 'New Folder' => 'New Folder', 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', 'Archive' => 'Archive', - 'Delete' => 'Delete', 'Save File (in text editor)' => 'Save File (in text editor)', 'Close Popup / Cancel' => 'Close Popup / Cancel', 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', + 'Move Cursor Down' => 'Move Cursor Down', 'Switch to Left Tab' => 'Switch to Left Tab', 'Switch to Right Tab' => 'Switch to Right Tab', 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', + 'Go to the Top of the File List' => 'Go to the Top of the File List', 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Go to Parent Directory', 'Select Current File' => 'Select Current File', 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', + 'Add File to the Current Selection' => 'Add File to the Current Selection', 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', @@ -596,6 +696,34 @@ $LANG['se'] = array( 'Licence Deactivated' => 'Licence Deactivated', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', '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.', - '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.' + '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.', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + +); diff --git a/web/inc/i18n/tr.php b/web/inc/i18n/tr.php index 51529c21..59be3cba 100644 --- a/web/inc/i18n/tr.php +++ b/web/inc/i18n/tr.php @@ -1,7 +1,8 @@ 'CRON', 'BACKUP' => 'YEDEK', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Kullanıcı Ekle', 'Add Domain' => 'Alan Adı Ekle', 'Add Web Domain' => 'Alan Adı Ekle', @@ -39,9 +55,9 @@ $LANG['tr'] = array( 'Restore All' => 'Hepsini Restore Et', 'Add Package' => 'Paket Ekle', 'Add IP' => 'IP Ekle', - 'Search' => 'Ara', 'Add Rule' => 'Kural Ekle', 'Ban IP Address' => 'IP adresini banla', + 'Search' => 'Ara', 'Add one more FTP Account' => 'Bir FTP hesabı daha ekle', 'Overall Statistics' => 'Tüm İstatistikler', 'Daily' => 'Günlük', @@ -56,11 +72,11 @@ $LANG['tr'] = array( 'toggle all' => 'hepsini seç', 'apply to selected' => 'seçimi uygula', 'rebuild' => 'yeniden oluştur', - 'rebuild web' => 'web\'i yeniden oluştur', - 'rebuild dns' => 'dns\'i yeniden oluştur', - 'rebuild mail' => 'mail\'i yeniden oluştur', - 'rebuild db' => 'db\'yi yeniden oluştur', - 'rebuild cron' => 'cron\'u yeniden oluştur', + 'rebuild web' => "web'i yeniden oluştur", + 'rebuild dns' => "dns'i yeniden oluştur", + 'rebuild mail' => "mail'i yeniden oluştur", + 'rebuild db' => "db'yi yeniden oluştur", + 'rebuild cron' => "cron'u yeniden oluştur", 'update counters' => 'sayaçları güncelle', 'suspend' => 'askıya al', 'unsuspend' => 'devam ettir', @@ -159,14 +175,15 @@ $LANG['tr'] = array( 'SSL Domains' => 'SSL Domainleri', 'Web Aliases' => 'Web Takma Adları (Aliases)', 'per domain' => 'domain başına', - 'DNS domains' => 'DNS Alan Adları', + 'DNS Domains' => 'DNS Alan Adları', 'DNS domains' => 'DNS alan adları', - 'DNS records' => 'DNS kayıtları' , + 'DNS records' => 'DNS kayıtları', 'Name Servers' => 'Alan Adı Sunucuları', 'Mail Domains' => 'Posta Alan Adları', 'Mail Accounts' => 'Posta Hesapları', 'Cron Jobs' => 'Zamanlanmış Görevler', 'SSH Access' => 'SSH Erişimi', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP Adresleri', 'Backups' => 'Yedekler', 'Backup System' => 'Yedekleme Sistemi', @@ -178,10 +195,12 @@ $LANG['tr'] = array( 'Proxy Extensions' => 'Proxy Uzantıları', 'Web Statistics' => 'Web İstatistikleri', 'Additional FTP Account' => 'İlave FTP Hesabı', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Sonlanış', 'Records' => 'Kayıtlar', + 'Serial' => 'Serial', 'Catchall email' => 'Yönlendirilmemiş postaların toplanacağı adres', 'AntiVirus Support' => 'AntiVirus Desteği', 'AntiSpam Support' => 'AntiSpam Desteği', @@ -191,6 +210,16 @@ $LANG['tr'] = array( 'Autoreply' => 'Otomatik Cevap', 'Forward to' => 'Şuraya yönlendir', 'Do not store forwarded mail' => 'Yönlendirilmiş postaları depolama', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'veritabanı', 'User' => 'Kullanıcı', 'Host' => 'Host', @@ -212,11 +241,13 @@ $LANG['tr'] = array( 'Users' => 'Kullanıcılar', 'Load Average' => 'Sistem Yükü', 'Memory Usage' => 'Hafıza Kullanımı', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD Kullanımı', 'NGINX Usage' => 'NGINX Kullanımı', 'MySQL Usage on localhost' => 'Localhost Üzerindeki MySQL Kullanımı', 'PostgreSQL Usage on localhost' => 'Localhost Üzerindeki PostgreSQL Kullanımı', 'Bandwidth Usage eth0' => 'eth0 Trafik Kullanımı', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP Kullanımı', 'SSH Usage' => 'SSH Kullanımı', 'reverse proxy' => 'reverse proxy', @@ -229,6 +260,8 @@ $LANG['tr'] = array( 'database server' => 'database sunucusu', 'ftp server' => 'ftp sunucusu', 'job scheduler' => 'job zamanlayıcısı', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Hafıza', 'Uptime' => 'Uptime', @@ -239,7 +272,6 @@ $LANG['tr'] = array( 'Release' => 'Yayınlanma', 'Architecture' => 'Yapı', 'Object' => 'Nesne', - 'Owner' => 'Sahip', 'Username' => 'Kullanıcı Adı', 'Password' => 'Şifre', 'Email' => 'Email', @@ -309,7 +341,7 @@ $LANG['tr'] = array( 'jobs' => 'görevler', 'username' => 'kullanıcı adı', 'password' => 'şifre', - 'type' => 'tür', + 'type' => 'tip', 'charset' => 'karakter seti', 'domain' => 'alan adı', 'ip' => 'ip', @@ -333,6 +365,8 @@ $LANG['tr'] = array( 'ftp user password' => 'ftp kullanıcı şifresi', 'ftp user' => 'ftp kullanıcısı', 'Last 70 lines of %s.%s.log' => '%s.%s.log dosyasının son 70 Satırı', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'AccessLog İndir', 'Download ErrorLog' => 'ErrorLog İndir', 'Country' => 'Ülke', @@ -347,8 +381,26 @@ $LANG['tr'] = array( 'Banlist' => 'Yasaklı Listesi', 'ranges are acceptable' => 'kabul edilebilir aralıklar', 'CIDR format is supported' => 'CIDR formatı destekleniyor', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + 'unlimited' => 'sınırsız', '1 account' => '1 hesap', '%s accounts' => '%s hesap', @@ -364,6 +416,8 @@ $LANG['tr'] = array( '%s cron jobs' => '%s zamanlanmış görev', '1 archive' => '1 arşiv', '%s archives' => '%s arşiv', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 paket', '%s packages' => '%s paket', '1 IP address' => '1 IP adresi', @@ -391,6 +445,7 @@ $LANG['tr'] = array( 'PACKAGE_CREATED_OK' => '%s paketi başarıyla oluşturuldu.', 'SSL_GENERATED_OK' => 'Sertifika başarıyla oluşturuldu.', 'RULE_CREATED_OK' => 'Kural başarıyla oluşturuldu.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Otomatik güncelleme başarıyla aktifleştirildi', 'Autoupdate has been successfully disabled' => 'Otomatik güncelleme başarıyla pasifleştirildi', 'Cronjob email reporting has been successfully enabled' => 'Zamanlanmış görev e-posta raporlama başarıyla aktif hale getirildi', @@ -441,12 +496,12 @@ $LANG['tr'] = array( 'RESTORE_SCHEDULED' => 'Görev sıraya eklendi. Yedek indirilebilir olduğu zaman bir bilgilendirme e-postası alacaksınız.', 'RESTORE_EXISTS' => 'Zaten restorasyon işlemi sürüyor. Bunu çalıştırmak için lütfen önceki işlemin bitmesini bekleyin.', - 'WEB_EXCLUSIONS' => "Her satıra bir alan adı yazın. Tüm alan adlarını hariç tutmak için * kullanın. Özel bir klasör için şu formatta yazın: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Her satıra bir alan adı yazın. Tüm alan adlarını hariç tutmak için * kullanın", - 'MAIL_EXCLUSIONS' => "Her satıra bir alan adı yazın. Tüm alan adlarını hariç tutmak için * kullanın. Özel bir hesap belirtmek için şu formatta yazın: domain.com:info:destek:postmaster", - 'DB_EXCLUSIONS' => "Her satıra bir veritabanının tam adını yazın. Hepsi için * kullanın. ", - 'CRON_EXCLUSIONS' => "Tüm zamanlanmış görevleri hariç tutmak için * kullanın", - 'USER_EXCLUSIONS' => "Her satıra bir klasör adı yazın. Tüm dizinleri hariç tutmak için * kullanın", + 'WEB_EXCLUSIONS' => 'Her satıra bir alan adı yazın. Tüm alan adlarını hariç tutmak için * kullanın. Özel bir klasör için şu formatta yazın: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Her satıra bir alan adı yazın. Tüm alan adlarını hariç tutmak için * kullanın', + 'MAIL_EXCLUSIONS' => 'Her satıra bir alan adı yazın. Tüm alan adlarını hariç tutmak için * kullanın. Özel bir hesap belirtmek için şu formatta yazın: domain.com:info:destek:postmaster', + 'DB_EXCLUSIONS' => 'Her satıra bir veritabanının tam adını yazın. Hepsi için * kullanın. ', + 'CRON_EXCLUSIONS' => 'Tüm zamanlanmış görevleri hariç tutmak için * kullanın', + 'USER_EXCLUSIONS' => 'Her satıra bir klasör adı yazın. Tüm dizinleri hariç tutmak için * kullanın', 'Welcome to Vesta Control Panel' => 'Vesta Kontrol Paneline Hoşgeldiniz', 'MAIL_FROM' => 'Vesta Control Panel ', @@ -466,7 +521,7 @@ $LANG['tr'] = array( 'Confirm Password' => 'Şifreyi Onayla', 'Reset' => 'Sıfırla', 'Reset Code' => 'Sıfırlama Kodu', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Şifre sıfırlama kodu e-posta adresinize gönderildi.
', 'MAIL_RESET_SUBJECT' => 'Şifre Sıfırlama - %s', 'PASSWORD_RESET_REQUEST' => "Şifrenizi sıfırlamak için lütfen linki takip edin:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternatif olarak https://%s/reset/?action=code&user=%s linkine tıklayıp devamında şu reset kodunuzu gerekli alana girebilirsiniz:\n%s\n\nEğer şifre sıfırlama isteğinde bulunmadıysanız lütfen bu mesajı görmezden gelin ve özrümüzü kabul edin.\n\n--\nVesta Control Panel\n", @@ -488,6 +543,29 @@ $LANG['tr'] = array( 'Hostname' => 'Hostadı', 'Time Zone' => 'Zaman Dilimi', 'Default Language' => 'Varsayılan Dil', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'DosyaSistemi Disk Kotası', 'Vesta Control Panel Plugins' => 'Vesta Kontrol Paneli Eklentileri', 'preview' => 'önizleme', @@ -503,8 +581,8 @@ $LANG['tr'] = array( 'Starred' => 'Yıldızlı', 'Name' => 'İsim', + 'File Manager' => 'Dosya Yöneticisi', - 'type' => 'tip', 'size' => 'boyut', 'date' => 'tarih', 'name' => 'isim', @@ -514,10 +592,13 @@ $LANG['tr'] = array( 'NEW DIR' => 'YENİ KLASÖR', 'DELETE' => 'SİL', 'RENAME' => 'YENİDEN ADLANDIR', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'KOPYALA', 'ARCHIVE' => 'ARŞİVLE', 'EXTRACT' => 'ÇIKART', 'DOWNLOAD' => 'İNDİR', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', 'to reload the page' => 'sayfayı yenilemek için', 'Directory name cannot be empty' => 'Dizin adı boş olamaz', @@ -532,12 +613,20 @@ $LANG['tr'] = array( 'Copy' => 'Kopyala', 'Cancel' => 'Vazgeç', 'Rename' => 'Yeniden Adlandır', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Sil', 'Extract' => 'Çıkart', 'Create' => 'Oluştur', 'Compress' => 'Sıkıştır', 'OK' => 'TAMAM', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Kopyalamak istediğinizden emin misiniz', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Silmek istediğinizden emin misiniz', 'into' => 'into', 'existing files will be replaced' => 'varolan dosyalar değiştirilir', @@ -546,7 +635,17 @@ $LANG['tr'] = array( 'already exists' => 'zaten var', 'Create file' => 'Dosya oluştur', 'Create directory' => 'Dizin oluştur', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Yeni Nesne Ekle', 'Save Form' => 'Formu Kaydet', 'Cancel saving form' => 'Formu kaydetmekten vazgeç', @@ -562,42 +661,70 @@ $LANG['tr'] = array( 'Move backward through top menu' => 'Üst menüden arasında geriye doğru git', 'Move forward through top menu' => 'Üst menüden arasında ileriye doğru git', 'Enter focused element' => 'Odaklanmış elemanı gir', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Yükle', 'New File' => 'Yeni Dosya', 'New Folder' => 'Yeni Klasör', 'Download' => 'İndir', - 'Rename' => 'Yeniden Adlandır', - 'Copy' => 'Kopyala', 'Archive' => 'Arşivle', - 'Delete' => 'Sil', 'Save File (in text editor)' => 'Dosyayı Kaydet (metin editöründe)', 'Close Popup / Cancel' => 'Popup Kapat / Vazgeç', 'Move Cursor Up' => 'İmleci Yukarı Hareket Ettir', - 'Move Cursor Dow' => 'İmleci Aşağı Hareket Ettir', + 'Move Cursor Down' => 'İmleci Aşağı Hareket Ettir', 'Switch to Left Tab' => 'Sol Sekmeye geçin', 'Switch to Right Tab' => 'Sağ Sekmeye geçin', 'Switch Tab' => 'Sekmeye geç', - 'Go to the Top of File List' => 'Dosya Listesinin Tepesine git', + 'Go to the Top of the File List' => 'Dosya Listesinin Tepesine git', 'Go to the Last File' => 'Son Dosyaya git', - 'Open File/Enter Directory' => 'Dosya Aç/Dizin Gir', + 'Open File / Enter Directory' => 'Dosya Aç/Dizin Gir', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Üst Dizine Git', 'Select Current File' => 'Şuanki Dosyayı Seç', 'Select Bunch of Files' => 'Dosya Demetini Seç', - 'Append File to the Current Selection' => 'Şuanki Seçime Dosya Ekle', + 'Add File to the Current Selection' => 'Şuanki Seçime Dosya Ekle', 'Select All Files' => 'Tüm Dosyaları Seç', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'kısayollar muhteşem dosya yöneticisi Midnight Commander arayüzünden esinlenilmiştir', - 'Licence Key' => 'Licence Key', - 'Enter License Key' => 'Enter License Key', - 'Buy Licence' => 'Buy Licence', - 'Buy Lifetime License' => 'Buy Lifetime License', - 'Disable and Cancel Licence' => 'Disable and Cancel Licence', - 'Licence Activated' => 'Licence Activated', - 'Licence Deactivated' => 'Licence Deactivated', - 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', - '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.', - '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.' + 'Licence Key' => 'Lisans Anahtarı', + 'Enter License Key' => 'Lisans Anahtarını Girin', + 'Buy Licence' => 'Lisans Satın Al', + 'Buy Lifetime License' => 'Ömür Boyu Lisans Satın Al', + 'Disable and Cancel Licence' => 'Lisansı Devre Dışı Bırak ve İptal Et', + 'Licence Activated' => 'Lisans Aktif', + 'Licence Deactivated' => 'Lisans Pasif', + 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Kullanıcılar SSH ile sadece kendi ev dizinine erişebilir.', + 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Tam özellikli Dosya Yöneticisi ile alan adınızdaki tüm dosyalarda listeleme, kopyalama, düzenleme ve görüntüleme yapabilirsiniz.', + 'This is a commercial module, you would need to purchace license key to enable it.' => 'Bu ticari bir modül, bunu etkinleştirmek için lisans anahtarı satın almanız gerekir.', + + 'Minutes' => 'Dakikalık', + 'Hourly' => 'Saatlik', + 'Run Command' => 'Komutu Çalıştır', + 'every month' => 'her ay', + 'every odd month' => 'her tek ay', + 'every even month' => 'her çift ay', + 'every day' => 'her gün', + 'every odd day' => 'her tek gün', + 'every even day' => 'her çift gün', + 'weekdays (5 days)' => 'hafta içi (5 gün)', + 'weekend (2 days)' => 'hafta sonu (2 gün)', + 'Monday' => 'Pazartesi', + 'Tuesday' => 'Salı', + 'Wednesday' => 'Çarşamba', + 'Thursday' => 'Perşembe', + 'Friday' => 'Cuma', + 'Saturday' => 'Cumartesi', + 'Sunday' => 'Pazar', + 'every hour' => 'her saat', + 'every two hours' => 'her iki saatte bir', + 'every minute' => 'her dakika', + 'every two minutes' => 'her iki dakikada bir', + 'every' => 'her', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', ); diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index d4ae4cff..dd04d75f 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -1,12 +1,11 @@ '方案設定', @@ -14,18 +13,36 @@ $LANG['tw'] = array( 'Graphs' => '資源使用圖表', 'Statistics' => '統計資料', 'Log' => '系統紀錄', + 'Server' => '伺服器', 'Services' => '服務', 'Firewall' => '防火牆', 'Updates' => '系統更新', 'Log in' => '登入', 'Log out' => '登出', + 'USER' => '使用者管理', 'WEB' => '網站管理', 'DNS' => 'DNS管理', 'MAIL' => '信箱管理', 'DB' => '資料庫', - 'CRON' => 'CRON', + 'CRON' => '任務排程', 'BACKUP' => '備份', + + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => '記憶體', + 'DISK' => '磁碟', + 'NETWORK' => '網路', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => '新增使用者', 'Add Domain' => '新增網域', 'Add Web Domain' => '新增網站網域', @@ -34,9 +51,9 @@ $LANG['tw'] = array( 'Add Mail Domain' => '新增信箱網域', 'Add Mail Account' => '新增信箱帳號', 'Add Database' => '新增資料庫', - 'Add Cron Job' => '新增Cron Job', + 'Add Cron Job' => '新增任務排程', 'Create Backup' => '建立備份', - 'Configure' => '調整設定', + 'Configure' => '配置', 'Restore All' => '全部回復', 'Add Package' => '新增方案', 'Add IP' => '新增IP', @@ -53,6 +70,7 @@ $LANG['tw'] = array( 'Back' => '返回', 'Save' => '儲存', 'Submit' => '送出', + 'toggle all' => '批次執行', 'apply to selected' => '套用到所有已選擇的', 'rebuild' => '重建', @@ -60,12 +78,12 @@ $LANG['tw'] = array( 'rebuild dns' => '重建DNS', 'rebuild mail' => '重建信箱', 'rebuild db' => '重建資料庫', - 'rebuild cron' => '重建 Cron', + 'rebuild cron' => '重建任務排程', 'update counters' => '更新計數器', 'suspend' => '封鎖', 'unsuspend' => '解除封鎖', 'delete' => '刪除', - 'show per user' => 'show per user', + 'show per user' => '依照選擇的使用者', 'login as' => '登入帳號', 'logout' => '登出', 'edit' => '編輯', @@ -80,18 +98,19 @@ $LANG['tw'] = array( 'open %s' => '開啟 %s', 'download' => '下載', 'restore' => '回復', - 'configure restore settings' => '調整回復設定', + 'configure restore settings' => '配置回復設定', 'stop' => '停止', 'start' => '啟動', 'restart' => '重新啟動', 'update' => '更新', 'generate' => '產生', - 'Generate CSR' => '產生 CSR', + 'Generate CSR' => '產生憑證簽署請求 (CSR)', 'reread IP' => '重新取得IP', 'enable autoupdate' => '啟用自動更新', 'disable autoupdate' => '停用自動更新', 'turn on notifications' => '啟用通知', 'turn off notifications' => '停用通知', + 'Adding User' => '新增使用者', 'Editing User' => '編輯使用者', 'Adding Domain' => '新增網域', @@ -105,20 +124,21 @@ $LANG['tw'] = array( 'Adding Mail Account' => '新增信箱帳號', 'Editing Mail Account' => '編輯信箱帳號', 'Adding database' => '新增資料庫', - 'Editing Cron Job' => '編輯Cron Job', - 'Adding Cron Job' => '新增Cron Job', + 'Editing Cron Job' => '編輯任務排程', + 'Adding Cron Job' => '新增任務排程', 'Editing Database' => '編輯資料庫', 'Adding Package' => '新增方案', 'Editing Package' => '編輯方案', 'Adding IP address' => '新增IP', 'Editing IP Address' => '編輯IP', 'Editing Backup Exclusions' => '編輯備份排除項目', - 'Generating CSR' => '產生CSR檔', + 'Generating CSR' => '產生憑證簽署請求(CSR)中...', 'Listing' => '列出', 'Search Results' => '搜尋結果', 'Adding Firewall Rule' => '新增防火牆規則', 'Editing Firewall Rule' => '編輯防火牆規則', 'Adding IP Address to Banlist' => '新增IP至黑名單', + 'active' => '正常', 'spnd' => '封鎖', 'suspended' => '已封鎖', @@ -126,6 +146,7 @@ $LANG['tw'] = array( 'stopped' => '已停止', 'outdated' => '有新版本可升級', 'updated' => '已是最新版本', + 'yes' => '是', 'no' => '否', 'none' => '無', @@ -149,6 +170,7 @@ $LANG['tw'] = array( 'User Directories' => '使用者目錄', 'Template' => '模板', 'Web Template' => 'Apache模板', + 'Backend Template' => 'Backend Template', 'Proxy Template' => 'Nginx模板', 'DNS Template' => 'DNS模板', 'Web Domains' => '網站網域', @@ -156,13 +178,14 @@ $LANG['tw'] = array( 'Web Aliases' => '網站次網域', 'per domain' => '(每網域)', 'DNS Domains' => 'DNS網域', - 'DNS Domains' => 'DNS網域', - 'DNS records' => 'DNS紀錄' , - 'Name Servers' => 'NS主機', + 'DNS domains' => 'DNS網域', + 'DNS records' => 'DNS紀錄', + 'Name Servers' => '域名服務器', 'Mail Domains' => '信箱網域', 'Mail Accounts' => '信箱使用者', - 'Cron Jobs' => 'Cron Jobs', + 'Cron Jobs' => '任務排程', 'SSH Access' => 'SSH權限', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP位置', 'Backups' => '備份', 'Backup System' => '備份系統', @@ -174,10 +197,12 @@ $LANG['tw'] = array( 'Proxy Extensions' => 'Nginx擴充', 'Web Statistics' => '網站統計', 'Additional FTP Account' => '其他FTP帳號', + 'Path' => '路徑', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => '過期', 'Records' => '紀錄', + 'Serial' => 'Serial', 'Catchall email' => '收到所有郵件', 'AntiVirus Support' => '防毒支援', 'AntiSpam Support' => '防垃圾郵件支援', @@ -187,13 +212,23 @@ $LANG['tw'] = array( 'Autoreply' => '自動回覆', 'Forward to' => '轉寄到', 'Do not store forwarded mail' => '不保留已轉發的郵件', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => '資料庫', 'User' => '使用者', 'Host' => '主機', 'Charset' => '編碼', - 'Min' => '分鐘', - 'Hour' => '小時', - 'Day' => '天', + 'Min' => '分', + 'Hour' => '時', + 'Day' => '日', 'Month' => '月', 'Day of week' => '星期幾', 'local' => '本地', @@ -208,14 +243,16 @@ $LANG['tw'] = array( 'Users' => '使用者', 'Load Average' => '平均負載量', 'Memory Usage' => '記憶體使用量', + 'APACHE2 Usage' => 'Apache2使用量', 'HTTPD Usage' => 'Apache使用量', 'NGINX Usage' => 'NGINX使用量', 'MySQL Usage on localhost' => 'MySQL使用量 (localhost)', 'PostgreSQL Usage on localhost' => 'PostgreSQL使用量 (localhost)', - 'Bandwidth Usage eth0' => '網路流量 (eth0)', + 'Bandwidth Usage eth0' => '流量使用量 (eth0)', + 'Exim Usage' => 'Exim使用量', 'FTP Usage' => 'FTP使用量', 'SSH Usage' => 'SSH使用量', - 'reverse proxy' => '反向Proxy', + 'reverse proxy' => '代理伺服器', 'web server' => '網站主機', 'dns server' => 'DNS主機', 'mail server' => '信箱主機', @@ -224,18 +261,19 @@ $LANG['tw'] = array( 'email antispam' => '信箱防垃圾信', 'database server' => '資料庫主機', 'ftp server' => 'FTP主機', - 'job scheduler' => '定時執行指令', - 'CPU' => 'CPU', + 'job scheduler' => '任務排程指令', + 'firewall' => '防火牆', + 'brute-force monitor' => '防止暴力破解', + 'CPU' => '處理器負載', 'Memory' => '記憶體', 'Uptime' => '已啟動時間', 'core package' => '核心系統', - 'php interpreter' => 'PHP讀取', - 'internal web server' => '網路網站主機', + 'php interpreter' => 'PHP解析', + 'internal web server' => '管理系統伺服器', 'Version' => '版本', 'Release' => '發佈號碼', - 'Architecture' => 'Architecture', + 'Architecture' => '架構', 'Object' => 'Object', - 'Owner' => '擁有者', 'Username' => '使用者名稱', 'Password' => '密碼', 'Email' => '電子信箱', @@ -245,16 +283,16 @@ $LANG['tw'] = array( 'Last Name' => '姓氏', 'Send login credentials to email address' => '傳送登入資訊至使用者的信箱', 'Default Template' => '預設模板', - 'Default Name Servers' => '預設NS主機', + 'Default Name Servers' => '預設域名服務器', 'Domain' => '網域', 'DNS Support' => 'DNS支援', 'Mail Support' => '信箱支援', 'Advanced options' => '進階選項', 'Aliases' => '次網域', - 'SSL Certificate' => 'SSL證書', + 'SSL Certificate' => 'SSL憑證', 'SSL Key' => 'SSL密鑰', - 'SSL Certificate Authority / Intermediate' => 'SSL認證機構/中級', - 'SSL CSR' => 'SSL CSR', + 'SSL Certificate Authority / Intermediate' => 'SSL中繼憑證', + 'SSL CSR' => 'SSL憑證簽署請求 (CSR)', 'optional' => '選用', 'internal' => '內部', 'Statistics Authorization' => '統計授權', @@ -264,7 +302,7 @@ $LANG['tw'] = array( 'Send FTP credentials to email' => '將FTP登入資料傳送到使用者信箱', 'Expiration Date' => '到期日期', 'YYYY-MM-DD' => 'YYYY-MM-DD', - 'Name servers' => 'NS伺服器', + 'Name servers' => '域名服務器', 'Record' => '紀錄', 'IP or Value' => 'IP或值', 'Priority' => '優先順序', @@ -293,7 +331,7 @@ $LANG['tw'] = array( 'mail accounts' => '信箱帳號', 'accounts' => '帳號', 'databases' => '資料庫', - 'cron jobs' => 'Cron Jobs', + 'cron jobs' => '任務排程', 'backups' => '備份', 'quota' => '配額', 'day of week' => '星期幾', @@ -302,7 +340,7 @@ $LANG['tw'] = array( 'domains' => '網域', 'aliases' => '次網域', 'records' => '記錄', - 'jobs' => 'Jobs', + 'jobs' => '任務', 'username' => '使用者名稱', 'password' => '密碼', 'type' => '類型', @@ -321,14 +359,16 @@ $LANG['tw'] = array( 'first name' => '名字', 'last name' => '姓氏', 'account' => '帳號', - 'ssl certificate' => 'SSL 證書', + 'ssl certificate' => 'SSL 憑證', 'ssl key' => 'SSL密鑰', 'stats user password' => '統計使用者帳號密碼', 'stats username' => '統計使用者名稱', 'stats password' => '統計密碼', 'ftp user password' => 'FTP使用者帳號密碼', 'ftp user' => 'FTP使用者', - 'Last 70 lines of %s.%s.log' => '最後70行的 %s.%s.記錄', + 'Last 70 lines of %s.%s.log' => '%s.%s.log 的最後70行', + 'AccessLog' => '存取記錄', + 'ErrorLog' => '錯誤紀錄', 'Download AccessLog' => '下載存取記錄', 'Download ErrorLog' => '下載錯誤記錄', 'Country' => '國家', @@ -337,14 +377,33 @@ $LANG['tw'] = array( 'City / Locality' => '市 / 地區', 'Organization' => '組織名稱', 'Action' => '動作', - 'Protocol' => 'Protocol', - 'Port' => 'Port', + 'Protocol' => '協議', + 'Port' => '端口', 'Comment' => '備註', 'Banlist' => '黑名單', 'ranges are acceptable' => '可使用範圍(例如:21-22)', 'CIDR format is supported' => '支援CIDR格式', - 'Add one more Name Server' => 'Add one more Name Server', + 'ACCEPT' => '允許', + 'DROP' => '封鎖', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', + 'Add one more Name Server' => '新增域名服務器', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + + 'unlimited' => 'unlimited', '1 account' => '1 帳號', '%s accounts' => '%s 帳號', '1 domain' => '1 網域', @@ -355,10 +414,12 @@ $LANG['tw'] = array( '%s mail accounts' => '%s 信箱帳號', '1 database' => '1 資料庫', '%s databases' => '%s 資料庫', - '1 cron job' => '1 Cron Job', - '%s cron jobs' => '%s Cron Jobs', - '1 archive' => '1 archive', - '%s archives' => '%s archives', + '1 cron job' => '1 任務排程', + '%s cron jobs' => '%s 任務排程', + '1 archive' => '1 壓縮', + '%s archives' => '%s 壓縮', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 方案', '%s packages' => '%s 方案', '1 IP address' => '1 IP位置', @@ -373,6 +434,7 @@ $LANG['tw'] = array( '1 rule' => '1 規則', '%s rules' => '%s 規則', 'There are no currently banned IP' => '目前沒有任何已封鎖的IP', + 'USER_CREATED_OK' => '使用者 %s has been 已加入成功!', 'WEB_DOMAIN_CREATED_OK' => '網域 %s 已加入成功!', 'DNS_DOMAIN_CREATED_OK' => 'DNS網域 %s 已加入成功!', @@ -380,15 +442,16 @@ $LANG['tw'] = array( 'MAIL_DOMAIN_CREATED_OK' => '信箱網域 %s 已加入成功!', 'MAIL_ACCOUNT_CREATED_OK' => '信箱帳號 %s@%s 已加入成功!', 'DATABASE_CREATED_OK' => '資料庫 %s 已加入成功!', - 'CRON_CREATED_OK' => 'Cron Job 已加入成功!', + 'CRON_CREATED_OK' => '任務排程 已加入成功!', 'IP_CREATED_OK' => 'IP位置 %s 已加入成功!', 'PACKAGE_CREATED_OK' => '方案 %s 已加入成功!', - 'SSL_GENERATED_OK' => 'SSL證書 已加入成功!', + 'SSL_GENERATED_OK' => 'SSL憑證 已加入成功!', 'RULE_CREATED_OK' => 'Rule 已加入成功!', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => '自動更新已成功啟動', 'Autoupdate has been successfully disabled' => '自動更新已成功關閉', - 'Cronjob email reporting has been successfully enabled' => 'Cron Job 電子郵件回報已成功啟動', - 'Cronjob email reporting has been successfully disabled' => 'Cron Job 電子郵件回報已成功關閉', + 'Cronjob email reporting has been successfully enabled' => '任務排程 電子郵件回報已成功啟動', + 'Cronjob email reporting has been successfully disabled' => '任務排程 電子郵件回報已成功關閉', 'Changes has been saved.' => '已儲存更改', 'Confirmation' => 'Confirmation', 'DELETE_USER_CONFIRMATION' => '確定要刪除使用者 %s 嗎?', @@ -406,9 +469,9 @@ $LANG['tw'] = array( 'DELETE_DATABASE_CONFIRMATION' => '確定要刪除資料庫 %s 嗎?', 'SUSPEND_DATABASE_CONFIRMATION' => '確定要封鎖資料庫 %s 嗎?', 'UNSUSPEND_DATABASE_CONFIRMATION' => '確定要解除封鎖資料庫 %s 嗎?', - 'DELETE_CRON_CONFIRMATION' => '確定要刪除 Cron Job嗎?', - 'SUSPEND_CRON_CONFIRMATION' => '確定要封鎖 Cron Job嗎?', - 'UNSUSPEND_CRON_CONFIRMATION' => '確定要解除封鎖 Cron Job嗎?', + 'DELETE_CRON_CONFIRMATION' => '確定要刪除 任務排程嗎?', + 'SUSPEND_CRON_CONFIRMATION' => '確定要封鎖 任務排程嗎?', + 'UNSUSPEND_CRON_CONFIRMATION' => '確定要解除封鎖 任務排程嗎?', 'DELETE_BACKUP_CONFIRMATION' => '確定要刪除 %s 備份嗎?', 'DELETE_EXCLUSION_CONFIRMATION' => '確定要刪除 %s 例外嗎?', 'DELETE_PACKAGE_CONFIRMATION' => '確定要方案 %s 嗎?', @@ -416,6 +479,7 @@ $LANG['tw'] = array( 'DELETE_RULE_CONFIRMATION' => '確定要刪除規則 #%s 嗎?', 'SUSPEND_RULE_CONFIRMATION' => '確定要封鎖規則 #%s 嗎?', 'UNSUSPEND_RULE_CONFIRMATION' => '確定要解除封鎖規則 #%s 嗎?', + 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', 'RESTART_CONFIRMATION' => '確定要重新啟動 %s 嗎?', 'Welcome' => '歡迎', 'LOGGED_IN_AS' => '以使用者身份 %s 登入', @@ -433,632 +497,245 @@ $LANG['tw'] = array( 'BACKUP_EXISTS' => '已經有一個備份正在執行中,請等待備份完成後在操作', 'RESTORE_SCHEDULED' => '您的要求已加入隊列中,回復完成後會再以電子郵件通知您', 'RESTORE_EXISTS' => '已經有一個回復正在執行中,請等待備份完成後在操作', - 'WEB_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific dirs use following format: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *", - 'MAIL_EXCLUSIONS' => "Type domain name, one per line. To exclude all domains use *. To exclude specific accounts use following format: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Type full database name, one per line. To exclude all databases use *", - 'CRON_EXCLUSIONS' => "To exclude all jobs use *", - 'USER_EXCLUSIONS' => "Type directory name, one per line. To exlude all dirs use *", + + 'WEB_EXCLUSIONS' => '輸入網域名稱,每行一個網域。如要排除備份所有網域請使用*。排除特定的資料夾請依照這個格式: Example.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => '輸入網域名稱,每行一個網域。如要排除備份所有網域請使用*', + 'MAIL_EXCLUSIONS' => '輸入網域名稱,每行一個網域。如要排除備份所有網域請使用*。要排除特定使用者請依照這個格式: Example.com:info:support:postmaster', + 'DB_EXCLUSIONS' => '輸入完整資料庫名城,每行一個資料庫。如要排除備份所有資料庫請使用*', + 'CRON_EXCLUSIONS' => '要排除備份所有任務排程請使用*', + 'USER_EXCLUSIONS' => '輸入要排除備份的資料夾名稱,每行一個資料夾。如要排除備份所有資料夾請使用*', + 'Welcome to Vesta Control Panel' => '歡迎來到 Vesta 管理系統', 'MAIL_FROM' => 'Vesta 管理系統 ', 'GREETINGS_GORDON_FREEMAN' => "您好, %s %s,\n", 'GREETINGS' => "您好,\n", 'ACCOUNT_READY' => "您的帳號已成功建立,並可以開始使用了!\n\nhttps://%s/login/\n使用者名稱: %s\n密碼: %s\n\n--\nVesta Control Panel\n", + 'FTP login credentials' => 'FTP 登入資料', 'FTP_ACCOUNT_READY' => "FTP帳號已成功建立,並可以開始使用了!\n\n主機名稱: %s\n使用者名稱: %s_%s\n密碼: %s\n\n--\nVesta Control Panel\n", - 'Database Credentials' => "Database 登入資料", + + 'Database Credentials' => '資料庫 登入資料', 'DATABASE_READY' => "資料庫已加入成功!\n\n資料庫名稱: %s\n使用者名稱: %s\n密碼: %s\n%s\n\n--\nVesta Control Panel\n", + 'forgot password' => '忘記密碼', 'Confirm' => '確認', 'New Password' => '新密碼', 'Confirm Password' => '確認密碼', 'Reset' => '重設', 'Reset Code' => '重設代碼', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => '密買重設代碼已發送到您的信箱
', 'MAIL_RESET_SUBJECT' => '密碼重置在 %s', - 'PASSWORD_RESET_REQUEST' => '重置密碼請點擊連結:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n或者您可以到 https://%s/reset/?action=code&user=%s 輸入密碼重設代碼:\n%s\n\n如果您沒有要求重設密碼,請忽略此郵件\n\n—\nVesta Control Panel\n', -); + 'PASSWORD_RESET_REQUEST' => "重置密碼請點擊連結:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n或者您可以到 https://%s/reset/?action=code&user=%s 輸入密碼重設代碼:\n%s\n\n如果您沒有要求重設密碼,請忽略此郵件\n\n—\nVesta Control Panel\n", -/** - * Vesta language file - * 吳汝剛 (ak6783@gmail.com) - */ + 'Jan' => '1月', + 'Feb' => '2月', + 'Mar' => '3月', + 'Apr' => '4月', + 'May' => '5月', + 'Jun' => '6月', + 'Jul' => '7月', + 'Aug' => '8月', + 'Sep' => '9月', + 'Oct' => '10月', + 'Nov' => '11月', + 'Dec' => '12月', -$LANG['tw'] = array( - 'Packages' => '套件', - 'IP' => 'IP', - 'Graphs' => '圖表', - 'Statistics' => '狀態', - 'Log' => '日誌', - 'Server' => '服務器', - 'Services' => '服務', - 'Firewall' => '防火牆', - 'Updates' => '更新', - 'Log in' => '登入', - 'Log out' => '登出', + 'Configuring Server' => '配置主機', + 'Hostname' => '主機名稱', + 'Time Zone' => '時區', + 'Default Language' => '預設語言', + 'Proxy Server' => '代理伺服器', + 'Web Server' => '網頁伺服器', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS伺服器', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => '郵件伺服器', + 'Antivirus' => '防毒系統', + 'AntiSpam' => '防垃圾郵件', + 'Webmail URL' => '網路信箱網址', + 'MySQL Support' => 'MySQL支援', + 'phpMyAdmin URL' => 'phpMyAdmin網址', + 'PostgreSQL Support' => 'PostgreSQL支援', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => '資料庫最高可使用數量', + 'Current Number Of Databases' => '資料庫目前已使用數量', + 'Local backup' => '本機備份', + 'Compression level' => '壓縮程度', + 'Directory' => '路徑', + 'Remote backup' => '異地備份', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => '檔案系統硬碟配額', + 'Vesta Control Panel Plugins' => 'Vesta Control Panel 外掛', + 'preview' => '預覽', + 'Reseller Role' => '經銷商權限', + 'Web Config Editor' => '網站配置編輯器', + 'Template Manager' => '模組管理器', + 'Backup Migration Manager' => '備份轉移管理器', + 'FileManager' => '檔案管理器', + 'show: CPU / MEM / NET / DISK' => '顯示: 處理器 / 記憶體 / 網路 / 硬碟', - 'USER' => '使用者', - 'WEB' => '網頁', - 'DNS' => 'DNS', - 'MAIL' => '電子郵件', - 'DB' => '資料庫', - 'CRON' => '排程', - 'BACKUP' => '備份', + 'sort by' => '排序按照', + 'Date' => '日期', + 'Starred' => '加註星號', + 'Name' => '名稱', - 'Add User' => '新增使用者', - 'Add Domain' => '新增網域', - 'Add Web Domain' => '新增網頁網域', - 'Add DNS Domain' => '新增 DNS 網域', - 'Add DNS Record' => '新增 DNS 紀錄', - 'Add Mail Domain' => '新增電子郵件網域', - 'Add Mail Account' => '新增電子郵件帳號', - 'Add Database' => '新增資料庫', - 'Add Cron Job' => '新增排程工作', - 'Create Backup' => '建立備份', - 'Configure' => '設置', - 'Restore All' => '全部還原', - 'Add Package' => '新增套件', - 'Add IP' => '新增 IP 位址', - 'Add Rule' => '新增規則', - 'Ban IP Address' => '封鎖 IP 位址', - 'Search' => '搜尋', - 'Add one more FTP Account' => '新增多個 FTP 帳號', - 'Overall Statistics' => '整體報告', - 'Daily' => '每天', - 'Weekly' => '每週', - 'Monthly' => '每星期', - 'Yearly' => '每年', - 'Add' => '新增', - 'Back' => '上一頁', - 'Save' => '儲存', - 'Submit' => '送出', - 'toggle all' => '全部切換', - 'apply to selected' => '套用到所選擇的', - 'rebuild' => '重建', - 'rebuild web' => '重建網頁', - 'rebuild dns' => '重建 dns', - 'rebuild mail' => '重建郵件', - 'rebuild db' => '重建資料庫', - 'rebuild cron' => '重建排程', - 'update counters' => '更新計數', - 'suspend' => '暫停', - 'unsuspend' => '取消暫停', - 'delete' => '刪除', - 'show per user' => '顯示每一個使用者', - 'login as' => '登入成為', - 'logout' => '登出', - 'edit' => '編輯', - 'open webstats' => '開啟網頁狀態', - 'view logs' => '檢視日誌', - 'list records' => '列出 %s 紀錄', - 'add record' => '新增紀錄', - 'list accounts' => '列出 %s 帳號', - 'add account' => '新增帳號', - 'open webmail' => '開啟網頁郵件', - 'list fail2ban' => '列出 fail2ban', - 'open %s' => '開啟 %s', - 'download' => '下載', - 'restore' => '還原', - 'configure restore settings' => '設置還原設定', - 'stop' => '停止', - 'start' => '啟用', - 'restart' => '重啟', - 'update' => '更新', - 'generate' => '產生', - 'Generate CSR' => '產生 CSR', - 'reread IP' => '重讀 IP', - 'enable autoupdate' => '啟用自動更新', - 'disable autoupdate' => '停用自動更新', - 'turn on notifications' => '開啟通知', - 'turn off notifications' => '關閉通知', - - 'Adding User' => '新增使用者中', - 'Editing User' => '編輯使用者中', - 'Adding Domain' => '新增網域中', - 'Editing Domain' => '編輯網域中', - 'Adding DNS Domain' => '新增 DNS 網域中', - 'Editing DNS Domain' => '編輯 DNS 網域中', - 'Adding DNS Record' => '新增 DNS 紀錄中', - 'Editing DNS Record' => '編輯 DNS 紀錄中', - 'Adding Mail Domain' => '新增電子郵件網域中', - 'Editing Mail Domain' => '編輯電子郵件網域中', - 'Adding Mail Account' => '新增電子郵件帳號中', - 'Editing Mail Account' => '編輯電子郵件帳號中', - 'Adding database' => '新增資料庫中', - 'Editing Cron Job' => '編輯排程工作中', - 'Adding Cron Job' => '新增排程工作中', - 'Editing Database' => '編輯資料庫中', - 'Adding Package' => '新增套件中', - 'Editing Package' => '編輯套件中', - 'Adding IP address' => '新增 IP 位址中', - 'Editing IP Address' => '編輯 IP 位址中', - 'Editing Backup Exclusions' => '編輯備份排除名單中', - 'Generating CSR' => '產生 CSR 中', - 'Listing' => '列出中', - 'Search Results' => '搜尋結果', - 'Adding Firewall Rule' => '新增防火牆規則中', - 'Editing Firewall Rule' => '編輯防火牆規則中', - 'Adding IP Address to Banlist' => '新增 IP 位址到封鎖清單中', - - 'active' => '活動', - 'spnd' => '暫停', - 'suspended' => '暫停', - 'running' => '執行中', - 'stopped' => '已停止', - 'outdated' => '已過期', - 'updated' => '已更新', - - 'yes' => '是', - 'no' => '否', - 'none' => '沒有', - 'pb' => 'pb', - 'tb' => 'tb', - 'gb' => 'gb', - 'mb' => 'mb', - 'minute' => '分鐘', - 'hour' => '小時', - 'day' => '天', - 'days' => '天', - 'hours' => '小時', - 'minutes' => '分鐘', - 'month' => '月', - 'package' => '套件', - 'Bandwidth' => '流量', - 'Disk' => '磁碟', - 'Web' => '網頁', - 'Mail' => '郵件', - 'Databases' => '資料庫', - 'User Directories' => '使用者目錄', - 'Template' => '方案', - 'Web Template' => '網頁方案', - 'Backend Template' => 'Backend 方案', - 'Proxy Template' =>'Proxy 方案', - 'DNS Template' => 'DNS 方案', - 'Web Domains' => '網頁網域', - 'SSL Domains' => 'SSL 網域', - 'Web Aliases' => '網頁別名', - 'per domain' => '每個網域', - 'DNS Domains' => 'DNS 網域', - 'DNS Domains' => 'DNS 網域', - 'DNS records' => 'DNS 紀錄' , - 'Name Servers' => '名稱伺服器(NS)', - 'Mail Domains' => '電子郵件網域', - 'Mail Accounts' => '電子郵件帳號', - 'Cron Jobs' => '排程工作', - 'SSH Access' => 'SSH 存取', - 'IP Addresses' => 'IP 位址', - 'Backups' => '備份', - 'Backup System' => '備份系統', - 'backup exclusions' => '例外備份', - 'template' => '方案', - 'SSL Support' => 'SSL 功能', - 'SSL Home Directory' => 'SSL 家目錄', - 'Proxy Support' => 'Proxy 功能', - 'Proxy Extensions' => 'Proxy 額外', - 'Web Statistics' => '網頁狀態', - 'Additional FTP Account' => '其他的 FTP', - 'SOA' => 'SOA', - 'TTL' => 'TTL', - 'Expire' => '過期', - 'Records' => '紀錄', - 'Catchall email' => '抓取外部郵件', - 'AntiVirus Support' => '防毒支援', - 'AntiSpam Support' => '防垃圾信支援', - 'DKIM Support' => 'DKIM 支援', - 'Accounts' => '帳號', - 'Quota' => '額度', - 'Autoreply' => '自動回覆', - 'Forward to' => '轉寄到', - 'Do not store forwarded mail' => '不要儲存轉寄郵件', - 'database' => '資料庫', - 'User' => '使用者', - 'Host' => '主機', - 'Charset' => '字元', - 'Min' => '分鐘', - 'Hour' => '小時', - 'Day' => '天', - 'Month' => '月', - 'Day of week' => '星期幾', - 'local' => '本地', - 'Run Time' => '執行時間', - 'Backup Size' => '備份大小', - 'SYS' => 'SYS', - 'Domains' => '網域', - 'Status' => '狀態', - 'shared' => '已分享', - 'dedicated' => '專屬', - 'Owner' => '擁有者', - 'Users' => '使用者', - 'Load Average' => '負載平均', - 'Memory Usage' => '記憶體使用量', - 'HTTPD Usage' => '網頁使用量', - 'NGINX Usage' => 'NGINX 使用量', - 'MySQL Usage on localhost' => 'MySQL 在本機使用', - 'PostgreSQL Usage on localhost' => 'PostgreSQL 在本機使用', - 'Bandwidth Usage eth0' => 'eth0 的流量', - 'FTP Usage' => 'FTP 使用量', - 'SSH Usage' => 'SSH 使用量', - 'reverse proxy' => '反向代理', - 'web server' => '網頁伺服器', - 'dns server' => 'dns 伺服器', - 'mail server' => '電子郵件伺服器', - 'pop/imap server' => 'pop/imap 伺服器', - 'email antivirus' => '郵件防毒', - 'email antispam' => '防垃圾信', - 'database server' => '資料庫伺服器', - 'ftp server' => 'ftp 伺服器', - 'job scheduler' => '工作行程', - 'CPU' => 'CPU', - 'Memory' => '記憶體', - 'Uptime' => '上線時間', - 'core package' => '核心套件', - 'php interpreter' => 'php 編譯器', - 'internal web server' => '內部網頁伺服器', - 'Version' => '版本', - 'Release' => '釋出', - 'Architecture' => '架構', - 'Object' => 'Object', - 'Owner' => '擁有者', - 'Username' => '帳號', - 'Password' => '密碼', - 'Email' => '電子郵件', - 'Package' => '套件', - 'Language' => '語系', - 'First Name' => '名', - 'Last Name' => '姓', - 'Send login credentials to email address' => '傳送登入憑證到電子郵件地址', - 'Default Template' => '預設方案', - 'Default Name Servers' => '預設名稱伺服器(NS)', - 'Domain' => '網域', - 'DNS Support' => 'DNS 功能', - 'Mail Support' => '電子郵件功能', - 'Advanced options' => '進階選項', - 'Aliases' => '別名', - 'SSL Certificate' => 'SSL 憑證', - 'SSL Key' => 'SSL 金鑰', - 'SSL Certificate Authority / Intermediate' => 'SSL 憑證權力 / 中級', - 'SSL CSR' => 'SSL CSR', - 'optional' => '自訂', - 'internal' => '內部', - 'Statistics Authorization' => '授權狀態', - 'Statistics Auth' => '授權狀態', - 'Account' => '帳號', - 'Prefix will be automaticaly added to username' => '字首 %s 將會自動加入到帳號', - 'Send FTP credentials to email' => '傳送 FTP 憑證到電子郵件地址', - 'Expiration Date' => '到期日', - 'YYYY-MM-DD' => 'YYYY-MM-DD', - 'Name servers' => '名稱伺服器(NS)', - 'Record' => '紀錄', - 'IP or Value' => 'IP 或是主機名稱', - 'Priority' => '優先權', - 'Record Number' => '紀錄號碼', - 'in megabytes' => '在 MB', - 'Message' => '訊息', - 'use local-part' => '使用本地部份', - 'one or more email addresses' => '一個或多個電子郵件地址', - 'Prefix will be automaticaly added to database name and database user' => '字首 %s 將會自動新增到資料庫名稱和資料庫使用者名稱。', - 'Database' => '資料庫', - 'Type' => '類型', - 'Minute' => '分鐘', - 'Command' => '指令', - 'Package Name' => '套件名稱', - 'Netmask' => '子網路遮罩', - 'Interface' => '介面', - 'Shared' => '已分享', - 'Assigned user' => '分配的使用者', - 'Assigned domain' => '分配的網域', - 'NAT IP association' => 'NAT IP 組合', - 'shell' => 'shell', - 'web domains' => '網頁網域', - 'web aliases' => '網頁別名', - 'dns records' => 'dns 紀錄', - 'mail domains' => '電子郵件網域', - 'mail accounts' => '電子郵件帳號', - 'accounts' => '帳號', - 'databases' => '資料庫', - 'cron jobs' => '排程工作', - 'backups' => '備份', - 'quota' => '額度', - 'day of week' => '星期幾', - 'cmd' => '指令', - 'users' => '使用者', - 'domains' => '網域', - 'aliases' => '別名', - 'records' => '紀錄', - 'jobs' => '工作', - 'username' => '帳號', - 'password' => '密碼', - 'type' => '類型', - 'charset' => '字元', - 'domain' => '網域', - 'ip' => 'ip', - 'ip address' => 'ip 位址', - 'IP address' => 'IP 位址', - 'netmask' => '子網路遮罩', - 'interface' => '介面', - 'assigned user' => '分配使用者', - 'ns1' => 'ns1', - 'ns2' => 'ns2', - 'user' => '使用者', - 'email' => '電子郵件', - 'first name' => '名', - 'last name' => '姓', - 'account' => '帳號', - 'ssl certificate' => 'ssl 憑證', - 'ssl key' => 'ssl 金鑰', - 'stats user password' => '統計帳號密碼', - 'stats username' => '統計帳號', - 'stats password' => '統計密碼', - 'ftp user password' => 'ftp 帳號密碼', - 'ftp user' => 'ftp 帳號', - 'Last 70 lines of %s.%s.log' => '%s.%s.log 的最後70行', - 'Download AccessLog' => '下載 AccessLog', - 'Download ErrorLog' => '下載 ErrorLog', - 'Country' => '國家', - '2 letter code' => '2個字元', - 'State / Province' => '州 / 省', - 'City / Locality' => '城市 / 地方', - 'Organization' => '組織', - 'Action' => '動作', - 'Protocol' => '通訊協定', - 'Port' => '連接埠', - 'Comment' => '註解', - 'Banlist' => '封鎖清單', - 'ranges are acceptable' => '可使用範圍', - 'CIDR format is supported' => 'CIDR 格式是支援的', - 'Add one more Name Server' => 'Add one more Name Server', - - 'unlimited' => 'unlimited', - '1 account' => '1 帳號', - '%s accounts' => '%s 帳號', - '1 domain' => '1 網域', - '%s domains' => '%s 網域', - '1 record' => '1 紀錄', - '%s records' => '%s 紀錄', - '1 mail account' => '1 電子郵件帳號', - '%s mail accounts' => '%s 電子郵件帳號', - '1 database' => '1 資料庫', - '%s databases' => '%s 資料庫', - '1 cron job' => '1 排程工作', - '%s cron jobs' => '%s 排程工作', - '1 archive' => '1 檔案', - '%s archives' => '%s 檔案', - '1 package' => '1 套件', - '%s packages' => '%s 套件', - '1 IP address' => '1 IP 位址', - '%s IP addresses' => '%s IP 位址', - '1 month' => '1 月', - '%s months' => '%s 月', - '1 log record' => '1 日誌紀錄', - '%s log records' => '%s 日誌紀錄', - '1 object' => '1 object', - '%s objects' => '%s objects', - 'no exclusions' => '沒有排除', - '1 rule' => '1 規則', - '%s rules' => '%s 規則', - 'There are no currently banned IP' => '現在沒有被封鎖的 IP', - - 'USER_CREATED_OK' => '使用者 %s 已經建立成功。', - 'WEB_DOMAIN_CREATED_OK' => '網域 %s 已經建立成功。', - 'DNS_DOMAIN_CREATED_OK' => 'DNS 網域 %s 已經建立成功。', - 'DNS_RECORD_CREATED_OK' => '紀錄 %s.%s 已經建立成功。', - 'MAIL_DOMAIN_CREATED_OK' => '電子郵件網域 %s 已經建立成功。', - 'MAIL_ACCOUNT_CREATED_OK' => '電子郵件帳號 %s@%s 已經建立成功。', - 'DATABASE_CREATED_OK' => '資料庫 %s 已經建立成功。', - 'CRON_CREATED_OK' => '排程工作已經建立成功。', - 'IP_CREATED_OK' => 'IP 位址 %s 已經建立成功。', - 'PACKAGE_CREATED_OK' => '套件 %s 已經建立成功。', - 'SSL_GENERATED_OK' => '憑證已經產生成功。', - 'RULE_CREATED_OK' => '規則已經建立成功。', - 'Autoupdate has been successfully enabled' => '自動更新已經成功啟用了。', - 'Autoupdate has been successfully disabled' => '自動更新已經成功停用了。', - 'Cronjob email reporting has been successfully enabled' => '排程工作的電子郵件回報已經成功啟用了', - 'Cronjob email reporting has been successfully disabled' => '排程工作的電子郵件回報已經成功停用了', - 'Changes has been saved.' => '變更已經儲存。', - 'Confirmation' => '確認', - 'DELETE_USER_CONFIRMATION' => '您確定要刪除使用者 %s 嗎?', - 'SUSPEND_USER_CONFIRMATION' => '您確定要暫停使用者 %s 嗎?', - 'UNSUSPEND_USER_CONFIRMATION' => '您確定要取消暫停使用者 %s 嗎?', - 'DELETE_DOMAIN_CONFIRMATION' => '您確定要刪除網域 %s 嗎?', - 'SUSPEND_DOMAIN_CONFIRMATION' => '您確定要暫停網域 %s 嗎?', - 'UNSUSPEND_DOMAIN_CONFIRMATION' => '您確定要取消暫停網域 %s 嗎?', - 'DELETE_RECORD_CONFIRMATION' => '您確定要刪除紀錄 %s 嗎?', - 'SUSPEND_RECORD_CONFIRMATION' => '您確定要暫停紀錄 %s 嗎?', - 'UNSUSPEND_RECORD_CONFIRMATION' => '您確定要取消暫停紀錄 %s 嗎?', - 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => '您確定要刪除 %s 嗎?', - 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '您確定要暫停 %s 嗎?', - 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => '您確定要取消暫停 %s 嗎?', - 'DELETE_DATABASE_CONFIRMATION' => '您確定要刪除資料庫 %s 嗎?', - 'SUSPEND_DATABASE_CONFIRMATION' => '您確定要暫停資料庫 %s 嗎?', - 'UNSUSPEND_DATABASE_CONFIRMATION' => '您確定要取消暫停資料庫 %s 嗎?', - 'DELETE_CRON_CONFIRMATION' => '您確定要刪除排程工作嗎?', - 'SUSPEND_CRON_CONFIRMATION' => '您確定要暫停排程工作嗎?', - 'UNSUSPEND_CRON_CONFIRMATION' => '您確定要取消暫停排程工作嗎?', - 'DELETE_BACKUP_CONFIRMATION' => '您確定要刪除 %s 備份嗎?', - 'DELETE_EXCLUSION_CONFIRMATION' => '您確定要刪除 %s 例外清單嗎?', - 'DELETE_PACKAGE_CONFIRMATION' => '您確定要刪除套件 %s 嗎?', - 'DELETE_IP_CONFIRMATION' => '您確定要刪除 IP 位址 %s 嗎?', - 'DELETE_RULE_CONFIRMATION' => '您確定要刪除規則 #%s 嗎?', - 'SUSPEND_RULE_CONFIRMATION' => '您確定要暫停規則 #%s 嗎?', - 'UNSUSPEND_RULE_CONFIRMATION' => '您確定要取消暫停規則 #%s 嗎?', - 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', - 'RESTART_CONFIRMATION' => '您確定您要重新啟動 %s 嗎?', - 'Welcome' => '歡迎', - 'LOGGED_IN_AS' => '登入為使用者 %s', - 'Error' => '錯誤', - 'Invalid username or password' => '無效的帳號或密碼。', - 'Invalid username or code' => '無效的帳號或驗證碼。', - 'Passwords not match' => '密碼不符合,', - 'Please enter valid email address.' => '請輸入正確的電子郵件地址。', - 'Field "%s" can not be blank.' => '欄位 "%s" 不可以空白。', - 'Password is too short.' => '密碼太短 (至少6個字元)', - 'Error code:' => '錯誤驗證碼: %s', - 'SERVICE_ACTION_FAILED' => '"%s" "%s" 失敗', - 'IP address is in use' => 'IP 位址已被使用', - 'BACKUP_SCHEDULED' => '工作已經新增到佇列。當您的備份可以下載時您將會收到一封電子郵件通知。', - 'BACKUP_EXISTS' => '存在的備份排程正在執行中。請稍等讓備份完成。', - 'RESTORE_SCHEDULED' => '工作已經新增到佇列。當您的還原已經完成時您將會收到一封電子郵件通知。', - 'RESTORE_EXISTS' => '存在的還原排程正在執行中。在執行一次之前請稍等讓還原完成。', - - 'WEB_EXCLUSIONS' => "輸入網域名稱,一行一個。要排除所有網域請使用 *。要排除指定的目錄請使用以下格式: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "輸入網域名稱,一行一個。要排除所有網域請使用 *", - 'MAIL_EXCLUSIONS' => "輸入網域名稱,一行一個。要排除所有網域請使用 *。要排除指定的帳號請使用以下格式: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "輸入完整資料庫名稱,一行一個。要排除所有資料庫請使用 *", - 'CRON_EXCLUSIONS' => "要排除所有工作請使用 *", - 'USER_EXCLUSIONS' => "輸入目錄名稱,一行一個。要排除所有目錄請使用 *", - - 'Welcome to Vesta Control Panel' => '歡迎來到 Vesta 虛擬主機系統', - 'MAIL_FROM' => 'Vesta 虛擬主機系統 ', - 'GREETINGS_GORDON_FREEMAN' => "您好, %s %s,\n", - 'GREETINGS' => "您好,\n", - 'ACCOUNT_READY' => "您的帳號已建立並可以使用了。\n\nhttps://%s/login/\n帳號: %s\n密碼: %s\n\n--\nVesta 虛擬主機系統\n", - - 'FTP login credentials' => 'FTP 登入資料', - 'FTP_ACCOUNT_READY' => "FTP 帳號已建立並可以使用了。\n\n主機位址: %s\n帳號: %s_%s\n密碼: %s\n\n--\nVesta 虛擬主機系統\n", - - 'Database Credentials' => '資料庫資料', - 'DATABASE_READY' => "資料庫已經建立成功。\n\n資料庫: %s\n帳號: %s\n密碼: %s\n%s\n\n--\nVesta 虛擬主機系統\n", - - 'forgot password' => '忘記密碼', - 'Confirm' => '確認', - 'New Password' => '新的密碼', - 'Confirm Password' => '確認密碼', - 'Reset' => '重設', - 'Reset Code' => '重設驗證碼', - 'RESET_NOTICE' => '', - 'RESET_CODE_SENT' => '重設密碼的驗證碼已經寄到您的電子郵件地址
', - 'MAIL_RESET_SUBJECT' => '密碼重設在 %s', - 'PASSWORD_RESET_REQUEST' => "要重設虛擬主機系統的密碼,請依照這個連結:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n另外,您可以到 https://%s/reset/?action=code&user=%s 並輸入以下的驗證碼:\n%s\n\n假如您沒有要求密碼重設,請忽略這封郵件並接受我們的道歉。\n\n--\nVesta 虛擬主機系統\n", - - 'Jan' => 'Jan', - 'Feb' => 'Feb', - 'Mar' => 'Mar', - 'Apr' => 'Apr', - 'May' => 'May', - 'Jun' => 'Jun', - 'Jul' => 'Jul', - 'Aug' => 'Aug', - 'Sep' => 'Sep', - 'Oct' => 'Oct', - 'Nov' => 'Nov', - 'Dec' => 'Dec', - - 'Configuring Server' => 'Configuring Server', - 'Hostname' => 'Hostname', - 'Time Zone' => 'Time Zone', - 'Default Language' => 'Default Language', - 'FileSystem Disk Quota' => 'FileSystem Disk Quota', - 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', - 'preview' => 'preview', - 'Reseller Role' => 'Reseller Role', - 'Web Config Editor' => 'Web Config Editor', - 'Template Manager' => 'Template Manager', - 'Backup Migration Manager' => 'Backup Migration Manager', - 'FileManager' => 'FileManager', - 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', - - 'sort by' => 'sort by', - 'Date' => 'Date', - 'Starred' => 'Starred', - 'Name' => 'Name', - - 'File Manager' => 'File Manager', - 'type' => 'type', - 'size' => 'size', - 'date' => 'date', - 'name' => 'name', - 'Initializing' => 'Initializing', - 'UPLOAD' => 'UPLOAD', - 'NEW FILE' => 'NEW FILE', - 'NEW DIR' => 'NEW DIR', - 'DELETE' => 'DELETE', - 'RENAME' => 'RENAME', - 'COPY' => 'COPY', - 'ARCHIVE' => 'ARCHIVE', - 'EXTRACT' => 'EXTRACT', - 'DOWNLOAD' => 'DOWNLOAD', + 'File Manager' => '檔案管理器', + 'size' => '大小', + 'date' => '日期', + 'name' => '名稱', + 'Initializing' => '正在初始化', + 'UPLOAD' => '上傳', + 'NEW FILE' => '新增檔案', + 'NEW DIR' => '新增資料夾', + 'DELETE' => '刪除', + 'RENAME' => '重新命名', + 'MOVE' => 'MOVE', + 'RIGHTS' => '權限', + 'COPY' => '複製', + 'ARCHIVE' => '壓縮', + 'EXTRACT' => '解壓縮', + 'DOWNLOAD' => '下載', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Hit', - 'to reload the page' => 'to reload the page', - 'Directory name cannot be empty' => 'Directory name cannot be empty', - 'File name cannot be empty' => 'File name cannot be empty', - 'No file selected' => 'No file selected', - 'No file or folder selected' => 'No file or folder selected', - 'File type not supported' => 'File type not supported', - 'Directory download not available in current version' => 'Directory download not available in current version', - 'Directory not available' => 'Directory not available', - 'Done' => 'Done', - 'Close' => 'Close', - 'Copy' => 'Copy', - 'Cancel' => 'Cancel', - 'Rename' => 'Rename', - 'Delete' => 'Delete', - 'Extract' => 'Extract', - 'Create' => 'Create', - 'Compress' => 'Compress', - 'OK' => 'OK', - 'Are you sure you want to copy' => 'Are you sure you want to copy', - 'Are you sure you want to delete' => 'Are you sure you want to delete', - 'into' => 'into', - 'existing files will be replaced' => 'existing files will be replaced', - 'Original name' => 'Original name', - 'File' => 'File', - 'already exists' => 'already exists', - 'Create file' => 'Create file', - 'Create directory' => 'Create directory', + 'to reload the page' => '重新整理頁面', + 'Directory name cannot be empty' => '資料夾名稱不能為空白', + 'File name cannot be empty' => '檔案名稱不能為空白', + 'No file selected' => '還沒選取任何檔案', + 'No file or folder selected' => '還沒有選取任何檔案或資料夾', + 'File type not supported' => '尚未支援的檔案類型', + 'Directory download not available in current version' => '目前的版本尚未支援資料夾下載', + 'Directory not available' => '資料夾無法使用', + 'Done' => '完成', + 'Close' => '關閉', + 'Copy' => '複製', + 'Cancel' => '取消', + 'Rename' => '重新命名', + 'Move' => 'Move', + 'Change Rights' => '修改權限', + 'Delete' => '刪除', + 'Extract' => '解壓縮', + 'Create' => '新增', + 'Compress' => '壓縮', + 'OK' => '確定', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', + 'Are you sure you want to copy' => '確定要複製', + 'Are you sure you want to move' => 'Are you sure you want to move', + 'Are you sure you want to delete' => '確定要刪除', + 'into' => '資訊', + 'existing files will be replaced' => '原本的檔案會被覆蓋', + 'Original name' => '原始名稱', + 'File' => '檔案', + 'already exists' => '已經存在', + 'Create file' => '新增檔案', + 'Create directory' => '新增資料夾', + 'read by owner' => '擁有者可讀', + 'write by owner' => '擁有者可寫', + 'execute/search by owner' => '擁有者可執行', + 'read by group' => '群組可讀', + 'write by group' => '群組可寫', + 'execute/search by group' => '群組可執行', + 'read by others' => '所有人可讀', + 'write by others' => '所有人可寫', + 'execute/search by others' => '所有人可執行', - 'Add New object' => 'Add New object', - 'Save Form' => 'Save Form', - 'Cancel saving form' => 'Cancel saving form', - 'Go to USER list' => 'Go to USER list', - 'Go to WEB list' => 'Go to WEB list', - 'Go to DNS list' => 'Go to DNS list', - 'Go to MAIL list' => 'Go to MAIL list', - 'Go to DB list' => 'Go to DB list', - 'Go to CRON list' => 'Go to CRON list', - 'Go to BACKUP list' => 'Go to BACKUP list', - 'Focus on search' => 'Focus on search', - 'Display/Close shortcuts' => 'Display/Close shortcuts', - 'Move backward through top menu' => 'Move backward through top menu', - 'Move forward through top menu' => 'Move forward through top menu', - 'Enter focused element' => 'Enter focused element', + 'Shortcuts' => '快捷鍵', + 'Add New object' => '新增', + 'Save Form' => '儲存設定', + 'Cancel saving form' => '不要儲存設定', + 'Go to USER list' => '回到使用者列表', + 'Go to WEB list' => '回到網站列表', + 'Go to DNS list' => '回到DNS列表', + 'Go to MAIL list' => '回到郵件列表', + 'Go to DB list' => '回到資料庫列表', + 'Go to CRON list' => '回到任務排程列表', + 'Go to BACKUP list' => '回到備份列表', + 'Focus on search' => '搜尋', + 'Display/Close shortcuts' => '顯示/關閉 快捷鍵列表', + 'Move backward through top menu' => '在頂置選單中向左移動', + 'Move forward through top menu' => '在頂置選單中向右移動', + 'Enter focused element' => '進入選擇的選項', + 'Move up through elements list' => '往上查看列表', + 'Move down through elements list' => '往下查看列表', - 'Upload' => 'Upload', - 'New File' => 'New File', - 'New Folder' => 'New Folder', - 'Download' => 'Download', - 'Rename' => 'Rename', - 'Copy' => 'Copy', - 'Archive' => 'Archive', - 'Delete' => 'Delete', - 'Save File (in text editor)' => 'Save File (in text editor)', - 'Close Popup / Cancel' => 'Close Popup / Cancel', - 'Move Cursor Up' => 'Move Cursor Up', - 'Move Cursor Dow' => 'Move Cursor Dow', - 'Switch to Left Tab' => 'Switch to Left Tab', - 'Switch to Right Tab' => 'Switch to Right Tab', - 'Switch Tab' => 'Switch Tab', - 'Go to the Top of File List' => 'Go to the Top of File List', - 'Go to the Last File' => 'Go to the Last File', - 'Open File/Enter Directory' => 'Open File/Enter Directory', - 'Go to Parent Directory' => 'Go to Parent Directory', - 'Select Current File' => 'Select Current File', - 'Select Bunch of Files' => 'Select Bunch of Files', - 'Append File to the Current Selection' => 'Append File to the Current Selection', - 'Select All Files' => 'Select All Files', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', + 'Upload' => '上傳', + 'New File' => '新增檔案', + 'New Folder' => '新增資料夾', + 'Download' => '下載', + 'Archive' => '壓縮', + 'Save File (in text editor)' => '儲存檔案 (在目前的文字編輯器)', + 'Close Popup / Cancel' => '關閉快顯視窗 / 取消', + 'Move Cursor Up' => '選項往上移', + 'Move Cursor Down' => '選項往下移', + 'Switch to Left Tab' => '切換到左邊的管理器', + 'Switch to Right Tab' => '切換到右邊的管理器', + 'Switch Tab' => '切換到另一邊的管理器', + 'Go to the Top of the File List' => '回到檔案列表頂端', + 'Go to the Last File' => '回到上個檔案', + 'Open File / Enter Directory' => '開啟檔案 或 進入資料夾', + 'Edit File' => 'Edit File', + 'Go to Parent Directory' => '回到上一頁', + 'Select Current File' => '選取目前的檔案', + 'Select Bunch of Files' => '選取多個檔案', + 'Add File to the Current Selection' => '增加檔案到已選取的列表', + 'Select All Files' => '選取所有檔案', + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + "快捷鍵是的想法是由 magnificent GNU Midnight Commander 檔案管理器 啟發的
繁體中文翻譯是由 Clark's 虛擬主機服務 總工程師 Clark Chen 提供。", - 'Licence Key' => 'Licence Key', - 'Enter License Key' => 'Enter License Key', - 'Buy Licence' => 'Buy Licence', - 'Buy Lifetime License' => 'Buy Lifetime License', - 'Disable and Cancel Licence' => 'Disable and Cancel Licence', - 'Licence Activated' => 'Licence Activated', - 'Licence Deactivated' => 'Licence Deactivated', - 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', - '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.', - '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.' + 'Licence Key' => '授權金鑰', + 'Enter License Key' => '輸入授權金鑰', + 'Buy Licence' => '購買授權', + 'Buy Lifetime License' => '購買永久授權', + 'Disable and Cancel Licence' => '刪除並且取消授權', + 'Licence Activated' => '授權已啟用', + 'Licence Deactivated' => '授權已停用', + 'Restrict users so that they cannot use SSH and access only their home directory.' => '禁止使用者使用SSH,並且只能存取他們自己的資料夾', + 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => '瀏覽、複製、編輯、存取你所有的網站資料使用全能的檔案管理器', + 'This is a commercial module, you would need to purchace license key to enable it.' => '這是一個付費模組,您需要購買授權金鑰才能啟動它。', -); \ No newline at end of file + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', + + +// Texts below doesn't exist in en.php + 'Bandwidth Usage p2p1' => '流量使用量 (p2p1)', + 'Bandwidth Usage ppp0' => '流量使用量 (ppp0)', + 'Bandwidth Usage ppp1' => '流量使用量 (ppp1)', + 'Bandwidth Usage eth1' => '流量使用量 (eth1)', + 'Bandwidth Usage sit0' => '流量使用量 (sit0)', + 'Bandwidth Usage sit1' => '流量使用量 (sit1)', + 'Bandwidth Usage he-ipv6' => '流量使用量 (he-ipv6)', +); diff --git a/web/inc/i18n/ua.php b/web/inc/i18n/ua.php index 876e9647..ec29ed53 100644 --- a/web/inc/i18n/ua.php +++ b/web/inc/i18n/ua.php @@ -6,7 +6,6 @@ */ $LANG['ua'] = array( - 'Packages' => 'Пакети', 'IP' => 'IP', 'Graphs' => 'Графіки', @@ -27,6 +26,21 @@ $LANG['ua'] = array( 'CRON' => 'CRON', 'BACKUP' => 'BACKUP', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Додати користувача', 'Add Domain' => 'Додати домен', 'Add Web Domain' => 'Додати WEB домен', @@ -43,8 +57,8 @@ $LANG['ua'] = array( 'Add IP' => 'Додати IP', 'Add Rule' => 'Додати правило', 'Ban IP Address' => 'Заблокувати IP', - 'Add one more FTP Account' => 'Додати ще один FTP акаунт', 'Search' => 'Пошук', + 'Add one more FTP Account' => 'Додати ще один FTP акаунт', 'Overall Statistics' => 'Загальна статистика', 'Daily' => 'Щоденний', 'Weekly' => 'Щотижневий', @@ -162,13 +176,14 @@ $LANG['ua'] = array( 'Web Aliases' => 'Web аліаси', 'per domain' => 'на домен', 'DNS Domains' => 'DNS домени', - 'DNS Domains' => 'DNS домени', + 'DNS domains' => 'DNS домени', 'DNS records' => 'DNS записи', 'Name Servers' => 'Сервери імен', 'Mail Domains' => 'Поштові домени', 'Mail Accounts' => 'Поштові акаунти', 'Cron Jobs' => 'Cron завдання', 'SSH Access' => 'SSH Доступ', + 'IP Address' => 'IP Address', 'IP Addresses' => 'IP адреси', 'Backups' => 'Резервні копії', 'Backup System' => 'Система резервного копіювання', @@ -180,10 +195,12 @@ $LANG['ua'] = array( 'Proxy Extensions' => 'Розширення Proxy', 'Web Statistics' => 'Веб статистика', 'Additional FTP Account' => 'Додатковий FTP акаунт', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Спливає', 'Records' => 'Записи', + 'Serial' => 'Serial', 'Catchall email' => 'E-mail', 'AntiVirus Support' => 'Підтримка антивірусу', 'AntiSpam Support' => 'Підтримка антиспаму', @@ -193,6 +210,16 @@ $LANG['ua'] = array( 'Autoreply' => 'Автовідповідач', 'Forward to' => 'Перенаправлення', 'Do not store forwarded mail' => 'Не зберігати перенаправлені письма', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'база даних', 'User' => 'Користувач', 'Host' => 'Сервер', @@ -213,12 +240,14 @@ $LANG['ua'] = array( 'Owner' => 'Власник', 'Users' => 'Користувачі', 'Load Average' => 'Загальне Навантаження', - 'Memory Usage' => 'Використання Пам\'яті', + 'Memory Usage' => "Використання Пам'яті", + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'Використання HTTPd', 'NGINX Usage' => 'Використання Proxy', 'MySQL Usage on localhost' => 'Локальний сервер бази даних MySQL', 'PostgreSQL Usage on localhost' => 'Локальний сервер бази даних PostgreSQL', 'Bandwidth Usage eth0' => 'Використання мережі eth0', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'Використання FTP', 'SSH Usage' => 'Використання SSH', 'reverse proxy' => 'зворотній проксі', @@ -231,8 +260,10 @@ $LANG['ua'] = array( 'database server' => 'сервер баз даних', 'ftp server' => 'FTP сервер', 'job scheduler' => 'планувальник завдань', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'Процесор', - 'Memory' => 'Пам\'ять', + 'Memory' => "Пам'ять", 'Uptime' => 'Запущений', 'core package' => 'головний пакет', 'php interpreter' => 'PHP інтерпретатор', @@ -240,14 +271,13 @@ $LANG['ua'] = array( 'Version' => 'Версія', 'Release' => 'Реліз', 'Architecture' => 'Архітектура', - 'Object' => 'Об\'єкт', - 'Owner' => 'Власник', + 'Object' => "Об'єкт", 'Username' => 'Акаунт', 'Password' => 'Пароль', 'Email' => 'E-mail', 'Package' => 'Пакет', 'Language' => 'Мова', - 'First Name' => 'Ім\'я', + 'First Name' => "Ім'я", 'Last Name' => 'Прізвище', 'Send login credentials to email address' => 'Відправити дані акаунту за адресою', 'Default Template' => 'Шаблон за замовчуванням', @@ -320,21 +350,23 @@ $LANG['ua'] = array( 'netmask' => 'маска підмережі', 'interface' => 'інтерфейс', 'assigned user' => 'призначений користувач', - 'ns1' => 'сервер імен №1', - 'ns2' => 'сервер імен №2', + 'ns1' => 'сервер імен #1', + 'ns2' => 'сервер імен #2', 'user' => 'користувач', 'email' => 'пошта', - 'first name' => 'Ім\'я', + 'first name' => "Ім'я", 'last name' => 'Прізвище', 'account' => 'акаунт', 'ssl certificate' => 'SSL сертификат', 'ssl key' => 'ключ SSL сертифікату', 'stats user password' => 'пароль користувача статистики', - 'stats username' => 'ім\'я користувача статистики', + 'stats username' => "ім'я користувача статистики", 'stats password' => 'пароль статистики', 'ftp user password' => 'пароль доступу до FTP', 'ftp user' => 'користувач FTP', 'Last 70 lines of %s.%s.log' => 'Останні 70 рядків файлу %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Завантажити AccessLog', 'Download ErrorLog' => 'Завантажити ErrorLog', 'Country' => 'Країна', @@ -349,7 +381,25 @@ $LANG['ua'] = array( 'Banlist' => 'Чорний список', 'ranges are acceptable' => 'дозволені діапазони', 'CIDR format is supported' => 'формат CIDR підтримується', - 'Add one more Name Server' => 'Додати ще один сервер імен', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', + 'Add one more Name Server' => 'Add one more Name Server', + + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', 'unlimited' => 'безлімітний', '1 account' => ' 1 акаунт', @@ -366,6 +416,8 @@ $LANG['ua'] = array( '%s cron jobs' => '%s завдань', '1 archive' => '1 архів', '%s archives' => '%s архівів', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 пакет', '%s packages' => '%s пакет', '1 IP address' => '1 IP адреса', @@ -374,8 +426,8 @@ $LANG['ua'] = array( '%s months' => '%s місяців', '1 log record' => '1 журнальний запис', '%s log records' => '%s журнальних записів', - '1 object' => '1 об\'єкт', - '%s objects' => '%s об\'єктів', + '1 object' => "1 об'єкт", + '%s objects' => "%s об'єктів", 'no exclusions' => 'немає виключень', '1 rule' => '1 правило', '%s rules' => '%s правил', @@ -393,6 +445,7 @@ $LANG['ua'] = array( 'PACKAGE_CREATED_OK' => 'Пакет %s успішно створено.', 'SSL_GENERATED_OK' => 'SSL cертификат успішно згенеровано.', 'RULE_CREATED_OK' => 'Правило успішно створено.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Aвтооновлення було успішно увімкнено', 'Autoupdate has been successfully disabled' => 'Aвтооновлення було успішно вимкнено', 'Cronjob email reporting has been successfully enabled' => 'Cronjob звітування було успішно увімкнено', @@ -424,7 +477,7 @@ $LANG['ua'] = array( 'DELETE_RULE_CONFIRMATION' => 'Ви впевнені, що хочете видалити правило #%s?', 'SUSPEND_RULE_CONFIRMATION' => 'Ви впевнені, що хочете заблокувати правило #%s?', 'UNSUSPEND_RULE_CONFIRMATION' => 'Ви впевнені, що хочете розблокувати правило #%s?', - 'LEAVE_PAGE_CONFIRMATION' => 'Покинути сторінку?', + 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', 'RESTART_CONFIRMATION' => 'Ви впевнені, що хочете перезапустити %s?', 'Welcome' => 'Ласкаво просимо', 'LOGGED_IN_AS' => 'Ви увійшли як користувач %s', @@ -443,12 +496,12 @@ $LANG['ua'] = array( 'RESTORE_SCHEDULED' => 'Завдання успішно додано в чергу. Після виконання ви отримаєте повний звіт по пошті.', 'RESTORE_EXISTS' => 'Завдання вже виконується, будь-ласка, дочекайтесь закінчення.', - 'WEB_EXCLUSIONS' => "Вкажіть домени по одному на рядок. Для того, щоб виключити всі, використовуйте *. Щоб виключити тільки деякі теки, використовуйте наступний формат: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Вкажіть домени по одному на рядок. Для того, щоб виключити всі, використовуйте *", - 'MAIL_EXCLUSIONS' => "Вкажіть домени по одному на рядок. Для того, щоб виключити всі, використовуйте *. Щоб виключити тільки деякі акаунти, використовуйте наступний формат: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Вкажіть бази по одній на рядок. Для того, щоб виключити всі, використовуйте *", - 'CRON_EXCLUSIONS' => "Для того, щоб виключити всі завдання, використовуйте *", - 'USER_EXCLUSIONS' => "Вкажіть теки по одній на рядок. Для того, щоб виключити всі, використовуйте *", + 'WEB_EXCLUSIONS' => 'Вкажіть домени по одному на рядок. Для того, щоб виключити всі, використовуйте *. Щоб виключити тільки деякі теки, використовуйте наступний формат: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Вкажіть домени по одному на рядок. Для того, щоб виключити всі, використовуйте *', + 'MAIL_EXCLUSIONS' => 'Вкажіть домени по одному на рядок. Для того, щоб виключити всі, використовуйте *. Щоб виключити тільки деякі акаунти, використовуйте наступний формат: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Вкажіть бази по одній на рядок. Для того, щоб виключити всі, використовуйте *', + 'CRON_EXCLUSIONS' => 'Для того, щоб виключити всі завдання, використовуйте *', + 'USER_EXCLUSIONS' => 'Вкажіть теки по одній на рядок. Для того, щоб виключити всі, використовуйте *', 'Welcome to Vesta Control Panel' => 'Вітаємо в панелі керування Vesta', 'MAIL_FROM' => 'Vesta Control Panel ', @@ -468,7 +521,7 @@ $LANG['ua'] = array( 'Confirm Password' => 'Підтвердження паролю', 'Reset' => 'Скинути', 'Reset Code' => 'Код скидання', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Код для відновлення паролю успішно відправлено на вашу електронну пошту.
', 'MAIL_RESET_SUBJECT' => 'Відновлення паролю %s', 'PASSWORD_RESET_REQUEST'=>"Щоб відновити пароль, будь-ласка, перейдіть за посиланням :\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nТакож ви можете відкрити сторінку https://%s/reset/?action=code&user=%s і вручну ввести код для відновлення:\n%s\n\nЯкщо ви не виконували процедуру відновлення паролю, будь ласка, проігноруйте цей лист і прийміть наші вибачення.\n\n--\nПанель керування Vesta\n", @@ -486,120 +539,192 @@ $LANG['ua'] = array( 'Nov' => 'Лист', 'Dec' => 'Груд', - 'Configuring Server' => 'Налаштування серверу', - 'Hostname' => 'Ім\'я хоста', + 'Configuring Server' => 'Налаштування Серверу', + 'Hostname' => "Ім'я хоста", 'Time Zone' => 'Часовий Пояс', 'Default Language' => 'Мова за замовчуванням', - 'FileSystem Disk Quota' => 'Дискова квота файлової системи', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', + 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Плагіни Vesta Control Panel', - 'preview' => 'прев\'ю', + 'preview' => "прев'ю", 'Reseller Role' => 'Реселер', - 'Web Config Editor' => 'Редактор веб конфігів', - 'Template Manager' => 'Менеджер шаблонів', - 'Backup Migration Manager' => 'Менеджер міграції бекапів', - 'FileManager' => 'Файловий менеджер', + 'Web Config Editor' => 'Веб Редактор Конфігів', + 'Template Manager' => 'Менеджер Шаблонів', + 'Backup Migration Manager' => 'Менеджер Міграції Бекапів', + 'FileManager' => 'Файл Менеджер', 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', - 'sort by' => 'сортуваня', - 'Date' => 'Дата', - 'Starred' => 'Обране', - 'Name' => 'Ім\'я', + 'sort by' => 'sort by', + 'Date' => 'Date', + 'Starred' => 'Starred', + 'Name' => 'Name', - 'File Manager' => 'Файловий менеджер', - 'type' => 'тип', - 'size' => 'розмір', - 'date' => 'дата', - 'name' => 'ім\'я', - 'Initializing' => 'Ініціалізація', - 'UPLOAD' => 'ВИВАНТАЖИТИ', - 'NEW FILE' => 'НОВИЙ ФАЙЛ', - 'NEW DIR' => 'НОВА ТЕКА', - 'DELETE' => 'ВИДАЛИТИ', - 'RENAME' => 'ПЕРЕЙМЕНУВАТИ', - 'COPY' => 'КОПІЮВАТИ', - 'ARCHIVE' => 'АРХІВУВАТИ', - 'EXTRACT' => 'РОЗПАКУВАТИ', - 'DOWNLOAD' => 'ЗАВАНТАЖИТИ', - 'Hit' => 'Натиснути', - 'to reload the page' => 'щоб перезавантажити сторінку', - 'Directory name cannot be empty' => 'Ім\'я теки не може бути порожнім ', - 'File name cannot be empty' => 'Ім\'я файлу не може бути порожнім', - 'No file selected' => 'Файл не обрано', - 'No file or folder selected' => 'Файл чи теку не обрано', - 'File type not supported' => 'Тип файлу не підтримується', - 'Directory download not available in current version' => 'Завантаження тек не доступне в поточній версії', - 'Directory not available' => 'Тека не доступна', - 'Done' => 'Виконано', - 'Close' => 'Закрити', - 'Copy' => 'Копіювати', - 'Cancel' => 'Відмінити', - 'Rename' => 'Перейменувати', - 'Delete' => 'Видалити', - 'Extract' => 'Розпакувати', - 'Create' => 'Створити', - 'Compress' => 'Стиснути', + + 'File Manager' => 'File Manager', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Are you sure?' => 'Are you sure?', // unused? + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', 'OK' => 'OK', - 'Are you sure you want to copy' => 'Ви впевнені, що хочете скопіювати', - 'Are you sure you want to delete' => 'Ви впевнені, що хочете видалити', - 'into' => 'до', - 'existing files will be replaced' => 'існуючі файли будуть перезаписані', - 'Original name' => 'Справжнє ім\'я', - 'File' => 'Файл', - 'already exists' => 'вже існує', - 'Create file' => 'Створити файл', - 'Create directory' => 'Створити теку', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to move' => 'Are you sure you want to move', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', - 'Add New object' => 'Додати Новий Об\'єкт', - 'Save Form' => 'Зберегти форму', - 'Cancel saving form' => 'Відмінити збереження форми', - 'Go to USER list' => 'Перейти до USER', - 'Go to WEB list' => 'Перейти до WEB', - 'Go to DNS list' => 'Перейти до DNS', - 'Go to MAIL list' => 'Перейти до MAIL', - 'Go to DB list' => 'Перейти до DB', - 'Go to CRON list' => 'Перейти до CRON', - 'Go to BACKUP list' => 'Перейти до BACKUP', - 'Focus on search' => 'Фокус на пошуку', - 'Display/Close shortcuts' => 'Показати/Приховати скорочення', - 'Move backward through top menu' => 'Фокус на попередній пункт меню', - 'Move forward through top menu' => 'Фокус на наступний пункт меню', - 'Enter focused element' => 'Перейти до активного пункту меню', + 'Shortcuts' => 'Shortcuts', + 'Add New object' => 'Add New object', + 'Save Form' => 'Save Form', + 'Cancel saving form' => 'Cancel saving form', + 'Go to USER list' => 'Go to USER list', + 'Go to WEB list' => 'Go to WEB list', + 'Go to DNS list' => 'Go to DNS list', + 'Go to MAIL list' => 'Go to MAIL list', + 'Go to DB list' => 'Go to DB list', + 'Go to CRON list' => 'Go to CRON list', + 'Go to BACKUP list' => 'Go to BACKUP list', + 'Focus on search' => 'Focus on search', + 'Display/Close shortcuts' => 'Display/Close shortcuts', + 'Move backward through top menu' => 'Move backward through top menu', + 'Move forward through top menu' => 'Move forward through top menu', + 'Enter focused element' => 'Enter focused element', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', - 'Upload' => 'Відвантажити', - 'New File' => 'Новий файл', - 'New Folder' => 'Нова тека', - 'Download' => 'Завантажити', - 'Rename' => 'Перейменувати', - 'Copy' => 'Копіювати', - 'Archive' => 'Архівувати', - 'Delete' => 'Видалити', - 'Save File (in text editor)' => 'Зберегти файл (у текстовому редакторі)', - 'Close Popup / Cancel' => 'Приховати підказки / Відмінити', - 'Move Cursor Up' => 'Перемістити курсор догори', - 'Move Cursor Dow' => 'Перемістити курсор донизу', - 'Switch to Left Tab' => 'Перейти до лівої панелі', - 'Switch to Right Tab' => 'Перейти до правої панелі', - 'Switch Tab' => 'Перехід до панелі', - 'Go to the Top of File List' => 'Перейти до початку списку файлів', - 'Go to the Last File' => 'Перейти до останнього файлу', - 'Open File/Enter Directory' => 'Відкрити файл/Перейти до теки', - 'Go to Parent Directory' => 'Перейти до батьківської теки', - 'Select Current File' => 'Обрати поточний файл', - 'Select Bunch of Files' => 'Обрати групу файлів', - 'Append File to the Current Selection' => 'Додати файл до поточного вибору', - 'Select All Files' => 'Обрати всі файл', - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => - 'скорочення запозичені у чудового GNU файлового менеджера Midnight Commander', + 'Upload' => 'Upload', + 'New File' => 'New File', + 'New Folder' => 'New Folder', + 'Download' => 'Download', + 'Archive' => 'Archive', + 'Save File (in text editor)' => 'Save File (in text editor)', + 'Close Popup / Cancel' => 'Close Popup / Cancel', + 'Move Cursor Up' => 'Move Cursor Up', + 'Move Cursor Down' => 'Move Cursor Down', + 'Switch to Left Tab' => 'Switch to Left Tab', + 'Switch to Right Tab' => 'Switch to Right Tab', + 'Switch Tab' => 'Switch Tab', + 'Go to the Top of the File List' => 'Go to the Top of the File List', + 'Go to the Last File' => 'Go to the Last File', + 'Open File / Enter Directory' => 'Open File / Enter Directory', + 'Edit File' => 'Edit File', + 'Go to Parent Directory' => 'Go to Parent Directory', + 'Select Current File' => 'Select Current File', + 'Select Bunch of Files' => 'Select Bunch of Files', + 'Add File to the Current Selection' => 'Add File to the Current Selection', + 'Select All Files' => 'Select All Files', + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', - 'Licence Key' => 'Ліцензійний ключ', - 'Enter License Key' => 'Ввести ліцензійний ключ', - 'Buy Licence' => 'Прибдати ліцензію', - 'Buy Lifetime License' => 'Придбати вічну ліцензію', - 'Disable and Cancel Licence' => 'Відключити і відмінити ліцензію', - 'Licence Activated' => 'Ліцензію активовано', - 'Licence Deactivated' => 'Ліцензію декативовано', - 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Обмежити користувачів так, що вони не можуть використовувати SSH і матимуть доступ тільки до домашньої директорії.', - 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Переглядайте, копіюйте, редагуйте, переглядайте і відновлюйте всі файли веб-доменів за допомогою повнофункціонального файлового менеджеру.', - 'This is a commercial module, you would need to purchace license key to enable it.' => 'Це комерційний модуль, вам потрібно буде придбати ліцензійний ключ, щоб включити його.' + 'Licence Key' => 'Licence Key', + 'Enter License Key' => 'Enter License Key', + 'Buy Licence' => 'Buy Licence', + 'Buy Lifetime License' => 'Buy Lifetime License', + 'Disable and Cancel Licence' => 'Disable and Cancel Licence', + 'Licence Activated' => 'Licence Activated', + 'Licence Deactivated' => 'Licence Deactivated', + 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Restrict users so that they cannot use SSH and access only their home directory.', + '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.', + '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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', ); diff --git a/web/inc/i18n/vi.php b/web/inc/i18n/vi.php index 5b04a74b..eef37d80 100644 --- a/web/inc/i18n/vi.php +++ b/web/inc/i18n/vi.php @@ -10,6 +10,7 @@ $LANG['vi'] = array( 'Graphs' => 'Theo dõi', 'Statistics' => 'Thống kê', 'Log' => 'Lịch sử', + 'Server' => 'Server', 'Services' => 'Dịch vụ', 'Firewall' => 'Tường lửa', 'Updates' => 'Cập nhật', @@ -24,6 +25,21 @@ $LANG['vi'] = array( 'CRON' => 'CRON', 'BACKUP' => 'Sao lưu', + 'LOGIN' => 'LOGIN', + 'RESET PASSWORD' => 'RESET PASSWORD', + 'SEARCH' => 'SEARCH', + 'PACKAGE' => 'PACKAGE', + 'RRD' => 'RRD', + 'STATS' => 'STATS', + 'LOG' => 'LOG', + 'UPDATES' => 'UPDATES', + 'FIREWALL' => 'FIREWALL', + 'SERVER' => 'SERVER', + 'MEMORY' => 'MEMORY', + 'DISK' => 'DISK', + 'NETWORK' => 'NETWORK', + 'Web Log Manager' => 'Web Log Manager', + 'Add User' => 'Thêm tài khoản', 'Add Domain' => 'Thêm tên miền', 'Add Web Domain' => 'Thêm website', @@ -151,6 +167,7 @@ $LANG['vi'] = array( 'User Directories' => 'Thư mục người dùng', 'Template' => 'Mẫu', 'Web Template' => 'Mẫu Apache', + 'Backend Template' => 'Backend Template', 'Proxy Template' => 'Mẫu Nginx', 'DNS Template' => 'Mẫu DNS', 'Web Domains' => 'Tên miền web', @@ -158,13 +175,14 @@ $LANG['vi'] = array( 'Web Aliases' => 'Ánh xạ web', 'per domain' => 'mỗi tên miền', 'DNS Domains' => 'Miền DNS', - 'DNS Domains' => 'Miên DNS', - 'DNS records' => 'Bản ghi DNS' , + 'DNS domains' => 'Miên DNS', + 'DNS records' => 'Bản ghi DNS', 'Name Servers' => 'Name Servers', 'Mail Domains' => 'Miên Email', 'Mail Accounts' => 'Tài khoản email', 'Cron Jobs' => 'Tiến trình tự động', 'SSH Access' => 'Truy cập SSH', + 'IP Address' => 'IP Address', 'IP Addresses' => 'Địa chỉ IP', 'Backups' => 'Sao lưu', 'Backup System' => 'Sao lưu Hệ thống', @@ -176,10 +194,12 @@ $LANG['vi'] = array( 'Proxy Extensions' => 'Phần mở rộng Nginx', 'Web Statistics' => 'Thống kê Web', 'Additional FTP Account' => 'Tài khoản FTP', + 'Path' => 'Path', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'Hết hạn', 'Records' => 'Bản ghi', + 'Serial' => 'Serial', 'Catchall email' => 'Lấy tất cả email', 'AntiVirus Support' => 'Hỗ trợ chống virus', 'AntiSpam Support' => 'Hỗ trợ chống spam', @@ -189,6 +209,16 @@ $LANG['vi'] = array( 'Autoreply' => 'Tự động trả lời', 'Forward to' => 'Chuyển tiếp đến', 'Do not store forwarded mail' => 'Không lưu thư chuyển tiếp', + 'IMAP hostname' => 'IMAP hostname', + 'IMAP port' => 'IMAP port', + 'IMAP security' => 'IMAP security', + 'IMAP auth method' => 'IMAP auth method', + 'SMTP hostname' => 'SMTP hostname', + 'SMTP port' => 'SMTP port', + 'SMTP security' => 'SMTP security', + 'SMTP auth method' => 'SMTP auth method', + 'STARTTLS' => 'STARTTLS', + 'Normal password' => 'Normal password', 'database' => 'csdl', 'User' => 'Người dùng', 'Host' => 'Host', @@ -210,11 +240,13 @@ $LANG['vi'] = array( 'Users' => 'Người dùng', 'Load Average' => 'Tải trung bình', 'Memory Usage' => 'Sử dụng ram', + 'APACHE2 Usage' => 'APACHE2 Usage', 'HTTPD Usage' => 'HTTPD sử dụng', 'NGINX Usage' => 'NGINX sử dụng', 'MySQL Usage on localhost' => 'MySQL sử dụng tại localhost', 'PostgreSQL Usage on localhost' => 'PostgreSQL sử dụng tại localhost', 'Bandwidth Usage eth0' => 'Băng thông eth0 sử dụng', + 'Exim Usage' => 'Exim Usage', 'FTP Usage' => 'FTP sử dụng', 'SSH Usage' => 'SSH sử dụng', 'reverse proxy' => 'reverse proxy', @@ -227,6 +259,8 @@ $LANG['vi'] = array( 'database server' => 'máy chủ CSDL', 'ftp server' => 'máy chủ FTP', 'job scheduler' => 'việc lập lịch', + 'firewall' => 'firewall', + 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'CPU', 'Memory' => 'Ram', 'Uptime' => 'Thời gian sống', @@ -237,7 +271,6 @@ $LANG['vi'] = array( 'Release' => 'Bản phát hành', 'Architecture' => 'Kiến trúc', 'Object' => 'Đối tượng', - 'Owner' => 'Chủ sở hữu', 'Username' => 'Tên đăng nhập', 'Password' => 'Mật khẩu', 'Email' => 'Email', @@ -315,7 +348,7 @@ $LANG['vi'] = array( 'IP address' => 'Địa chỉ IP', 'netmask' => 'netmask', 'interface' => 'Giao tiếp', - 'assigned user' => 'người dùng đơ]cj chỉ định', + 'assigned user' => 'người dùng được chỉ định', 'ns1' => 'ns1', 'ns2' => 'ns2', 'user' => 'tài khoản', @@ -331,6 +364,8 @@ $LANG['vi'] = array( 'ftp user password' => 'mật khẩu người dùng ftp', 'ftp user' => 'người dùng ftp', 'Last 70 lines of %s.%s.log' => '70 dòng cuối của %s.%s.log', + 'AccessLog' => 'AccessLog', + 'ErrorLog' => 'ErrorLog', 'Download AccessLog' => 'Tải lịch sử truy cập', 'Download ErrorLog' => 'Tải lịch sử lỗi', 'Country' => 'quốc gia', @@ -345,8 +380,27 @@ $LANG['vi'] = array( 'Banlist' => 'Danh sách chặn', 'ranges are acceptable' => 'chấp nhận phạm vi', 'CIDR format is supported' => 'định dạng CIDR được hỗ trợ', + 'ACCEPT' => 'ACCEPT', + 'DROP' => 'DROP', + 'TCP' => 'TCP', + 'UDP' => 'UDP', + 'ICMP' => 'ICMP', + 'SSH' => 'SSH', + 'FTP' => 'FTP', + 'VESTA' => 'VESTA', 'Add one more Name Server' => 'Add one more Name Server', + 'web domain' => 'web domain', + 'dns domain' => 'dns domain', + 'dns record' => 'dns record', + 'mail domain' => 'mail domain', + 'mail account' => 'mail account', + 'cron job' => 'cron job', + + 'cron' => 'cron', + 'user dir' => 'user dir', + + 'unlimited' => 'unlimited', '1 account' => '1 tài khoản', '%s accounts' => '%s tài khoản', '1 domain' => '1 tên miền', @@ -361,6 +415,8 @@ $LANG['vi'] = array( '%s cron jobs' => '%s Tiến trình tự động', '1 archive' => '1 lưu trữ', '%s archives' => '%s lưu trữ', + '1 item' => '1 item', + '%s items' => '%s items', '1 package' => '1 gói hosting', '%s packages' => '%s gói hosting', '1 IP address' => '1 địa chỉ IP', @@ -388,6 +444,7 @@ $LANG['vi'] = array( 'PACKAGE_CREATED_OK' => 'Gói hosting %s đã được tạo thành công.', 'SSL_GENERATED_OK' => 'Tạo thành công chứng chỉ.', 'RULE_CREATED_OK' => 'Tạo thành công luật tường lửa.', + 'BANLIST_CREATED_OK' => 'IP address has been banned successfully', // I'm not sure about this text 'Autoupdate has been successfully enabled' => 'Bật thành công chế độ tự động cập nhật.', 'Autoupdate has been successfully disabled' => 'Tắt thành công chế độ tự động cập nhật.', 'Cronjob email reporting has been successfully enabled' => 'Bật thành công tiến trình tự động báo cáo email', @@ -419,6 +476,7 @@ $LANG['vi'] = array( 'DELETE_RULE_CONFIRMATION' => 'Bạn có chắc chắn muốn xóa luật #%s?', 'SUSPEND_RULE_CONFIRMATION' => 'Bạn có chắc chắn muốn đình chỉ luật #%s?', 'UNSUSPEND_RULE_CONFIRMATION' => 'Bạn có chắc chắn muốn kích hoạt luật #%s?', + 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', 'RESTART_CONFIRMATION' => 'Bạn có chắc chắn muốn khởi động lại %s?', 'Welcome' => 'Xin chào', 'LOGGED_IN_AS' => 'Đăng nhập với tài khoản %s', @@ -437,12 +495,12 @@ $LANG['vi'] = array( 'RESTORE_SCHEDULED' => 'Tiến trình đã được thêm vào hàng đợi. Bạn sẽ nhận được email thông báo khi tiến trình khôi phục hoàn thành.', 'RESTORE_EXISTS' => 'Một tiến trình khôi phục đang được chạy. Vui lòng chờ kết thúc trước khi thực hiện lại.', - 'WEB_EXCLUSIONS' => "Điền tên miền, mỗi dòng một tên miền. Để loại bỏ tất cả tên miền, sử dụng ký tự *. Để loại bỏ một thư mục đặc biệt vui lòng sử dụng định sạng sau: domain.com:public_html/cache:public_html/tmp", - 'DNS_EXCLUSIONS' => "Điền tên miền, mỗi dòng một tên miền. Để loại bỏ tất cả tên miền, sử dụng ký tự *", - 'MAIL_EXCLUSIONS' => "Điền tên miền, mỗi dòng một tên miền. Để loại bỏ tất cả tên miền, sử dụng ký tự *. Để loại bỏ một thư mục đặc biệt vui lòng sử dụng định sạng sau: domain.com:info:support:postmaster", - 'DB_EXCLUSIONS' => "Điền đầy đủ tên CSDL, mỗi CSDL một dòng. Để loại bỏ tất cả CSDL, sử dụng ký tự *", - 'CRON_EXCLUSIONS' => "Để loại bỏ tất cả tiến trình, sử dụng ký tự *", - 'USER_EXCLUSIONS' => "Điền tên thư mục, mỗi thư mục một dòng. Để loại bỏ tất cả thư mục, sử dụng ký tự *", + 'WEB_EXCLUSIONS' => 'Điền tên miền, mỗi dòng một tên miền. Để loại bỏ tất cả tên miền, sử dụng ký tự *. Để loại bỏ một thư mục đặc biệt vui lòng sử dụng định sạng sau: domain.com:public_html/cache:public_html/tmp', + 'DNS_EXCLUSIONS' => 'Điền tên miền, mỗi dòng một tên miền. Để loại bỏ tất cả tên miền, sử dụng ký tự *', + 'MAIL_EXCLUSIONS' => 'Điền tên miền, mỗi dòng một tên miền. Để loại bỏ tất cả tên miền, sử dụng ký tự *. Để loại bỏ một thư mục đặc biệt vui lòng sử dụng định sạng sau: domain.com:info:support:postmaster', + 'DB_EXCLUSIONS' => 'Điền đầy đủ tên CSDL, mỗi CSDL một dòng. Để loại bỏ tất cả CSDL, sử dụng ký tự *', + 'CRON_EXCLUSIONS' => 'Để loại bỏ tất cả tiến trình, sử dụng ký tự *', + 'USER_EXCLUSIONS' => 'Điền tên thư mục, mỗi thư mục một dòng. Để loại bỏ tất cả thư mục, sử dụng ký tự *', 'Welcome to Vesta Control Panel' => 'Chào mứng đến Vesta Control Panel', 'MAIL_FROM' => 'Vesta Control Panel ', @@ -462,7 +520,7 @@ $LANG['vi'] = array( 'Confirm Password' => 'Xác nhận mật khẩu', 'Reset' => 'Thiết lập lại', 'Reset Code' => 'Thiết lập lại mã', - 'RESET_NOTICE' => '', + 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'Mã thiết lập lại mật khẩu đã được gửi đến địa chỉ email
', 'MAIL_RESET_SUBJECT' => 'Khôi phục mật khẩu tại %s', 'PASSWORD_RESET_REQUEST' => "Để thiết lập lại mật khẩu quản trị, vui lòng truy cập vào địa chỉ:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nAlternatively, you may go to https://%s/reset/?action=code&user=%s và nhập mã sau:\n%s\n\nNếu bạn không thực hiện khôi phục mật khẩu, vui lòng bỏ qua email này.\n\n--\nVesta Control Panel\n", @@ -479,11 +537,34 @@ $LANG['vi'] = array( 'Oct' => 'Tháng 10', 'Nov' => 'Tháng 11', 'Dec' => 'Tháng 12', - + 'Configuring Server' => 'Cài đặt máy chủ', 'Hostname' => 'Tên miền', 'Time Zone' => 'Múi giờ', 'Default Language' => 'Ngôn ngữ mặc đinhk', + 'Proxy Server' => 'Proxy Server', + 'Web Server' => 'Web Server', + 'Backend Server' => 'Backend Server', + 'Backend Pool Mode' => 'Backend Pool Mode', + 'DNS Server' => 'DNS Server', + 'DNS Cluster' => 'DNS Cluster', + 'MAIL Server' => 'MAIL Server', + 'Antivirus' => 'Antivirus', + 'AntiSpam' => 'AntiSpam', + 'Webmail URL' => 'Webmail URL', + 'MySQL Support' => 'MySQL Support', + 'phpMyAdmin URL' => 'phpMyAdmin URL', + 'PostgreSQL Support' => 'PostgreSQL Support', + 'phpPgAdmin URL' => 'phpPgAdmin URL', + 'Maximum Number Of Databases' => 'Maximum Number Of Databases', + 'Current Number Of Databases' => 'Current Number Of Databases', + 'Local backup' => 'Local backup', + 'Compression level' => 'Compression level', + 'Directory' => 'Directory', + 'Remote backup' => 'Remote backup', + 'ftp' => 'FTP', + 'sftp' => 'SFTP', + 'SFTP Chroot' => 'SFTP Chroot', 'FileSystem Disk Quota' => 'Hạn mức dung lượng đĩa hệ thống', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'xem trước', @@ -493,14 +574,14 @@ $LANG['vi'] = array( 'Backup Migration Manager' => 'Quản lý tích hợp sao lưu', 'FileManager' => 'FileManager', 'show: CPU / MEM / NET / DISK' => 'hiển thị: CPU / MEM / NET / DISK', - + 'sort by' => 'xếp theo', 'Date' => 'Ngày', 'Starred' => 'Đánh dấu', 'Name' => 'Tên', + 'File Manager' => 'Quản lý tệp', - 'type' => 'loại', 'size' => 'size', 'date' => 'ngày', 'name' => 'tên', @@ -510,10 +591,13 @@ $LANG['vi'] = array( 'NEW DIR' => 'Thêm thư mục mới', 'DELETE' => 'Xóa', 'RENAME' => 'Đổi tên', + 'MOVE' => 'MOVE', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'Sao chép', 'ARCHIVE' => 'Nén', 'EXTRACT' => 'Giải nén', 'DOWNLOAD' => 'Tải về', + 'Are you sure?' => 'Are you sure?', // unused? 'Hit' => 'Lượt', 'to reload the page' => 'để tải lại trang', 'Directory name cannot be empty' => 'Tên thư mục không thể để trống', @@ -528,12 +612,20 @@ $LANG['vi'] = array( 'Copy' => 'Sao chép', 'Cancel' => 'Hủy', 'Rename' => 'Đổi tên', + 'Move' => 'Move', + 'Change Rights' => 'Change Rights', 'Delete' => 'Xóa', 'Extract' => 'Giải nén', 'Create' => 'Tạo mới', 'Compress' => 'Nén', 'OK' => 'OK', + 'YOU ARE COPYING' => 'YOU ARE COPYING', // unused? + 'YOU ARE REMOVING' => 'YOU ARE REMOVING', + 'Delete items' => 'Delete items', + 'Copy files' => 'Copy files', + 'Move files' => 'Move files', 'Are you sure you want to copy' => 'Bạn có chắc chắn muốn sao chép', + 'Are you sure you want to move' => 'Are you sure you want to move', 'Are you sure you want to delete' => 'Bạn có chắc chắn muốn xóa', 'into' => 'into', 'existing files will be replaced' => 'tệp tồn tại sẽ được ghi đè', @@ -542,7 +634,17 @@ $LANG['vi'] = array( 'already exists' => 'đã tồn tại', 'Create file' => 'Tạo tệp', 'Create directory' => 'Tạo thư mục', + 'read by owner' => 'read by owner', + 'write by owner' => 'write by owner', + 'execute/search by owner' => 'execute/search by owner', + 'read by group' => 'read by group', + 'write by group' => 'write by group', + 'execute/search by group' => 'execute/search by group', + 'read by others' => 'read by others', + 'write by others' => 'write by others', + 'execute/search by others' => 'execute/search by others', + 'Shortcuts' => 'Shortcuts', 'Add New object' => 'Thêm đối tượng mới', 'Save Form' => 'Lưu form', 'Cancel saving form' => 'Hủy lưu form', @@ -558,29 +660,29 @@ $LANG['vi'] = array( 'Move backward through top menu' => 'Di chuyển ngược trên Top Menu', 'Move forward through top menu' => 'Di chuyển xuôi trên Top Menu', 'Enter focused element' => 'Nhập vào phần tử focus', + 'Move up through elements list' => 'Move up through elements list', + 'Move down through elements list' => 'Move down through elements list', 'Upload' => 'Tải lên', 'New File' => 'Tạo tệp', 'New Folder' => 'Tạo thư mục', 'Download' => 'Tải về', - 'Rename' => 'Đổi tên', - 'Copy' => 'Sao chép', 'Archive' => 'Lưu trữ', - 'Delete' => 'Xóa', 'Save File (in text editor)' => 'Lưu tệp (Trong trình chỉnh sửa văn bản)', 'Close Popup / Cancel' => 'Đóng Popup / Hủy', 'Move Cursor Up' => 'Di chuyển chuột lên', - 'Move Cursor Dow' => 'Di chuyển chuột xuống', + 'Move Cursor Down' => 'Di chuyển chuột xuống', 'Switch to Left Tab' => 'Chuyển sang tab trái', 'Switch to Right Tab' => 'Chuyển sang tab phải', 'Switch Tab' => 'Chuyển đổi Tab', - 'Go to the Top of File List' => 'Lên đầu danh sách tệp', + 'Go to the Top of the File List' => 'Lên đầu danh sách tệp', 'Go to the Last File' => 'Di chuyển đến tệp cuối cùng', - 'Open File/Enter Directory' => 'Mở tệp/Truy cập thư mục', + 'Open File / Enter Directory' => 'Mở tệp/Truy cập thư mục', + 'Edit File' => 'Edit File', 'Go to Parent Directory' => 'Về thư mục cha', 'Select Current File' => 'Chọn tệp hiện tại', 'Select Bunch of Files' => 'Chọn nhiều tệp', - 'Append File to the Current Selection' => 'Thêm tệp vào lựa chọn hiện tại', + 'Add File to the Current Selection' => 'Thêm tệp vào lựa chọn hiện tại', 'Select All Files' => 'Chọn tất cả các tệp', 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', @@ -593,6 +695,34 @@ $LANG['vi'] = array( 'Licence Deactivated' => 'Bản quyền đã bị hủy kích hoạt', 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Hạn chế người dùng không thể dùng SSH và chỉ có thể truy cập thư mục home của họ.', 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Duyệt tệp, sao chép, chỉnh sửa, xem, và lấy tất cả các tệp tin từ tất cả các tên miền của bạn bằng cách sử dụng trình quản lý tệp tin đầy đủ tính năng.', - 'This is a commercial module, you would need to purchace license key to enable it.' => 'Đây là một module thương mại, bạn sẽ cần phải mua key bản quyền để kích hoạt nó.' + 'This is a commercial module, you would need to purchace license key to enable it.' => 'Đây là một module thương mại, bạn sẽ cần phải mua key bản quyền để kích hoạt nó.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Run Command' => 'Run Command', + 'every month' => 'every month', + 'every odd month' => 'every odd month', + 'every even month' => 'every even month', + 'every day' => 'every day', + 'every odd day' => 'every odd day', + 'every even day' => 'every even day', + 'weekdays (5 days)' => 'weekdays (5 days)', + 'weekend (2 days)' => 'weekend (2 days)', + 'Monday' => 'Monday', + 'Tuesday' => 'Tuesday', + 'Wednesday' => 'Wednesday', + 'Thursday' => 'Thursday', + 'Friday' => 'Friday', + 'Saturday' => 'Saturday', + 'Sunday' => 'Sunday', + 'every hour' => 'every hour', + 'every two hours' => 'every two hours', + 'every minute' => 'every minute', + 'every two minutes' => 'every two minutes', + 'every' => 'every', + 'Generate' => 'Generate', + + 'webalizer' => 'webalizer', + 'awstats' => 'awstats', ); diff --git a/web/inc/mail-wrapper.php b/web/inc/mail-wrapper.php index a8c48a09..4281aaad 100755 --- a/web/inc/mail-wrapper.php +++ b/web/inc/mail-wrapper.php @@ -2,14 +2,19 @@ 0 ) { header("Location: /error/"); @@ -89,13 +106,51 @@ function check_error($return_var) { } function check_return_code($return_var,$output) { - if ($return_var != 0) { + if ($return_var != 0) { $error = implode('
', $output); if (empty($error)) $error = __('Error code:',$return_var); $_SESSION['error_msg'] = $error; } } +function render_page($user, $TAB, $page) { + $__template_dir = dirname(__DIR__) . '/templates/'; + $__pages_js_dir = dirname(__DIR__) . '/js/pages/'; + + // Header + include($__template_dir . 'header.html'); + + // Panel + top_panel(empty($_SESSION['look']) ? $_SESSION['user'] : $_SESSION['look'], $TAB); + + // Extarct global variables + // I think those variables should be passed via arguments + //* + extract($GLOBALS, EXTR_SKIP); + /*/ + $variables = array_filter($GLOBALS, function($key){return preg_match('/^(v_|[a-z])[a-z\d]+$/', $key);}, ARRAY_FILTER_USE_KEY); + extract($variables, EXTR_OVERWRITE); + //*/ + + // Body + if (($_SESSION['user'] !== 'admin') && (@include($__template_dir . "user/$page.html"))) { + // User page loaded + } else { + // Not admin or user page doesn't exist + // Load admin page + @include($__template_dir . "admin/$page.html"); + } + + // Including common js files + @include_once(dirname(__DIR__) . '/templates/scripts.html'); + // Including page specific js file + if(file_exists($__pages_js_dir.$page.'.js')) + echo ''; + + // Footer + include($__template_dir . 'footer.html'); +} + function top_panel($user, $TAB) { global $panel; $command = VESTA_CMD."v-list-user '".$user."' 'json'"; @@ -106,10 +161,25 @@ function top_panel($user, $TAB) { } $panel = json_decode(implode('', $output), true); unset($output); + + + // getting notifications + $command = VESTA_CMD."v-list-user-notifications '".$user."' 'json'"; + exec ($command, $output, $return_var); + $notifications = json_decode(implode('', $output), true); + foreach($notifications as $message){ + if($message['ACK'] == 'no'){ + $panel[$user]['NOTIFICATIONS'] = 'yes'; + break; + } + } + unset($output); + + if ( $user == 'admin' ) { - include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/panel.html'); + include(dirname(__FILE__).'/../templates/admin/panel.html'); } else { - include($_SERVER['DOCUMENT_ROOT'].'/templates/user/panel.html'); + include(dirname(__FILE__).'/../templates/user/panel.html'); } } @@ -227,36 +297,6 @@ function send_email($to,$subject,$mailtext,$from) { mail($to, $subject, $message, $header); } -function display_error_block() { - if (!empty($_SESSION['error_msg'])) { - echo ' -
- -
-

'. htmlentities($_SESSION['error_msg']) .'

-
-
'."\n"; - unset($_SESSION['error_msg']); - } -} - function list_timezones() { $tz = new DateTimeZone('HAST'); $timezone_offsets['HAST'] = $tz->getOffset(new DateTime); diff --git a/web/js/app.js b/web/js/app.js index ae8883c3..af335fa5 100644 --- a/web/js/app.js +++ b/web/js/app.js @@ -668,14 +668,6 @@ var _DEBUG_LEVEL = 'ALL'; // possible levels: ALL, IMPORTANT var Error = {FATAL: 1, WARNING: 0, NORMAL: -1}; -// -// GLOBAL SETTINGS -// -GLOBAL = {}; -GLOBAL.FTP_USER_PREFIX = 'admin_'; -GLOBAL.DB_USER_PREFIX = 'admin_'; -GLOBAL.DB_DBNAME_PREFIX = 'admin_'; -GLOBAL.AJAX_URL = ''; /** * Init debug, grabs console object if accessible, or makes dummy debugger @@ -700,6 +692,11 @@ var fb = _DEBUG && 'undefined' != typeof(console) ? console : { msg : function(){} }; +var checked = false; +var frmname = ''; +var lastScrollTop = 0; + + // var App = { // Main namespases for page specific functions @@ -800,9 +797,9 @@ App.Ajax.request = function(method, data, callback, onError){ }*/ //App.Helpers.setAjaxBusy(method, data); data = data || {}; - + var prgs = $('.progress-container'); - + switch (method) { case 'cd': prgs.find('title').text('Opening dir'); @@ -828,8 +825,12 @@ App.Ajax.request = function(method, data, callback, onError){ prgs.find('title').text('Renaming file'); prgs.show(); break; + case 'copy_file': + case 'copy_directory': + prgs.find('title').text('Copying files'); + prgs.show(); + break; default: - break; } @@ -1007,17 +1008,21 @@ hover_menu = function() { nav_a.css({'min-height': 111 - st + 'px'}); nav_context.css({'margin-top': 215 - st + 'px'}); sep_2.css({'box-shadow':'none'}); + sep_2.css({'background-color': '#ddd'}); + sep_2.css({'height': '1px'}); } if(st > 112){ sep_1.css({'margin-top': '100px'}); - sep_2.css({'margin-top': '145px'}); + sep_2.css({'margin-top': '130px'}); + sep_2.css({'height': '15px'}); + sep_2.css({'background-color': '#fff'}); nav_a.css({'height': '0'}); nav_a.css({'min-height': '0'}); nav_context.css({'margin-top': '101px'}); nav_a.find('ul').css({'visibility': 'hidden'}); nav_main.css({'padding-top': '27px'}); - sep_2.css({'box-shadow':'0 2px 5px 0 rgba(0, 0, 0, 0.6)'}); + sep_2.css({'box-shadow':'0 5px 3px 0 rgba(200, 200, 200, 0.5)'}); } if(st == 0){ @@ -1036,3 +1041,32 @@ hover_menu = function() { lastScrollTop = st; } + + +function checkedAll(frmname) { + if ($('.l-unit.selected:not(.header)').length > 0) { + $('.l-unit:not(.header)').removeClass("selected"); + $('.ch-toggle').prop("checked", false); + $('.toggle-all').removeClass('clicked-on'); + } + else { + $('.l-unit:not(.header)').addClass("selected"); + $('.ch-toggle').prop("checked", true); + $('.toggle-all').addClass('clicked-on'); + } +} + +function doSearch(url) { + var url = url || '/search/'; + var loc = url + '?q=' + $('.search-input').val(); + + location.href = loc; + return false; +} + + +function elementHideShow(elementToHideOrShow){ + var el = document.getElementById(elementToHideOrShow); + el.style.display = el.style.display === 'none' ? 'block' : 'none'; +} + diff --git a/web/js/file_manager.js b/web/js/file_manager.js index c551b21c..b467a0b1 100644 --- a/web/js/file_manager.js +++ b/web/js/file_manager.js @@ -284,7 +284,7 @@ FM.openAndSync = function(dir, box, callback, forceOppositeSync) { if (tab == 'A') { opposite_tab = 'B'; } - + var oppositeSyncNeeded = false; if (FM.TAB_A_CURRENT_PATH == FM.TAB_B_CURRENT_PATH) { @@ -314,7 +314,6 @@ FM.open = function(dir, box, callback) { 'dir': dir }; App.Ajax.request('cd', params, function(reply) { - //var tab = FM.getTabLetter(FM.CURRENT_TAB); FM.preselectedItems[tab] = []; if (reply.result == true) { var html = FM.generate_listing(reply.listing, box); @@ -324,17 +323,16 @@ FM.open = function(dir, box, callback) { } callback && callback(reply); - + var current_pwd = dir.trim() == '' ? FM.ROOT_DIR : dir; - + FM.updateTopLevelPathBar(box, tab, current_pwd); - - + var path_a = FM['TAB_A_CURRENT_PATH'] == '' ? FM.ROOT_DIR : FM['TAB_A_CURRENT_PATH']; var path_b = FM['TAB_B_CURRENT_PATH'] == '' ? FM.ROOT_DIR : FM['TAB_B_CURRENT_PATH']; var url = '/list/directory/?dir_a='+path_a+'&dir_b='+path_b; history.pushState({}, null, url); - + if (FM['CURRENT_' + tab + '_LINE'] == -1) { FM.setActive(0, FM.CURRENT_TAB); } @@ -738,7 +736,7 @@ FM.bulkOperation = function(ref) { $(ref).find('option[value=-1]').attr('selected', true); } -FM.checkBulkStatus = function(bulkStatuses, acc) { +FM.checkBulkStatus = function(bulkStatuses, acc, dont_reload) { var status = true; var msg = ''; if (bulkStatuses.length == acc.length) { @@ -751,19 +749,21 @@ FM.checkBulkStatus = function(bulkStatuses, acc) { if (msg != '') { status = false; } - } - if (status == true) { - FM.popupClose(); + if (status == true) { + FM.popupClose(); + } + else { + $('#popup .results').show().html(msg); + $('#popup .ok').hide(); + } + + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + if(!dont_reload){ + FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box); + } } - else { - $('#popup .results').show().html(msg); - $('#popup .ok').hide(); - } - - var box = FM['TAB_' + tab]; - var tab = FM.getTabLetter(FM.CURRENT_TAB); - FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box, function(){}, true); } FM.bulkPopupClose = function() { @@ -802,8 +802,6 @@ FM.humanFileSizeUnit = function(size) { FM.bulkCopyDo = function() { var acc = $(FM.CURRENT_TAB).find('.dir.selected'); if (acc.length > 0) { - //FM.popupClose(); - var cfr_html = ''; var numberOfItems = 0; $.each(acc, function(i, o) { @@ -816,16 +814,14 @@ FM.bulkCopyDo = function() { numberOfItems++; } }); - var bulkStatuses = []; $.each(acc, function(i, o) { var ref = $(o); var src = $(ref).find('.source').val(); src = $.parseJSON(src); - + if (FM.isItemPseudo(src)) { - //cfr_html += '
'+src.name+'
'; return; } @@ -836,36 +832,35 @@ FM.bulkCopyDo = function() { } if (FM.isItemPseudo(src)) { - /*return FM.displayError( - App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED - );*/ return; } - + var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ]; if (dest == '') { dest = GLOBAL.ROOT_DIR; } - + var action = FM.isItemFile(src) ? 'copy_file' : 'copy_directory'; - + var params = { item: src.full_path, filename: src.name, dir: FM['TAB_' + tab + '_CURRENT_PATH'], dir_target: dest }; - + + App.Ajax.request(action, params, function(reply) { if (reply.result == true) { bulkStatuses.push(true); } else { - //FM.showError('copy-items', reply.message); bulkStatuses.push(reply.message); } - - FM.checkBulkStatus(bulkStatuses, acc); + FM.checkBulkStatus(bulkStatuses, acc, true); + if(bulkStatuses.length == acc.length){ + FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]); + } }); }); } @@ -888,7 +883,7 @@ FM.bulkCopy = function() { numberOfItems++; } }); - + var tab = FM.getTabLetter(FM.CURRENT_TAB); var opposite_tab = 'A'; if (tab == 'A') { @@ -905,7 +900,6 @@ FM.bulkCopy = function() { //popup_bulk_copy FM.popupOpen(tpl.finalize()); - } } @@ -961,7 +955,6 @@ FM.bulkRemoveDo = function() { bulkStatuses.push(true); } else { - //FM.showError('copy-items', reply.message); bulkStatuses.push(reply.message); } @@ -998,76 +991,6 @@ FM.bulkRemove = function() { } } - -FM.bulkRemove11111 = function() { - var acc = $(FM.CURRENT_TAB).find('.dir.selected'); - if (acc.length > 0) { - //FM.popupClose(); - - var cfr_html = ''; - - $.each(acc, function(i, o) { - var ref = $(o); - var src = $(ref).find('.source').val(); - src = $.parseJSON(src); - - if (!FM.isItemPseudo(o)) { - cfr_html += '
'+src.name+'
'; - } - }); - - var tpl = Tpl.get('popup_bulk', 'FM'); - tpl.set(':ACTION', App.Constants.FM_YOU_ARE_REMOVING); - tpl.set(':TEXT', cfr_html); - - FM.popupOpen(tpl.finalize()); - - var bulkStatuses = []; - $.each(acc, function(i, o) { - var ref = $(o); - var src = $(ref).find('.source').val(); - src = $.parseJSON(src); - - var tab = FM.getTabLetter(FM.CURRENT_TAB); - - var opposite_tab = 'A'; - if (tab == 'A') { - opposite_tab = 'B'; - } - - if (FM.isItemPseudo(src)) { - return; - /*return FM.displayError( - App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED - );*/ - } - - var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ]; - if (dest == '') { - dest = GLOBAL.ROOT_DIR; - } - - var params = { - item: src.full_path, - dir: FM['TAB_' + tab + '_CURRENT_PATH'] - }; - - App.Ajax.request('delete_files', params, function(reply) { - if (reply.result == true) { - bulkStatuses.push(true); - } - else { - //FM.showError('copy-items', reply.message); - bulkStatuses.push(reply.message); - } - - FM.checkBulkStatus(bulkStatuses, acc); - }); - }); - - } -} - FM.toggleAllItemsSelected = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; @@ -1191,6 +1114,7 @@ FM.selectItem = function(item, box) { } } + FM.isItemPseudo = function(item) { if (item.name == '.' || item.name == '..') { return true; @@ -1199,7 +1123,7 @@ FM.isItemPseudo = function(item) { } FM.itemIsArchieve = function(item) { - + if ($.inArray(item.filetype, FM.SUPPORTED_ARCHIEVES) != -1) { return true; } @@ -1385,7 +1309,7 @@ FM.renameItems = function() { var src = selected.find('.source').val(); src = $.parseJSON(src); - + if (FM.isItemPseudo(src)) { return FM.displayError( App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED @@ -1398,6 +1322,417 @@ FM.renameItems = function() { FM.popupOpen(tpl.finalize()); } +FM.confirmMove = function() { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + var selected = $(FM['TAB_' + tab] ).find('.dir.active'); + if (!selected) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + var src = selected.find('.source').val(); + src = $.parseJSON(src); + + var target_name = $('#dst-name').val(); + + if (target_name.trim().length == 0) { + return FM.displayError( + App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY + ); + } + + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + var opposite_box = FM['TAB_' + opposite_tab]; + + var action = FM.isItemFile(src) ? 'move_file' : 'move_directory'; + + var params = { + item: FM['TAB_' + tab + '_CURRENT_PATH'] + '/' + src.name, + target_name: target_name + }; + + App.Ajax.request(action, params, function(reply) { + if (reply.result == true) { + FM.popupClose(); + FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box); + FM.openAndSync(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], opposite_box); + } + else { + FM.showError('rename-items', reply.message); + } + }); +} + + +FM.moveItems = function() { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + if (selected.length == 0) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + if (selected.length > 1) { // multi operation + return FM.bulkMove(); + } + + var src = selected.find('.source').val(); + src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + + var dst = FM['TAB_' + opposite_tab + '_CURRENT_PATH']; + if (dst == '') { + dst = GLOBAL.ROOT_DIR; + } + + var tpl = Tpl.get('popup_move', 'FM'); + tpl.set(':FILENAME', src.full_path); + tpl.set(':DST_NAME', (dst + '/' + src.name).replace('//', '/')); + FM.popupOpen(tpl.finalize()); +} + +FM.bulkMove = function() { + var acc = $(FM.CURRENT_TAB).find('.dir.selected'); + if (acc.length > 0) { + FM.popupClose(); + + var cfr_html = ''; + var numberOfItems = 0; + $.each(acc, function(i, o) { + var ref = $(o); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + if (!FM.isItemPseudo(src)) { + cfr_html += '
'+src.name+'
'; + numberOfItems++; + } + }); + + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ]; + if (dest == '') { + dest = GLOBAL.ROOT_DIR; + } + + var tpl = Tpl.get('popup_bulk_move', 'FM'); + tpl.set(':NUMBER_OF_ITEMS', numberOfItems); + tpl.set(':DST_NAME', dest); + //popup_bulk_copy + + FM.popupOpen(tpl.finalize()); + } +} + +FM.bulkMoveDo = function() { + var acc = $(FM.CURRENT_TAB).find('.dir.selected'); + if (acc.length > 0) { + //FM.popupClose(); + + var cfr_html = ''; + var numberOfItems = 0; + $.each(acc, function(i, o) { + var ref = $(o); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + if (!FM.isItemPseudo(o)) { + cfr_html += '
'+src.name+'
'; + numberOfItems++; + } + }); + + var bulkStatuses = []; + $.each(acc, function(i, o) { + var ref = $(o); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + var target_name = $('#dst-name').val(); + if (target_name.trim().length == 0) { + return FM.displayError( + App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY + ); + } + + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + + if (FM.isItemPseudo(src)) { + return; + } + + var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ]; + if (dest == '') { + dest = GLOBAL.ROOT_DIR; + } + var action = FM.isItemFile(src) ? 'move_file' : 'move_directory'; + + var params = { + item: FM['TAB_' + tab + '_CURRENT_PATH'] + '/' + src.name, + target_name: target_name + }; + + App.Ajax.request(action, params, function(reply) { + if (reply.result == true) { + bulkStatuses.push(true); + } + else { + //FM.showError('copy-items', reply.message); + bulkStatuses.push(reply.message); + } + + FM.checkBulkStatus(bulkStatuses, acc); + if(bulkStatuses.length == acc.length){ + FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]); + } + }); + }); + } +} + +FM.confirmChmod = function() { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + var selected = $(FM['TAB_' + tab] ).find('.dir.active'); + if (!selected) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + var src = selected.find('.source').val(); + src = $.parseJSON(src); + + var ro = $('input[name="read-by-owner"]').is(':checked') ? 4 : 0; + var wo = $('input[name="write-by-owner"]').is(':checked') ? 2 : 0; + var eo = $('input[name="execute-by-owner"]').is(':checked') ? 1 : 0; + + var rg = $('input[name="read-by-group"]').is(':checked') ? 4 : 0; + var wg = $('input[name="write-by-group"]').is(':checked') ? 2 : 0; + var eg = $('input[name="execute-by-group"]').is(':checked') ? 1 : 0; + + var re = $('input[name="read-by-others"]').is(':checked') ? 4 : 0; + var we = $('input[name="write-by-others"]').is(':checked') ? 2 : 0; + var ee = $('input[name="execute-by-others"]').is(':checked') ? 1 : 0; + + var o = ro+wo+eo; + var g = rg+wg+eg; + var e = re+we+ee; + + var permissions = o + "" + g + "" + e + ""; + + var action = FM.isItemFile(src) ? 'chmod_item' : 'chmod_item'; + + var params = { + dir: FM['TAB_' + tab + '_CURRENT_PATH'] + '/', + item: src.name, + permissions: permissions + }; + + App.Ajax.request(action, params, function(reply) { + if (reply.result == true) { + FM.popupClose(); + FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box); + } + else { + FM.showError('chmod-items', reply.message); + } + }); +} + + +FM.confirmBulkChmod = function() { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + var acc = $(FM.CURRENT_TAB).find('.dir.selected'); + if (acc.length > 0) { + //FM.popupClose(); + + var cfr_html = ''; + var numberOfItems = 0; + $.each(acc, function(i, o) { + var ref = $(o); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + if (!FM.isItemPseudo(o)) { + cfr_html += '
'+src.name+'
'; + numberOfItems++; + } + }); + + + var ro = $('input[name="read-by-owner"]').is(':checked') ? 4 : 0; + var wo = $('input[name="write-by-owner"]').is(':checked') ? 2 : 0; + var eo = $('input[name="execute-by-owner"]').is(':checked') ? 1 : 0; + + var rg = $('input[name="read-by-group"]').is(':checked') ? 4 : 0; + var wg = $('input[name="write-by-group"]').is(':checked') ? 2 : 0; + var eg = $('input[name="execute-by-group"]').is(':checked') ? 1 : 0; + + var re = $('input[name="read-by-others"]').is(':checked') ? 4 : 0; + var we = $('input[name="write-by-others"]').is(':checked') ? 2 : 0; + var ee = $('input[name="execute-by-others"]').is(':checked') ? 1 : 0; + + var o = ro+wo+eo; + var g = rg+wg+eg; + var e = re+we+ee; + + var permissions = o + "" + g + "" + e + ""; + + var action = 'chmod_item'; + var tab = FM.getTabLetter(FM.CURRENT_TAB); + + + var bulkStatuses = []; + $.each(acc, function(i, o) { + + var ref = $(o); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return; + } + + var params = { + dir: FM['TAB_' + tab + '_CURRENT_PATH'] + '/', + item: src.name, + permissions: permissions + }; + + App.Ajax.request(action, params, function(reply) { + if (reply.result == true) { + bulkStatuses.push(true); + } + else { + bulkStatuses.push(reply.message); + } + }); + }); + + + var status = true; + var msg = ''; + $.each(bulkStatuses, function(i, o) { + if (o != true) { + msg += '

'+o+'

'; + } + }); + + if (msg != '') { + status = false; + } + + if (status == true) { + FM.popupClose(); + FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box); + } + else { + $('#popup .message').show().html(msg); + $('#popup .ok').hide(); + } + } +} + + +FM.chmodItems = function() { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + if (selected.length == 0) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + if (selected.length > 1) { // multi operation + return FM.bulkChmod(); + } + + + var src = selected.find('.source').val(); + src = $.parseJSON(src); + + var mode = selected.find('.mode').text(); + + var tpl = Tpl.get('popup_chmod', 'FM'); + tpl.set(':FILENAME', src.name); + + tpl.set(':READ_BY_OWNER', mode[0] & 4 ? "checked" : ""); + tpl.set(':WRITE_BY_OWNER', mode[0] & 2 ? "checked" : ""); + tpl.set(':EXECUTE_BY_OWNER', mode[0] & 1 ? "checked" : ""); + + tpl.set(':READ_BY_GROUP', mode[1] & 4 ? "checked" : ""); + tpl.set(':WRITE_BY_GROUP', mode[1] & 2 ? "checked" : ""); + tpl.set(':EXECUTE_BY_GROUP', mode[1] & 1 ? "checked" : ""); + + tpl.set(':READ_BY_OTHERS', mode[2] & 4 ? "checked" : ""); + tpl.set(':WRITE_BY_OTHERS', mode[2] & 2 ? "checked" : ""); + tpl.set(':EXECUTE_BY_OTHERS', mode[2] & 1 ? "checked" : ""); + + FM.popupOpen(tpl.finalize()); +} + +FM.bulkChmod = function() { + var acc = $(FM.CURRENT_TAB).find('.dir.selected'); + if (acc.length > 0) { + FM.popupClose(); + + var cfr_html = ''; + var numberOfItems = 0; + $.each(acc, function(i, o) { + var ref = $(o); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + if (!FM.isItemPseudo(src)) { + cfr_html += '
'+src.name+'
'; + numberOfItems++; + } + }); + + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ]; + if (dest == '') { + dest = GLOBAL.ROOT_DIR; + } + + var tpl = Tpl.get('popup_bulk_chmod', 'FM'); + tpl.set(':NUMBER_OF_ITEMS', numberOfItems); + //popup_bulk_copy + + FM.popupOpen(tpl.finalize()); + } +} + FM.isPopupOpened = function() { return $('#popup').length > 0 ? true : false; } @@ -1413,6 +1748,7 @@ FM.popupOpen = function(html) { } FM.popupClose = function() { + $('#reload-in-time').remove(); clearTimeout(FM.Env.errorMessageHideTimeout); return $('#popup').flayer_close(); } @@ -1429,22 +1765,22 @@ FM.copyItems = function() { if (selected.length > 1) { // multi operation return FM.bulkCopy(); } - + var src = selected.find('.source').val(); src = $.parseJSON(src); - + if (FM.isItemPseudo(src)) { return FM.displayError( App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED ); } - + var opposite_tab = 'A'; if (tab == 'A') { opposite_tab = 'B'; } - + var dst = FM['TAB_' + opposite_tab + '_CURRENT_PATH']; if (dst == '') { dst = GLOBAL.ROOT_DIR; @@ -1465,7 +1801,7 @@ FM.confirmUnpackItem = function () { App.Constants.FM_NO_FILE_SELECTED ); } - + var opposite_tab = 'A'; if (tab == 'A') { opposite_tab = 'B'; @@ -1473,7 +1809,7 @@ FM.confirmUnpackItem = function () { var src = selected.find('.source').val(); src = $.parseJSON(src); - + if (FM.isItemPseudo(src)) { return FM.displayError( App.Constants.FM_NO_FILE_SELECTED @@ -1485,12 +1821,12 @@ FM.confirmUnpackItem = function () { App.Constants.FM_FILE_TYPE_NOT_SUPPORTED ); } - + var dst = FM['TAB_' + tab + '_CURRENT_PATH']; if (dst == '') { dst = GLOBAL.ROOT_DIR; } - + var params = { item: src.full_path, filename: src.name, @@ -1511,47 +1847,63 @@ FM.confirmUnpackItem = function () { } FM.confirmPackItem = function () { + var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; - var selected = $(FM['TAB_' + tab] ).find('.dir.active'); + var selected = $(FM['TAB_' + tab] ).find('.dir.active, .dir.selected'); if (selected.length == 0) { return FM.displayError( App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED ); } - + if (selected.length == 1) { + var ref = $(selected[0]); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + } + + + if (selected.length > 0) { + var files_arr = []; + $.each(selected, function(i, o) { + var ref = $(o); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + if (!FM.isItemPseudo(o)) { + files_arr.push(src.full_path); + } + }); + } + + + var opposite_tab = 'A'; if (tab == 'A') { opposite_tab = 'B'; } - var src = selected.find('.source').val(); - src = $.parseJSON(src); - - if (FM.isItemPseudo(src)) { - return FM.displayError( - App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED - ); - } - var dst = FM['TAB_' + tab + '_CURRENT_PATH']; if (dst == '') { dst = GLOBAL.ROOT_DIR; } - + var params = { - item: src.full_path, - filename: src.name, - dir: FM['TAB_' + tab + '_CURRENT_PATH'], - dir_target: $('#pack-destination').val() + items: files_arr.join(','), + dst_item: $('#pack-destination').val() }; - App.Ajax.request('pack_item', params, function(reply) { if (reply.result == true) { FM.popupClose(); FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]); - FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]); +/// FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]); } else { FM.showError('unpack_item', reply.message); @@ -1562,7 +1914,7 @@ FM.confirmPackItem = function () { FM.confirmCopyItems = function () { var tab = FM.getTabLetter(FM.CURRENT_TAB); var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); - + if (!selected) { return FM.displayError( App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED @@ -1600,7 +1952,6 @@ FM.confirmCopyItems = function () { App.Ajax.request(action, params, function(reply) { if (reply.result == true) { FM.popupClose(); - // FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]); FM.openAndSync(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]); } else { @@ -1740,12 +2091,11 @@ FM.triggerRefreshActionTrick = function() { $('#reload-in-time').remove(); FM.Env.RELOAD_IN_TIME = true; var tpl = Tpl.get('reload_in_time', 'FM'); - //tpl.set(':TIME_LEFT', FM.RELOAD_IN_TIME_SECONDS + 1); - + $('body').append(tpl.finalize()); - + var ref = $('#reload-in-time').find('.reload-in-time-counter'); - + var timeleft = FM.RELOAD_IN_TIME_SECONDS; FM.Env.reload_in_time_interval = setInterval(function() { @@ -2071,6 +2421,32 @@ $(document).ready(function() { 'target': document }); + shortcut.add("F4",function() { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var elm = $(FM.CURRENT_TAB).find('.dir:eq('+FM['CURRENT_'+tab+'_LINE']+')'); + + if (elm.length == 1) { + var src = $.parseJSON($(elm).find('.source').val()); + + if (src.type == 'd') { + } + else { + if(FM.IMG_FILETYPES.indexOf(src.filetype) >= 0 && src.filetype.length > 0) { + FM.fotoramaOpen(tab, 'img-' + elm.index()); + } + else { + FM.openFile(src.full_path, FM.CURRENT_TAB, elm); + } + } + } + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + }); + + shortcut.add("Enter",function() { if (FM.isPopupOpened()) { return FM.handlePopupSubmit(); @@ -2135,6 +2511,16 @@ $(document).ready(function() { 'target': document }); + shortcut.add("m",function() { + FM.moveItems(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + }); + + shortcut.add("shift+F6",function() { FM.renameItems(); },{ diff --git a/web/js/i18n.js.php b/web/js/i18n.js.php index 34f52f18..f625beca 100644 --- a/web/js/i18n.js.php +++ b/web/js/i18n.js.php @@ -24,8 +24,10 @@ App.Constants.FM_DIRECTORY_NOT_AVAILABLE = ''; App.Constants.FM_CLOSE = ''; App.Constants.FM_COPY = ''; +App.Constants.FM_MOVE = ''; App.Constants.FM_CANCEL = ''; App.Constants.FM_RENAME = ''; +App.Constants.FM_CHMOD = ''; App.Constants.FM_DELETE = ''; App.Constants.FM_CONFIRM_DELETE_BULK = ''; App.Constants.FM_EXTRACT = ''; @@ -37,8 +39,10 @@ App.Constants.FM_YOU_ARE_COPYING = ''; App.Constants.FM_YOU_ARE_REMOVING = ''; App.Constants.FM_COPY_BULK = ''; +App.Constants.FM_MOVE_BULK = ''; App.Constants.FM_CONFIRM_COPY = ''; +App.Constants.FM_CONFIRM_MOVE = ''; App.Constants.FM_CONFIRM_DELETE = ''; App.Constants.FM_INTO_KEYWORD = ''; App.Constants.FM_EXISTING_FILES_WILL_BE_REPLACED= ''; @@ -49,4 +53,13 @@ App.Constants.FM_CREATE_FILE = ''; App.Constants.FM_CREATE_DIRECTORY = ''; App.Constants.FM_TRANSLATED_DATES = {'Jan': '', 'Feb': '','Mar': '','Apr': '','May': '','Jun': '','Jul': '','Aug': '','Sep': '','Oct': '','Nov': '','Dec': ''}; +App.Constants.FM_READ_BY_OWNER = ''; +App.Constants.FM_WRITE_BY_OWNER = ''; +App.Constants.FM_EXECUTE_BY_OWNER = ''; +App.Constants.FM_READ_BY_GROUP = ''; +App.Constants.FM_WRITE_BY_GROUP = ''; +App.Constants.FM_EXECUTE_BY_GROUP = ''; +App.Constants.FM_READ_BY_OTHERS = ''; +App.Constants.FM_WRITE_BY_OTHERS = ''; +App.Constants.FM_EXECUTE_BY_OTHERS = ''; diff --git a/web/js/init.js b/web/js/init.js new file mode 100644 index 00000000..b4f43edb --- /dev/null +++ b/web/js/init.js @@ -0,0 +1,592 @@ +$(document).ready(function(){ + if($('.body-login')[0]){ + $('input').first().focus(); + } + + $(".submenu-select-dropdown").each(function(){ + $(this).wrap(""); + $(this).after(""); + }); + $(".submenu-select-dropdown").change(function(){ + var selectedOption = $(this).find(":selected").text(); + $(this).next(".holder").text(selectedOption); + }).trigger('change'); + $('.to-top').bind('click', function(evt) { + $("html, body").animate({ scrollTop: 0 }, "normal"); + }); + + + var isMobile = false; //initiate as false + // device detection + if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) + || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))){ + isMobile = true; + $('body').addClass('mobile'); + } + + $(window).scroll(function(){hover_menu()}); + + $('.l-sort-toolbar .sort-by').click(function(){ + $('.context-menu.sort-order').toggle().css({left: $(this).position().left - 10}); + }); + + + // CREATE BUTTON + + $('.l-sort__create-btn').hover(function(){ + $(".l-sort__create-btn").append("
"); + $(".l-sort__create-btn").append("
"+$('.l-sort__create-btn').attr('title').replace(' ',' ')+"
"); + }, function(){ + $("#add-icon").remove(); + $("#tooltip").remove(); + }); + + + // SEARCH BOX + + $('.l-sort-toolbar__search, .l-sort-toolbar__search-box .search-input').hover(function(){ + clearTimeout(VE.tmp.search_display_interval); + clearTimeout(VE.tmp.search_hover_interval); + VE.tmp.search_display_interval = setTimeout(function(){$('.search-input').addClass('activated');}, 150); + }, function(){ + clearTimeout(VE.tmp.search_display_interval); + clearTimeout(VE.tmp.search_hover_interval); + VE.tmp.search_hover_interval = setTimeout(function(){ + if(!VE.tmp.search_activated && !$(".search-input").val().length){ + $(".search-input").removeClass('activated'); + } + }, 600); + }); + + $('.search-input').focus(function(){ + VE.tmp.search_activated = 1; + clearTimeout(VE.tmp.search_hover_interval); + }); + $('.search-input').blur(function(){ + VE.tmp.search_activated = 0; + clearTimeout(VE.tmp.search_hover_interval); + VE.tmp.search_hover_interval = setTimeout(function(){ + if(!$(".search-input").val().length){ + $(".search-input").removeClass('activated'); + } + }, 600); + }); + + + // TIMER + + if($('.movement.left').length){ + VE.helpers.refresh_timer.right = $('.movement.right'); + VE.helpers.refresh_timer.left = $('.movement.left'); + VE.helpers.refresh_timer.start(); + + $('.pause').click(function(){ + VE.helpers.refresh_timer.stop(); + $('.pause').addClass('hidden'); + $('.play').removeClass('hidden'); + $('.refresh-timer').addClass('paused'); + }); + + $('.play').click(function(){ + VE.helpers.refresh_timer.start(); + $('.pause').removeClass('hidden'); + $('.play').addClass('hidden'); + $('.refresh-timer').removeClass('paused'); + }); + } + + + // SORTING + + $('#vstobjects input, #vstobjects select, #vstobjects textarea').change(function(){VE.tmp.form_changed=1}); + + $('.sort-order span').click(function(){ + $('.context-menu.sort-order').toggle(); + if($(this).hasClass('active')) + return; + + $('.sort-order span').removeClass('active'); + $(this).addClass('active'); + VE.tmp.sort_par = $(this).parent('li').attr('entity'); + VE.tmp.sort_as_int = $(this).parent('li').attr('sort_as_int'); + VE.tmp.sort_direction = $(this).hasClass('up')*1 || -1; + + $('.l-sort .sort-by span b').html($(this).parent('li').find('.name').html()); + $('.l-sort .sort-by i').removeClass('l-icon-up-arrow l-icon-down-arrow'); + $(this).hasClass('up') ? $('.l-sort .sort-by i').addClass('l-icon-up-arrow') : $('.l-sort .sort-by i').addClass('l-icon-down-arrow'); + $('.units .l-unit').sort(function (a, b) { + if(VE.tmp.sort_as_int) + return parseInt($(a).attr(VE.tmp.sort_par)) >= parseInt($(b).attr(VE.tmp.sort_par)) ? VE.tmp.sort_direction : VE.tmp.sort_direction * -1; + else + return $(a).attr(VE.tmp.sort_par) <= $(b).attr(VE.tmp.sort_par) ? VE.tmp.sort_direction : VE.tmp.sort_direction * -1; + }).appendTo(".l-center.units"); + }); + + + + // STARS + + $('.l-unit .l-icon-star').click(function(){ + var l_unit = $(this).parents('.l-unit'); + + if(l_unit.hasClass('l-unit--starred')){ + // removing star + + $.ajax({ + method: "POST", + url: "/delete/favorite/index.php", + data: { v_section: l_unit.attr('v_section'), v_unit_id: l_unit.attr('v_unit_id') } + }); + + l_unit.attr({'sort-star': 0}); + l_unit.removeClass('l-unit--starred'); + } + else{ + $.ajax({ + method: "POST", + url: "/add/favorite/index.php", + data: { v_unit_id: l_unit.attr('v_unit_id'), v_section: l_unit.attr('v_section') } + }); + + l_unit.attr({'sort-star': 1}); + l_unit.addClass('l-unit--starred'); + } + }); + + + + // Shortcuts + + shortcut.add("Ctrl+Enter", function(){ + $('form#vstobjects').submit(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + } + ); + + shortcut.add("Ctrl+Backspace", function(){ + if(VE.tmp.form_changed && $('form#vstobjects .button.cancel')[0]){ + VE.helpers.createConfirmationDialog($('.confirmation-text-redirect'), '', $('form#vstobjects input.cancel').attr('onclick').replace("location.href='", "").replace("'","")); + } else if($('form#vstobjects .button.cancel')[0]){ + location.href=$('form#vstobjects input.cancel').attr('onclick').replace("location.href='", "").replace("'",""); + } else if($('#vstobjects a.button.cancel')[0]){ + location.href=$('#vstobjects a.button.cancel').attr('href'); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + } + ); + + + shortcut.add("f", function(){ + $('.search-input').addClass('activated').focus(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + $(window).bind('keypress', function(evt) { + var tag = evt.target.tagName.toLowerCase(); + if (evt.charCode == 97 && tag != 'input' && tag != 'textarea' && tag != 'selectbox') { + evt.preventDefault(); + if (!evt.ctrlKey && !evt.shiftKey) { + if ($('.l-sort__create-btn')[0]) { + location.href=$('.l-sort__create-btn').attr('href'); + } + } + else { + if ($('.l-unit .ch-toggle:eq(0)').attr('checked')) { + $('.l-unit').removeClass('selected'); + $('.l-unit .ch-toggle').prop('checked', false); + } + else { + $('.l-unit').addClass('selected'); + $('.l-unit .ch-toggle').prop('checked', true); + } + } + } + }); + + shortcut.add("1", function(){ + if(VE.tmp.form_changed){ + VE.helpers.createConfirmationDialog($('.confirmation-text-redirect'), '', $('.l-stat .l-stat__col:nth-of-type(1) a').attr('href')); + } else { + location.href=$('.l-stat .l-stat__col:nth-of-type(1) a').attr('href'); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("2", function(){ + if(VE.tmp.form_changed){ + VE.helpers.createConfirmationDialog($('.confirmation-text-redirect'), '', $('.l-stat .l-stat__col:nth-of-type(2) a').attr('href')); + } else { + location.href=$('.l-stat .l-stat__col:nth-of-type(2) a').attr('href'); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("3", function(){ + if(VE.tmp.form_changed){ + VE.helpers.createConfirmationDialog($('.confirmation-text-redirect'), '', $('.l-stat .l-stat__col:nth-of-type(3) a').attr('href')); + } else { + location.href=$('.l-stat .l-stat__col:nth-of-type(3) a').attr('href'); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("4", function(){ + if(VE.tmp.form_changed){ + VE.helpers.createConfirmationDialog($('.confirmation-text-redirect'), '', $('.l-stat .l-stat__col:nth-of-type(4) a').attr('href')); + } else { + location.href=$('.l-stat .l-stat__col:nth-of-type(4) a').attr('href'); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("5", function(){ + if(VE.tmp.form_changed){ + VE.helpers.createConfirmationDialog($('.confirmation-text-redirect'), '', $('.l-stat .l-stat__col:nth-of-type(5) a').attr('href')); + } else { + location.href=$('.l-stat .l-stat__col:nth-of-type(5) a').attr('href'); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("6", function(){ + if(VE.tmp.form_changed){ + VE.helpers.createConfirmationDialog($('.confirmation-text-redirect'), '', $('.l-stat .l-stat__col:nth-of-type(6) a').attr('href')); + } else { + location.href=$('.l-stat .l-stat__col:nth-of-type(6) a').attr('href'); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("7", function(){ + if(VE.tmp.form_changed){ + VE.helpers.createConfirmationDialog($('.confirmation-text-redirect'), '', $('.l-stat .l-stat__col:nth-of-type(7) a').attr('href')); + } else { + location.href=$('.l-stat .l-stat__col:nth-of-type(7) a').attr('href'); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("h", function(){ + $('.shortcuts').toggle(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("Esc", function(){ + $('.shortcuts').hide(); + $('input, checkbox, textarea, select').blur(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + } + ); + + shortcut.add("Left", function(){ + VE.navigation.move_focus_left(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("Right", function(){ + VE.navigation.move_focus_right(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + + + shortcut.add("down", function(){ + VE.navigation.move_focus_down(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("up", function(){ + VE.navigation.move_focus_up(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("l", function(){ + var elm = $('.units.active .l-unit.focus .shortcut-l'); + if(elm.length){ + VE.navigation.shortcut(elm); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("s", function(){ + var elm = $('.units.active .l-unit.focus .shortcut-s'); + if(elm.length){ + VE.navigation.shortcut(elm); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("w", function(){ + var elm = $('.units.active .l-unit.focus .shortcut-w'); + if(elm.length){ + VE.navigation.shortcut(elm); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("d", function(){ + var elm = $('.units.active .l-unit.focus .shortcut-d'); + if(elm.length){ + VE.navigation.shortcut(elm); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("r", function(){ + var elm = $('.units.active .l-unit.focus .shortcut-r'); + if(elm.length){ + VE.navigation.shortcut(elm); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("n", function(){ + var elm = $('.units.active .l-unit.focus .shortcut-n'); + if(elm.length){ + VE.navigation.shortcut(elm); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("u", function(){ + var elm = $('.units.active .l-unit.focus .shortcut-u'); + if(elm.length){ + VE.navigation.shortcut(elm); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + + shortcut.add("Delete", function(){ + var elm = $('.units.active .l-unit.focus .shortcut-delete'); + if(elm.length){ + VE.navigation.shortcut(elm); + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("Enter", function(){ + if(VE.tmp.form_changed){ + if(!$('.ui-dialog').is(':visible')){ + VE.helpers.createConfirmationDialog($('.confirmation-text-redirect')[0], '', $(VE.navigation.state.menu_selector + '.focus a').attr('href')); + } else { // if dialog is opened - submitting confirm box by "enter" shortcut + $('.ui-dialog button.submit').click(); + } + } else { + if(!$('.ui-dialog').is(':visible')){ + var elm = $('.units.active .l-unit.focus .shortcut-enter'); + if(elm.length){ + VE.navigation.shortcut(elm); + } else { + VE.navigation.enter_focused(); + } + } else { // if dialog is opened - submitting confirm box by "enter" shortcut + $('.ui-dialog button.submit').click(); + } + } + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + + + $('.shortcuts .close').click(function(){ + $('.shortcuts').hide(); + }); + + $('.to-shortcuts').click(function(){ + $('.shortcuts').toggle(); + }); + + $(document).click(function(evt){ + //close notification popup + if(!$(evt.target).hasClass('l-profile__notifications') && $(evt.target).parents('ul.notification-container').length == 0){ + $('.notification-container').hide(); + $('.l-profile__notifications').removeClass('active'); + } + }); + + + // focusing on the first input at form + if( location.href.indexOf('lead=') == -1 && !$('.ui-dialog').is(':visible') ){ + $('#vstobjects .vst-input:not([disabled]), #vstobjects .vst-list:not([disabled])').first().focus(); + } + + $('.l-profile__notifications').click(function(){ + if(!$('.l-profile__notifications').hasClass('active')){ + VE.notifications.get_list(); + $('.l-profile__notifications').addClass('active'); + left = $('.l-profile__notifications').offset().left - $('.notification-container').outerWidth() + 28; + $('.notification-container').css({left: left+'px'}); + + } else { + $('.notification-container').hide(); + $('.l-profile__notifications').removeClass('active'); + } + }); + + VE.navigation.init(); + + VE.core.register(); + if (location.href.search(/list/) != -1) { + var shift_select_ref = $('body').finderSelect({ + children: '.l-unit', + 'onFinish': function(evt) { + var ref = $(evt.target); + $('.l-content').find('.l-unit .ch-toggle').prop('checked', false); + $('.l-content').find('.l-unit.selected .ch-toggle').prop('checked', true); + + + if ($('.l-content').find('.l-unit.selected').length == $('.l-content').find('.l-unit').length) { + $('.toggle-all').addClass('clicked-on'); + } + + }, + 'toggleAllHook': function() { + if ($('.l-unit').length == $('.ch-toggle:checked').length) { + $('.l-unit.selected').removeClass('selected'); + $('.ch-toggle').prop('checked', false); + $('#toggle-all').prop('checked', false); + } + else { + $('.ch-toggle').prop('checked', true); + $('#toggle-all').prop('checked', true); + } + } + }); + + $('table').on('mousedown', 'td', function(e) { + if (e.ctrlKey) { + e.preventDefault(); + } + }); + } + + // + $('form#objects').bind('submit', function(evt) { + $('.l-unit').find('.ch-toggle').prop('checked', false); + $('.l-unit.selected').find('.ch-toggle').prop('checked', true); + }); + }); + diff --git a/web/js/pages/add_cron.js b/web/js/pages/add_cron.js new file mode 100644 index 00000000..1ee6a5b7 --- /dev/null +++ b/web/js/pages/add_cron.js @@ -0,0 +1,16 @@ +$(document).ready(function(){ + $( "#tabs" ).tabs(); + $('.context-helper').click(function(){ $('#tabs').toggle(); $('.context-helper').toggle(); }); + $('.context-helper-close').click(function(){ $('#tabs').toggle(); $('.context-helper').toggle(); }); + + $('.helper-container form').submit(function(){ + $('#vstobjects input[name=v_min]').val($(this).find(':input[name=h_min]').val()).effect('highlight'); + $('#vstobjects input[name=v_hour]').val($(this).find(':input[name=h_hour]').val()).effect('highlight'); + $('#vstobjects input[name=v_day]').val($(this).find(':input[name=h_day]').val()).effect('highlight'); + $('#vstobjects input[name=v_month]').val($(this).find(':input[name=h_month]').val()).effect('highlight'); + $('#vstobjects input[name=v_wday]').val($(this).find(':input[name=h_wday]').val()).effect('highlight'); + + return false; + }); +}) + diff --git a/web/js/pages/add.db.js b/web/js/pages/add_db.js similarity index 85% rename from web/js/pages/add.db.js rename to web/js/pages/add_db.js index c0f36fc9..b2e1c999 100644 --- a/web/js/pages/add.db.js +++ b/web/js/pages/add_db.js @@ -68,3 +68,14 @@ App.Listeners.DB.keypress_db_databasename = function() { // Trigger listeners App.Listeners.DB.keypress_db_username(); App.Listeners.DB.keypress_db_databasename(); + +randomString = function() { + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; + var string_length = 10; + var randomstring = ''; + for (var i = 0; i < string_length; i++) { + var rnum = Math.floor(Math.random() * chars.length); + randomstring += chars.substr(rnum, 1); + } + document.v_add_db.v_password.value = randomstring; +} diff --git a/web/js/pages/add_dns.js b/web/js/pages/add_dns.js new file mode 100644 index 00000000..c4a0df42 --- /dev/null +++ b/web/js/pages/add_dns.js @@ -0,0 +1,27 @@ +$(document).ready(function(){ + $('.add-ns-button').click(function(){ + var n = $('input[name^=v_ns]').length; + if(n < 8){ + var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true); + t.find('input').attr({value:'', name:'v_ns'+(n+1)}); + t.find('span').show(); + $('tr.add-ns').before(t); + } + if( n == 7 ) { + $('.add-ns').hide(); + } + }); + + $('.remove-ns').click(function(){ + $(this).parents('tr')[0].remove(); + $('input[name^=v_ns]').each(function(i, ns){ + $(ns).attr({name: 'v_ns'+(i+1)}); + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }) + $('.add-ns').show() + }); + + $('input[name^=v_ns]').each(function(i, ns){ + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); +}); diff --git a/web/js/pages/add.dns.record.js b/web/js/pages/add_dns_rec.js similarity index 100% rename from web/js/pages/add.dns.record.js rename to web/js/pages/add_dns_rec.js diff --git a/web/js/pages/edit.mail_acc.js b/web/js/pages/add_mail_acc.js similarity index 63% rename from web/js/pages/edit.mail_acc.js rename to web/js/pages/add_mail_acc.js index 19d1e192..d96d0158 100644 --- a/web/js/pages/edit.mail_acc.js +++ b/web/js/pages/add_mail_acc.js @@ -77,3 +77,41 @@ $('form[name="v_quota"]').bind('submit', function(evt) { }); +randomString = function() { + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; + var string_length = 10; + var randomstring = ''; + for (var i = 0; i < string_length; i++) { + var rnum = Math.floor(Math.random() * chars.length); + randomstring += chars.substr(rnum, 1); + } + document.v_add_mail_acc.v_password.value = randomstring; + + if($('input[name=v_password]').attr('type') == 'text') + $('#v_password').text(randomstring); + else + $('#v_password').text(Array(randomstring.length+1).join('*')); +} + +$(document).ready(function() { + $('#v_account').text($('input[name=v_account]').val()); + $('#v_password').text($('input[name=v_password]').val()); + + $('input[name=v_account]').change(function(){ + $('#v_account').text($(this).val()); + }); + + $('input[name=v_password]').change(function(){ + if($('input[name=v_password]').attr('type') == 'text') + $('#v_password').text($(this).val()); + else + $('#v_password').text(Array($(this).val().length+1).join('*')); + }); + + $('.toggle-psw-visibility-icon').click(function(){ + if($('input[name=v_password]').attr('type') == 'text') + $('#v_password').text($('input[name=v_password]').val()); + else + $('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*')); + }); +}); diff --git a/web/js/pages/add.package.js b/web/js/pages/add_package.js similarity index 72% rename from web/js/pages/add.package.js rename to web/js/pages/add_package.js index beb5fe4d..a0dfd67f 100644 --- a/web/js/pages/add.package.js +++ b/web/js/pages/add_package.js @@ -77,3 +77,30 @@ $('form[name="v_add_package"]').bind('submit', function(evt) { }); +$(document).ready(function(){ + $('.add-ns-button').click(function(){ + var n = $('input[name^=v_ns]').length; + if(n < 8){ + var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true); + t.find('input').attr({value:'', name:'v_ns'+(n+1)}); + t.find('span').show(); + $('tr.add-ns').before(t); + } + if( n == 7 ) { + $('.add-ns').hide(); + } + }); + + $('.remove-ns').click(function(){ + $(this).parents('tr')[0].remove(); + $('input[name^=v_ns]').each(function(i, ns){ + $(ns).attr({name: 'v_ns'+(i+1)}); + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + $('.add-ns').show(); + }); + + $('input[name^=v_ns]').each(function(i, ns){ + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); +}); diff --git a/web/js/pages/add_user.js b/web/js/pages/add_user.js new file mode 100644 index 00000000..510ed167 --- /dev/null +++ b/web/js/pages/add_user.js @@ -0,0 +1,17 @@ +$(function() { + $('#v_email').change(function() { + document.getElementById('v_notify').value = document.getElementById('v_email').value; + }); +}); + + +randomString = function() { + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; + var string_length = 10; + var randomstring = ''; + for (var i = 0; i < string_length; i++) { + var rnum = Math.floor(Math.random() * chars.length); + randomstring += chars.substr(rnum, 1); + } + document.v_add_user.v_password.value = randomstring; +} diff --git a/web/js/pages/add.web.js b/web/js/pages/add_web.js similarity index 81% rename from web/js/pages/add.web.js rename to web/js/pages/add_web.js index 7a01f746..084540f0 100644 --- a/web/js/pages/add.web.js +++ b/web/js/pages/add_web.js @@ -156,3 +156,39 @@ App.Actions.WEB.toggle_additional_ftp_accounts = function(elm) { App.Listeners.WEB.keypress_ftp_username(); App.Listeners.WEB.keypress_ftp_path(); App.Listeners.WEB.keypress_domain_name(); + + +$(function() { + $('#v_domain').change(function() { + var prefix = 'www.'; + document.getElementById('v_aliases').value = prefix + document.getElementById('v_domain').value; + }); +}); + +function WEBrandom() { + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; + var string_length = 10; + var webrandom = ''; + for (var i = 0; i < string_length; i++) { + var rnum = Math.floor(Math.random() * chars.length); + webrandom += chars.substr(rnum, 1); + } + document.v_add_web.v_stats_password.value = webrandom; +} + +function FTPrandom(elm) { + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; + var string_length = 10; + var ftprandomstring = ''; + for (var i = 0; i < string_length; i++) { + var rnum = Math.floor(Math.random() * chars.length); + ftprandomstring += chars.substr(rnum, 1); + } + $(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring); +} + +$('#vstobjects').bind('submit', function(evt) { + $('input[disabled]').each(function(i, elm) { + $(elm).removeAttr('disabled'); + }); +}); diff --git a/web/js/pages/edit_cron.js b/web/js/pages/edit_cron.js new file mode 100644 index 00000000..1ee6a5b7 --- /dev/null +++ b/web/js/pages/edit_cron.js @@ -0,0 +1,16 @@ +$(document).ready(function(){ + $( "#tabs" ).tabs(); + $('.context-helper').click(function(){ $('#tabs').toggle(); $('.context-helper').toggle(); }); + $('.context-helper-close').click(function(){ $('#tabs').toggle(); $('.context-helper').toggle(); }); + + $('.helper-container form').submit(function(){ + $('#vstobjects input[name=v_min]').val($(this).find(':input[name=h_min]').val()).effect('highlight'); + $('#vstobjects input[name=v_hour]').val($(this).find(':input[name=h_hour]').val()).effect('highlight'); + $('#vstobjects input[name=v_day]').val($(this).find(':input[name=h_day]').val()).effect('highlight'); + $('#vstobjects input[name=v_month]').val($(this).find(':input[name=h_month]').val()).effect('highlight'); + $('#vstobjects input[name=v_wday]').val($(this).find(':input[name=h_wday]').val()).effect('highlight'); + + return false; + }); +}) + diff --git a/web/js/pages/edit.db.js b/web/js/pages/edit_db.js similarity index 85% rename from web/js/pages/edit.db.js rename to web/js/pages/edit_db.js index c0f36fc9..8f30c278 100644 --- a/web/js/pages/edit.db.js +++ b/web/js/pages/edit_db.js @@ -68,3 +68,15 @@ App.Listeners.DB.keypress_db_databasename = function() { // Trigger listeners App.Listeners.DB.keypress_db_username(); App.Listeners.DB.keypress_db_databasename(); + +randomString = function() { + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; + var string_length = 10; + var randomstring = ''; + for (var i = 0; i < string_length; i++) { + var rnum = Math.floor(Math.random() * chars.length); + randomstring += chars.substr(rnum, 1); + } + document.v_edit_db.v_password.value = randomstring; +} + \ No newline at end of file diff --git a/web/js/pages/add.mail_acc.js b/web/js/pages/edit_mail_acc.js similarity index 65% rename from web/js/pages/add.mail_acc.js rename to web/js/pages/edit_mail_acc.js index 19d1e192..43220c71 100644 --- a/web/js/pages/add.mail_acc.js +++ b/web/js/pages/edit_mail_acc.js @@ -77,3 +77,36 @@ $('form[name="v_quota"]').bind('submit', function(evt) { }); +randomString = function() { + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; + var string_length = 10; + var randomstring = ''; + for (var i = 0; i < string_length; i++) { + var rnum = Math.floor(Math.random() * chars.length); + randomstring += chars.substr(rnum, 1); + } + document.v_edit_mail_acc.v_password.value = randomstring; +} + +$(document).ready(function() { + $('#v_account').text($('input[name=v_account]').val()); + $('#v_password').text($('input[name=v_password]').val()); + + $('input[name=v_account]').change(function(){ + $('#v_account').text($(this).val()); + }); + + $('input[name=v_password]').change(function(){ + if($('input[name=v_password]').attr('type') == 'text') + $('#v_password').text($(this).val()); + else + $('#v_password').text(Array($(this).val().length+1).join('*')); + }); + + $('.toggle-psw-visibility-icon').click(function(){ + if($('input[name=v_password]').attr('type') == 'text') + $('#v_password').text($('input[name=v_password]').val()); + else + $('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*')); + }); +}); diff --git a/web/js/pages/edit.package.js b/web/js/pages/edit_package.js similarity index 72% rename from web/js/pages/edit.package.js rename to web/js/pages/edit_package.js index 301a9182..b38cf0d9 100644 --- a/web/js/pages/edit.package.js +++ b/web/js/pages/edit_package.js @@ -77,3 +77,30 @@ $('form[name="v_edit_package"]').bind('submit', function(evt) { }); +$(document).ready(function(){ + $('.add-ns-button').click(function(){ + var n = $('input[name^=v_ns]').length; + if(n < 8){ + var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true); + t.find('input').attr({value:'', name:'v_ns'+(n+1)}); + t.find('span').show(); + $('tr.add-ns').before(t); + } + if( n == 7 ) { + $('.add-ns').hide(); + } + }); + + $('.remove-ns').click(function(){ + $(this).parents('tr')[0].remove(); + $('input[name^=v_ns]').each(function(i, ns){ + $(ns).attr({name: 'v_ns'+(i+1)}); + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + $('.add-ns').show(); + }); + + $('input[name^=v_ns]').each(function(i, ns){ + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); +}); \ No newline at end of file diff --git a/web/js/pages/edit_server.js b/web/js/pages/edit_server.js new file mode 100644 index 00000000..205c1fd4 --- /dev/null +++ b/web/js/pages/edit_server.js @@ -0,0 +1,17 @@ +$(document).ready(function(){ + $('select[name=v_filemanager]').change(function(){ + if($(this).val() == 'yes'){ + $('.filemanager.description').show(); + } else { + $('.filemanager.description').hide(); + } + }); + + $('select[name=v_sftp]').change(function(){ + if($(this).val() == 'yes'){ + $('.sftp.description').show(); + } else { + $('.sftp.description').hide(); + } + }); +}); diff --git a/web/js/pages/edit_user.js b/web/js/pages/edit_user.js new file mode 100644 index 00000000..439aeab0 --- /dev/null +++ b/web/js/pages/edit_user.js @@ -0,0 +1,39 @@ +function randomString() { + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; + var string_length = 10; + var randomstring = ''; + for (var i = 0; i < string_length; i++) { + var rnum = Math.floor(Math.random() * chars.length); + randomstring += chars.substr(rnum, 1); + } + document.v_edit_user.v_password.value = randomstring; +} + +$(document).ready(function(){ + $('.add-ns-button').click(function(){ + var n = $('input[name^=v_ns]').length; + if(n < 8){ + var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true); + t.find('input').attr({value:'', name:'v_ns'+(n+1)}); + t.find('span').show(); + $('tr.add-ns').before(t); + } + if( n == 7 ) { + $('.add-ns').hide(); + } + }); + + $('.remove-ns').click(function(){ + $(this).parents('tr')[0].remove(); + $('input[name^=v_ns]').each(function(i, ns){ + $(ns).attr({name: 'v_ns'+(i+1)}); + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + $('.add-ns').show(); + }); + + $('input[name^=v_ns]').each(function(i, ns){ + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + +}); \ No newline at end of file diff --git a/web/js/pages/edit.web.js b/web/js/pages/edit_web.js similarity index 79% rename from web/js/pages/edit.web.js rename to web/js/pages/edit_web.js index 1406d9d0..3c41f938 100644 --- a/web/js/pages/edit.web.js +++ b/web/js/pages/edit_web.js @@ -163,3 +163,42 @@ $('.v-ftp-user-psw').on('keypress', function(evt) { var elm = $(evt.target); App.Actions.WEB.passwordChanged(elm); }); + + +function WEBrandom() { + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; + var string_length = 10; + var webrandom = ''; + for (var i = 0; i < string_length; i++) { + var rnum = Math.floor(Math.random() * chars.length); + webrandom += chars.substr(rnum, 1); + } + document.v_edit_web.v_stats_password.value = webrandom; +} + +function FTPrandom(elm) { + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; + var string_length = 10; + var ftprandomstring = ''; + for (var i = 0; i < string_length; i++) { + var rnum = Math.floor(Math.random() * chars.length); + ftprandomstring += chars.substr(rnum, 1); + } + + $(elm).parents('.ftptable').find('.v-ftp-user-psw').val(ftprandomstring); + App.Actions.WEB.randomPasswordGenerated && App.Actions.WEB.randomPasswordGenerated(elm); +} + +function elementHideShow(elementToHideOrShow){ + var el = document.getElementById(elementToHideOrShow); + el.style.display = el.style.display === 'none' ? 'block' : 'none'; +} + +$('#vstobjects').bind('submit', function(evt) { + $('input[disabled]').each(function(i, elm) { + var copy_elm = $(elm).clone(true); + $(copy_elm).attr('type', 'hidden'); + $(copy_elm).removeAttr('disabled'); + $(elm).after(copy_elm); + }); +}); diff --git a/web/js/templates.js b/web/js/templates.js index d600ddc6..1691c10f 100644 --- a/web/js/templates.js +++ b/web/js/templates.js @@ -64,14 +64,18 @@ App.Templates.html = {

'+App.Constants.FM_COPY+'

\ \ '], - /*popup_bulk: ['
@@ -29,6 +27,328 @@ $back = "location.href='".$back."'"; } ?> + +
+
+
    +
  • +
  • +
  • +
  • +
  • +
+
+
+ + + + +

: + +

+

+ +

+
+
+ + +
+
+ + + +

: + +

+ +

: + +

+ +

+ +

+
+
+ + +
+
+ + +

: + +

+ +

: + + + : + +

+

+ +

+
+
+ + +
+
+ + + +

: + +

+ +

: + + + : + +

+ +

+ +

+
+
+ + +
+
+ + +

: + +

+ +

: + + + : + + + : + +

+ +

+ +

+
+
+
+
+
@@ -41,6 +361,16 @@ + + + + + + - - -
+ +
+ > +
@@ -48,7 +378,7 @@
- - -
- > + @@ -32,26 +30,7 @@ - + @@ -79,7 +58,7 @@ @@ -100,7 +79,7 @@ @@ -112,32 +91,32 @@ if ((!empty($v_type)) && ( $value == $v_type )) echo ' selected'; echo ">".htmlentities($value).""; } - ?> + ?> @@ -183,7 +162,7 @@ @@ -208,8 +187,7 @@ - - diff --git a/web/templates/admin/add_dns.html b/web/templates/admin/add_dns.html index 564ca5fa..aeff5432 100644 --- a/web/templates/admin/add_dns.html +++ b/web/templates/admin/add_dns.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@ -
@@ -68,7 +47,7 @@
- +
- +
- +
- +
- +
- +
@@ -189,34 +177,4 @@
- - + \ No newline at end of file diff --git a/web/templates/admin/add_dns_rec.html b/web/templates/admin/add_dns_rec.html index 76964b4c..0ebc0552 100644 --- a/web/templates/admin/add_dns_rec.html +++ b/web/templates/admin/add_dns_rec.html @@ -12,9 +12,7 @@ } ?> - -
@@ -122,7 +120,6 @@ - - + diff --git a/web/templates/admin/add_firewall.html b/web/templates/admin/add_firewall.html index de3d6372..d1b81f58 100644 --- a/web/templates/admin/add_firewall.html +++ b/web/templates/admin/add_firewall.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@
- @@ -54,28 +42,28 @@
diff --git a/web/templates/admin/add_firewall_banlist.html b/web/templates/admin/add_firewall_banlist.html index ddea27db..e244cabd 100644 --- a/web/templates/admin/add_firewall_banlist.html +++ b/web/templates/admin/add_firewall_banlist.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@ -
- +
- +
@@ -54,25 +42,25 @@
diff --git a/web/templates/admin/add_ip.html b/web/templates/admin/add_ip.html index 82eb13ab..a62eebbd 100644 --- a/web/templates/admin/add_ip.html +++ b/web/templates/admin/add_ip.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@ -
- +
- () + ()
@@ -54,7 +42,7 @@
@@ -86,7 +74,7 @@ if ((!empty($v_interface)) && ( $value == $v_interface )) echo ' selected'; echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -131,7 +119,7 @@ diff --git a/web/templates/admin/add_mail.html b/web/templates/admin/add_mail.html index c736f586..057e8165 100644 --- a/web/templates/admin/add_mail.html +++ b/web/templates/admin/add_mail.html @@ -12,9 +12,7 @@ } ?> - -
@@ -81,4 +79,4 @@
- +
- () + ()
- \ No newline at end of file + diff --git a/web/templates/admin/add_mail_acc.html b/web/templates/admin/add_mail_acc.html index 2dd8c78d..70f2d5bc 100644 --- a/web/templates/admin/add_mail_acc.html +++ b/web/templates/admin/add_mail_acc.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,53 +30,6 @@
- @@ -182,44 +133,44 @@
- + - + - + - + - - + + - - + + - + - + - - + + - - + +
Username:: william.cage@
Password:: ******
IMAP hostname::
IMAP port:: 143
IMAP security:STARTTLS:
IMAP auth method:Normal password:
SMTP hostname
SMTP port:: 587
SMTP security:STARTTLS:
SMTP auth method:Normal password:
@@ -228,5 +179,4 @@
- - + \ No newline at end of file diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html index 16dbf529..e4e36a3a 100644 --- a/web/templates/admin/add_package.html +++ b/web/templates/admin/add_package.html @@ -12,9 +12,7 @@ } ?> - -
@@ -72,11 +70,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " . strtoupper($_SESSION['WEB_BACKEND']). "" ;?> @@ -94,15 +92,15 @@ if ((!empty($v_backend_template)) && ( $value == $_POST['v_backend_template'])){ echo 'selected' ; } - echo ">".$value."\n"; + echo ">".htmlentities($value)."\n"; } - ?> + ?> - + - + " .strtoupper($_SESSION['PROXY_SYSTEM']) . "" ;?> @@ -123,11 +121,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " .strtoupper($_SESSION['DNS_SYSTEM']) . "" ;?> @@ -147,7 +145,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -170,7 +168,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -302,13 +300,13 @@ + + > - + @@ -379,35 +377,4 @@ - - - + \ No newline at end of file diff --git a/web/templates/admin/add_user.html b/web/templates/admin/add_user.html index 7f978c65..e469a4dc 100644 --- a/web/templates/admin/add_user.html +++ b/web/templates/admin/add_user.html @@ -12,9 +12,7 @@ } ?> - - @@ -34,24 +32,6 @@
- @@ -112,7 +92,7 @@ } echo ">".htmlentities($key)."\n"; } - ?> + ?> @@ -188,4 +168,4 @@
- \ No newline at end of file + diff --git a/web/templates/admin/add_web.html b/web/templates/admin/add_web.html index 2a917029..3bebdd8a 100644 --- a/web/templates/admin/add_web.html +++ b/web/templates/admin/add_web.html @@ -12,9 +12,7 @@ } ?> - -
@@ -33,44 +31,6 @@
- @@ -102,14 +62,10 @@ - + - + @@ -429,14 +385,7 @@ - - - diff --git a/web/templates/admin/edit_backup_exclusions.html b/web/templates/admin/edit_backup_exclusions.html index 2a991c9b..6bb489ea 100644 --- a/web/templates/admin/edit_backup_exclusions.html +++ b/web/templates/admin/edit_backup_exclusions.html @@ -12,9 +12,7 @@ } ?> - -
@@ -55,16 +53,6 @@ - - - - - - - - - - - -
@@ -142,7 +98,7 @@
@@ -153,7 +109,7 @@ @@ -164,7 +120,7 @@
- +
/ @@ -242,7 +198,7 @@ } echo ">" . htmlentities(__($value)) . "\n"; } - ?> + ?>
- -
- -
@@ -85,16 +73,6 @@
- -
- -
@@ -120,4 +98,4 @@
- \ No newline at end of file + diff --git a/web/templates/admin/edit_cron.html b/web/templates/admin/edit_cron.html index 4a6d6036..ef54e9df 100644 --- a/web/templates/admin/edit_cron.html +++ b/web/templates/admin/edit_cron.html @@ -12,9 +12,7 @@ } ?> - -
@@ -29,6 +27,326 @@ $back = "location.href='".$back."'"; } ?> + +
+
+
    +
  • +
  • +
  • +
  • +
  • +
+
+
+ + + + +

: + +

+

+ +

+
+
+ + +
+
+ + + +

: + +

+ +

: + +

+ +

+ +

+
+
+ + +
+
+ + +

: + +

+ +

: + + + : + +

+

+ +

+
+
+ +
+
+ + + +

: + +

+ +

: + + : + +

+ +

+ +

+
+
+ + +
+
+ + +

: + +

+ +

: + + + : + + + : + +

+

+ +

+
+
+
+
+ +
@@ -47,6 +365,18 @@ + + + + + + + + - - - @@ -133,4 +131,4 @@
+ +
+ > +
@@ -54,7 +384,7 @@
- - -
- > + @@ -32,26 +30,6 @@ - @@ -146,8 +124,8 @@
- - diff --git a/web/templates/admin/edit_dns.html b/web/templates/admin/edit_dns.html index 780270c1..df8ef25e 100644 --- a/web/templates/admin/edit_dns.html +++ b/web/templates/admin/edit_dns.html @@ -12,9 +12,7 @@ } ?> - -
@@ -84,7 +82,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
- \ No newline at end of file + diff --git a/web/templates/admin/edit_dns_rec.html b/web/templates/admin/edit_dns_rec.html index 446fda6b..698cb657 100644 --- a/web/templates/admin/edit_dns_rec.html +++ b/web/templates/admin/edit_dns_rec.html @@ -12,9 +12,7 @@ } ?> - -
@@ -125,4 +123,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/edit_firewall.html b/web/templates/admin/edit_firewall.html index 60a13e16..79938265 100644 --- a/web/templates/admin/edit_firewall.html +++ b/web/templates/admin/edit_firewall.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@
- @@ -60,28 +48,28 @@
@@ -130,4 +118,4 @@
- +
- +
- \ No newline at end of file + diff --git a/web/templates/admin/edit_ip.html b/web/templates/admin/edit_ip.html index 4d013f00..c9ea2c72 100644 --- a/web/templates/admin/edit_ip.html +++ b/web/templates/admin/edit_ip.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,16 +30,6 @@
- @@ -60,7 +48,7 @@
@@ -70,7 +58,7 @@ @@ -80,7 +68,7 @@ @@ -153,4 +141,4 @@
- +
- +
- +
- \ No newline at end of file + diff --git a/web/templates/admin/edit_mail.html b/web/templates/admin/edit_mail.html index 7bcfa18a..141725c7 100644 --- a/web/templates/admin/edit_mail.html +++ b/web/templates/admin/edit_mail.html @@ -12,9 +12,7 @@ } ?> - -
@@ -97,4 +95,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/edit_mail_acc.html b/web/templates/admin/edit_mail_acc.html index c4ae0926..b3746db5 100644 --- a/web/templates/admin/edit_mail_acc.html +++ b/web/templates/admin/edit_mail_acc.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,26 +30,6 @@
- @@ -63,7 +41,7 @@ - +
@@ -162,5 +140,4 @@
- - + \ No newline at end of file diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html index bbdcba30..81a85651 100644 --- a/web/templates/admin/edit_package.html +++ b/web/templates/admin/edit_package.html @@ -12,9 +12,7 @@ } ?> - -
@@ -22,12 +20,7 @@
@@ -42,7 +35,7 @@ - + @@ -77,11 +70,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " .strtoupper($_SESSION['WEB_BACKEND']) . "";?> @@ -99,14 +92,14 @@ if ((!empty($v_backend_template)) && ( $value == $_POST['v_backend_template'])){ echo ' selected' ; } - echo ">".$value."\n"; + echo ">".htmlentities($value)."\n"; } - ?> + ?> - - + + " .strtoupper($_SESSION['PROXY_SYSTEM']) . "";?> @@ -126,11 +119,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " .strtoupper($_SESSION['DNS_SYSTEM']) . "";?> @@ -150,7 +143,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -305,13 +298,13 @@ + + @@ -366,7 +359,7 @@ > - + @@ -385,35 +378,4 @@
-
- - + \ No newline at end of file diff --git a/web/templates/admin/edit_server.html b/web/templates/admin/edit_server.html index 34c2d642..b2187218 100644 --- a/web/templates/admin/edit_server.html +++ b/web/templates/admin/edit_server.html @@ -12,9 +12,7 @@ } ?> - -
@@ -33,16 +31,7 @@
- + @@ -245,7 +234,7 @@
@@ -54,7 +43,7 @@ @@ -82,7 +71,7 @@ } echo ">".$value."\n"; } - ?> + ?>

@@ -106,7 +95,7 @@ } echo ">".$value."\n"; } - ?> + ?>

@@ -121,10 +110,10 @@ @@ -187,7 +176,7 @@
- +
- + @@ -133,10 +122,10 @@

- + @@ -145,10 +134,10 @@

- + @@ -159,7 +148,7 @@ @@ -169,7 +158,7 @@ - +
- +
- +
- +
- +
@@ -215,10 +204,10 @@ $i = 0; foreach ($dns_cluster as $key => $value) { $i++; - ?> + ?> @@ -227,7 +216,7 @@

- +
- +
- +
@@ -254,10 +243,10 @@

- + @@ -266,11 +255,11 @@

- - + + @@ -279,10 +268,10 @@

- + @@ -324,7 +313,7 @@ @@ -336,23 +325,23 @@ $value) { + foreach ($v_mysql_hosts as $value) { $i++; - ?> + ?> @@ -364,7 +353,7 @@ @@ -375,7 +364,7 @@ @@ -384,7 +373,7 @@



- + @@ -404,7 +393,7 @@ @@ -416,23 +405,23 @@ $value) { + foreach ($v_pgsql_hosts as $value) { $i++; - ?> + ?> @@ -443,7 +432,7 @@ @@ -452,7 +441,7 @@



- +
- +
- +
- +
- +
- +
- +
- +

- +
- +
- +
- +
- +
- +

- +
- +
@@ -470,7 +459,7 @@ @@ -484,7 +473,7 @@ @@ -505,7 +494,7 @@ @@ -524,7 +513,7 @@ - + @@ -296,7 +256,7 @@ } echo ">". htmlentities(__($value)) ."\n"; } - ?> + ?> @@ -430,7 +390,7 @@
- +
- +
- +
@@ -538,7 +527,7 @@ @@ -549,7 +538,7 @@ @@ -560,7 +549,7 @@ @@ -571,7 +560,7 @@ @@ -599,7 +588,7 @@
- +
- +
- +
- +
- +
@@ -638,7 +627,7 @@ @@ -651,7 +640,7 @@ @@ -690,7 +679,7 @@ '.__('Licence Key').':
'; } else { - echo + echo __('Restrict users so that they cannot use SSH and access only their home directory.').' '.__('This is a commercial module, you would need to purchace license key to enable it.'). '
'.__('Enter License Key').':
@@ -712,7 +701,7 @@
@@ -741,7 +730,7 @@ echo __('Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.').' '. __('This is a commercial module, you would need to purchace license key to enable it.'). '
- '.__('Enter Licence Key').':
+ '.__('Enter License Key').':
  • @@ -777,24 +766,4 @@
- +
- +
- +
- +
- - - \ No newline at end of file + \ No newline at end of file diff --git a/web/templates/admin/edit_user.html b/web/templates/admin/edit_user.html index 8717ce3f..8009d5b0 100644 --- a/web/templates/admin/edit_user.html +++ b/web/templates/admin/edit_user.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,18 +30,7 @@
- + @@ -130,7 +117,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -171,7 +158,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -263,34 +250,4 @@
@@ -106,7 +93,7 @@ } echo ">".htmlentities($key)."\n"; } - ?> + ?>
- - \ No newline at end of file + \ No newline at end of file diff --git a/web/templates/admin/edit_web.html b/web/templates/admin/edit_web.html index 51822ec7..c81bef58 100644 --- a/web/templates/admin/edit_web.html +++ b/web/templates/admin/edit_web.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,40 +30,7 @@
- - + - - + + @@ -217,7 +177,7 @@
@@ -100,15 +65,10 @@ @@ -141,11 +101,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
" . strtoupper($_SESSION['WEB_BACKEND']) . "";?> @@ -164,14 +124,14 @@ if ((empty($v_backend_template)) && ($value == 'default')){ echo ' selected' ; } - echo ">".$value."\n"; + echo ">".htmlentities($value)."\n"; } - ?> + ?>
@@ -200,7 +160,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
/ @@ -247,7 +207,7 @@
- +
- +
# () @@ -485,16 +445,6 @@
- - - + diff --git a/web/templates/admin/generate_ssl.html b/web/templates/admin/generate_ssl.html index a5c9a558..a9e490bb 100644 --- a/web/templates/admin/generate_ssl.html +++ b/web/templates/admin/generate_ssl.html @@ -12,9 +12,7 @@ } ?> - -
@@ -125,4 +123,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/list_backup.html b/web/templates/admin/list_backup.html index 7fd90839..0dcac926 100644 --- a/web/templates/admin/list_backup.html +++ b/web/templates/admin/list_backup.html @@ -32,11 +32,7 @@ - - - - @@ -100,7 +96,7 @@
-
+
diff --git a/web/templates/admin/list_backup_detail.html b/web/templates/admin/list_backup_detail.html index c5429239..abdb28d0 100644 --- a/web/templates/admin/list_backup_detail.html +++ b/web/templates/admin/list_backup_detail.html @@ -12,15 +12,15 @@ - + -
+
- @@ -30,11 +30,7 @@
-
- - - @@ -52,6 +48,7 @@ $web = explode(',',$data[$backup]['WEB']); foreach ($web as $key) { if (!empty($key)) { + ++$i; ?>
@@ -335,7 +332,6 @@ -
@@ -393,7 +389,7 @@ ?>
- back +
diff --git a/web/templates/admin/list_backup_exclusions.html b/web/templates/admin/list_backup_exclusions.html index 8671a5e4..28d07574 100644 --- a/web/templates/admin/list_backup_exclusions.html +++ b/web/templates/admin/list_backup_exclusions.html @@ -29,11 +29,7 @@
- - - - @@ -49,8 +45,6 @@
-
@@ -73,10 +67,6 @@
- -
@@ -117,7 +107,7 @@
- back +
diff --git a/web/templates/admin/list_cron.html b/web/templates/admin/list_cron.html index f9ec0581..4ec2de21 100644 --- a/web/templates/admin/list_cron.html +++ b/web/templates/admin/list_cron.html @@ -51,11 +51,7 @@
-
- - -
@@ -79,8 +75,8 @@ } ?> -
@@ -124,7 +120,7 @@ sort-star="
-
+
diff --git a/web/templates/admin/list_db.html b/web/templates/admin/list_db.html index 7fc51d7e..63fdcae1 100644 --- a/web/templates/admin/list_db.html +++ b/web/templates/admin/list_db.html @@ -72,11 +72,7 @@
-
- - -
@@ -109,8 +105,8 @@ ?> -
@@ -152,7 +148,7 @@ sort-user="" sort-server="" so
-
+
diff --git a/web/templates/admin/list_dns.html b/web/templates/admin/list_dns.html index 78ae5111..649e3073 100644 --- a/web/templates/admin/list_dns.html +++ b/web/templates/admin/list_dns.html @@ -42,11 +42,7 @@
-
- - -
@@ -69,8 +65,8 @@ } ?> -
@@ -114,7 +110,7 @@ sort-expire="" sort-records="
-
+
diff --git a/web/templates/admin/list_dns_rec.html b/web/templates/admin/list_dns_rec.html index 69f15a5f..f43cad2a 100644 --- a/web/templates/admin/list_dns_rec.html +++ b/web/templates/admin/list_dns_rec.html @@ -32,11 +32,7 @@
-
- - -
@@ -98,8 +94,8 @@ v_unit_id="" v_section="dns_rec">
-
-
+
+
@@ -139,7 +135,7 @@ v_unit_id="" v_section="dns_rec"> ?>
- back +
diff --git a/web/templates/admin/list_firewall.html b/web/templates/admin/list_firewall.html index f6da8b78..8f00ed11 100644 --- a/web/templates/admin/list_firewall.html +++ b/web/templates/admin/list_firewall.html @@ -45,11 +45,7 @@ - - - - @@ -72,8 +68,8 @@ } ?> -
@@ -87,7 +83,7 @@ sort-ip="" sort-comment=" shortcut-s" key-action="js"> - + @@ -97,9 +93,9 @@ sort-ip="" sort-comment=" - +  Del @@ -113,7 +109,7 @@ sort-ip="" sort-comment="
-
+
@@ -121,11 +117,11 @@ sort-ip="" sort-comment="
-
-
+
+
-
-
+
+
diff --git a/web/templates/admin/list_firewall_banlist.html b/web/templates/admin/list_firewall_banlist.html index 6bf83cab..cac651a1 100644 --- a/web/templates/admin/list_firewall_banlist.html +++ b/web/templates/admin/list_firewall_banlist.html @@ -30,11 +30,7 @@
-
- - -
@@ -47,12 +43,13 @@ foreach ($data as $key => $value) { ++$i; list($ip,$chain) = explode(":",$key); + ?> diff --git a/web/templates/admin/list_ip.html b/web/templates/admin/list_ip.html index 3906a46f..3d4c78fc 100644 --- a/web/templates/admin/list_ip.html +++ b/web/templates/admin/list_ip.html @@ -42,11 +42,7 @@
- - - - @@ -60,10 +56,10 @@ ++$i; ?> - @@ -78,7 +74,7 @@ } else { $status = 'active'; $spnd_action = 'suspend' ; - $spnd_confirmation = 'SUSPEND_DOMAIN_CONFIRMATION' ; + $spnd_confirmation = 'UNSUSPEND_DOMAIN_CONFIRMATION' ; } if (empty($data[$key]['CATCHALL'])) { $data[$key]['CATCHALL'] = '/dev/null'; @@ -86,8 +82,8 @@ ?> -
">
@@ -133,7 +129,7 @@ sort-accounts="" sort-star="
-
+
diff --git a/web/templates/admin/list_mail_acc.html b/web/templates/admin/list_mail_acc.html index 10babc2c..b506f9db 100644 --- a/web/templates/admin/list_mail_acc.html +++ b/web/templates/admin/list_mail_acc.html @@ -36,7 +36,7 @@
- @@ -49,11 +49,7 @@
-
- - -
@@ -83,7 +79,7 @@
diff --git a/web/templates/admin/list_packages.html b/web/templates/admin/list_packages.html index 4428f1da..8980b3c8 100644 --- a/web/templates/admin/list_packages.html +++ b/web/templates/admin/list_packages.html @@ -37,11 +37,7 @@ - - - - @@ -56,8 +52,8 @@ ?> -
@@ -90,7 +86,7 @@ sort-star="
-
+
@@ -110,7 +106,7 @@ sort-star="
:
- +
@@ -126,7 +122,7 @@ sort-star="
:
- +
@@ -138,7 +134,7 @@ sort-star="
:
- +
@@ -155,7 +151,12 @@ sort-star="
:
+ + + + +
@@ -166,7 +167,7 @@ sort-star="
:
- +
@@ -182,7 +183,12 @@ sort-star="
:
+ + + + +
@@ -193,7 +199,7 @@ sort-star="
:
- +
diff --git a/web/templates/admin/list_rrd.html b/web/templates/admin/list_rrd.html index 756193fb..9245ada4 100644 --- a/web/templates/admin/list_rrd.html +++ b/web/templates/admin/list_rrd.html @@ -41,11 +41,7 @@ - - - - @@ -115,4 +111,4 @@
- \ No newline at end of file + diff --git a/web/templates/admin/list_search.html b/web/templates/admin/list_search.html index daff2376..a9e28944 100644 --- a/web/templates/admin/list_search.html +++ b/web/templates/admin/list_search.html @@ -23,9 +23,6 @@ - - - @@ -39,28 +36,28 @@ $value) { ++$i; - if ($data[$key]['SUSPENDED'] == 'yes') { + if ($value['SUSPENDED'] == 'yes') { $status = 'suspended'; - $spnd_action = 'unsuspend' ; + $spnd_action = 'unsuspend'; } else { $status = 'active'; $spnd_action = 'suspend'; } - if ($data[$key]['TYPE'] == 'db') { + if ($value['TYPE'] == 'db') { $object = 'database'; } else { - $object = strtolower($data[$key]['TYPE']." ".$data[$key]['KEY']); + $object = strtolower($value['TYPE'] . ' ' . $value['KEY']); } - $uniq_id = $data[$key]['TYPE'].'-'; - if($data[$key]['KEY'] == 'ACCOUNT'){ + $uniq_id = $value['TYPE'] . '-'; + if ($value['KEY'] == 'ACCOUNT'){ $uniq_id .= 'acc-'; } - $uniq_id .= sha1($data[$key]['RESULT']); + $uniq_id .= sha1($value['RESULT']); ?> -
+
- +
@@ -219,14 +196,14 @@
-
+
:
- +
@@ -270,4 +247,4 @@
-
\ No newline at end of file +
diff --git a/web/templates/admin/list_server_info.html b/web/templates/admin/list_server_info.html index 94d5e833..53dc2185 100644 --- a/web/templates/admin/list_server_info.html +++ b/web/templates/admin/list_server_info.html @@ -3,7 +3,7 @@ - Vesta - <?=__($TAB)?> + Vesta - <?=__($TAB)?> @@ -41,4 +41,4 @@
.
-
\ No newline at end of file
+  
diff --git a/web/templates/admin/list_services.html b/web/templates/admin/list_services.html
index aad7961a..189d7d90 100644
--- a/web/templates/admin/list_services.html
+++ b/web/templates/admin/list_services.html
@@ -36,9 +36,6 @@
           
         
- - - @@ -65,7 +62,7 @@
-
+
@@ -91,7 +88,7 @@
-
:
+
:
diff --git a/web/templates/admin/list_ssl.html b/web/templates/admin/list_ssl.html index aa2addf9..41541904 100644 --- a/web/templates/admin/list_ssl.html +++ b/web/templates/admin/list_ssl.html @@ -12,9 +12,7 @@ } ?> - -
@@ -84,4 +82,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/list_stats.html b/web/templates/admin/list_stats.html index c5a8ad23..bc3192d2 100644 --- a/web/templates/admin/list_stats.html +++ b/web/templates/admin/list_stats.html @@ -37,11 +37,7 @@ - - - - @@ -74,9 +70,6 @@
-
- -
@@ -85,7 +78,6 @@
-
@@ -269,4 +261,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/list_updates.html b/web/templates/admin/list_updates.html index 86e3c96c..1a8fd667 100644 --- a/web/templates/admin/list_updates.html +++ b/web/templates/admin/list_updates.html @@ -35,11 +35,7 @@
- - - - @@ -54,10 +50,10 @@ if ($data[$key]['UPDATED'] == 'yes') { $status = 'active'; - $upd_status = __('updated'); + $upd_status = 'updated'; } else { $status = 'suspended'; - $upd_status = __('outdated'); + $upd_status = 'outdated'; } ?> diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html index d84afb4d..d52d80986 100644 --- a/web/templates/admin/list_user.html +++ b/web/templates/admin/list_user.html @@ -54,11 +54,7 @@ - - - - @@ -81,8 +77,8 @@ } ?> -
@@ -95,30 +91,10 @@ sort-bandwidth="" sort-disk=" -
 L
- - -
-

-
- +
 L
+
 L
 ↵
@@ -153,12 +129,10 @@ sort-bandwidth="" sort-disk="
-
- +
-
diff --git a/web/templates/admin/list_web.html b/web/templates/admin/list_web.html index 9415aa2e..8f2e82f1 100644 --- a/web/templates/admin/list_web.html +++ b/web/templates/admin/list_web.html @@ -38,16 +38,13 @@
-
+ - - -
@@ -120,9 +117,9 @@ } ?> -
@@ -169,7 +166,7 @@ sort-name="" sort-bandwidth="" sort-dis
-
+
@@ -181,7 +178,7 @@ sort-name="" sort-bandwidth="" sort-dis
- .', $data[$key]['IP'])?> +
@@ -205,12 +202,12 @@ sort-name="" sort-bandwidth="" sort-dis
:
- +
- +
@@ -222,7 +219,7 @@ sort-name="" sort-bandwidth="" sort-dis
- +
@@ -251,7 +248,7 @@ sort-name="" sort-bandwidth="" sort-dis - +
:
@@ -259,7 +256,7 @@ sort-name="" sort-bandwidth="" sort-dis
- +
:
diff --git a/web/templates/admin/panel.html b/web/templates/admin/panel.html index c26e050c..fd5d145e 100644 --- a/web/templates/admin/panel.html +++ b/web/templates/admin/panel.html @@ -23,7 +23,7 @@
- ">  + "> 
diff --git a/web/templates/file_manager/main.php b/web/templates/file_manager/main.php index c41355e9..e3427bb7 100644 --- a/web/templates/file_manager/main.php +++ b/web/templates/file_manager/main.php @@ -12,6 +12,7 @@ + @@ -87,6 +88,7 @@
  • F7
  • d
  • F2 / Shift+F6
  • +
  • m
  • F5
  • a
  • F8 / Del
  • @@ -103,6 +105,7 @@
  • Home
  • End
  • Enter
  • +
  • F4
  • Backspace
  • Insert / Space
  • Shift + click
  • @@ -123,15 +126,17 @@ - - - - + + + + + + diff --git a/web/templates/file_manager/tab_menu.php b/web/templates/file_manager/tab_menu.php index d6819663..9953c230 100644 --- a/web/templates/file_manager/tab_menu.php +++ b/web/templates/file_manager/tab_menu.php @@ -12,8 +12,12 @@
    +
    +
    +
    +
    diff --git a/web/templates/footer.html b/web/templates/footer.html index 4e25e91e..ca48e4b7 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -1,613 +1,39 @@ -
    - - - - - - -
    -
    @@ -112,4 +110,4 @@ - \ No newline at end of file + diff --git a/web/templates/user/edit_user.html b/web/templates/user/edit_user.html index 66600bd9..7c84eb98 100644 --- a/web/templates/user/edit_user.html +++ b/web/templates/user/edit_user.html @@ -12,9 +12,7 @@ } ?> - -
    @@ -32,18 +30,7 @@
    - + @@ -231,34 +218,4 @@
    @@ -109,7 +96,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
    - - + \ No newline at end of file diff --git a/web/templates/user/edit_web.html b/web/templates/user/edit_web.html index 878e9140..b9e14acf 100644 --- a/web/templates/user/edit_web.html +++ b/web/templates/user/edit_web.html @@ -12,9 +12,7 @@ } ?> - -
    @@ -32,40 +30,7 @@
    - - +
    @@ -124,7 +89,7 @@
    @@ -146,7 +111,7 @@
    - + / @@ -176,7 +141,7 @@ - + @@ -225,7 +190,7 @@ } echo ">". htmlentities(__($value)) ."\n"; } - ?> + ?> @@ -359,7 +324,7 @@ - - + diff --git a/web/templates/user/list_cron.html b/web/templates/user/list_cron.html index e3a73e22..568d045c 100644 --- a/web/templates/user/list_cron.html +++ b/web/templates/user/list_cron.html @@ -49,11 +49,7 @@ - - - - @@ -78,7 +74,7 @@ ?> -
    @@ -111,7 +107,7 @@ sort-date="" sort-nam
    -
    +
    diff --git a/web/templates/user/list_db.html b/web/templates/user/list_db.html index c03e83b2..f4e13f29 100644 --- a/web/templates/user/list_db.html +++ b/web/templates/user/list_db.html @@ -71,11 +71,7 @@
    -
    - - -
    @@ -108,8 +104,8 @@ ?> -
    @@ -141,7 +137,7 @@ sort-user="" sort-server="" so
    -
    +
    diff --git a/web/templates/user/list_dns.html b/web/templates/user/list_dns.html index 616313ab..22dcbc55 100644 --- a/web/templates/user/list_dns.html +++ b/web/templates/user/list_dns.html @@ -41,11 +41,7 @@
    -
    - - -
    @@ -68,8 +64,8 @@ } ?> -
    @@ -103,7 +99,7 @@ sort-expire="" sort-records="
    -
    +
    diff --git a/web/templates/user/list_dns_rec.html b/web/templates/user/list_dns_rec.html index ad23266e..ec3f2936 100644 --- a/web/templates/user/list_dns_rec.html +++ b/web/templates/user/list_dns_rec.html @@ -30,11 +30,7 @@
    -
    - - - @@ -96,8 +92,8 @@
    -
    -
    +
    +
    @@ -136,7 +132,7 @@ ?>
    diff --git a/web/templates/user/list_mail.html b/web/templates/user/list_mail.html index 9eac082b..2d3dd836 100644 --- a/web/templates/user/list_mail.html +++ b/web/templates/user/list_mail.html @@ -48,11 +48,7 @@ - - - - @@ -84,8 +80,8 @@ ?> -
    @@ -121,7 +117,7 @@ sort-accounts="" sort-star="
    -
    +
    diff --git a/web/templates/user/list_mail_acc.html b/web/templates/user/list_mail_acc.html index 5d1956d9..f7678779 100644 --- a/web/templates/user/list_mail_acc.html +++ b/web/templates/user/list_mail_acc.html @@ -36,7 +36,7 @@
    - @@ -47,11 +47,7 @@
    -
    - - -
    @@ -81,8 +77,8 @@ ?> -
    " v_unit_id="" v_section="mail_acc" -sort-date="" sort-name="" sort-disk="" +
    " v_unit_id="" v_section="mail_acc" +sort-date="" sort-name="" sort-disk="" sort-star="">
    @@ -114,7 +110,7 @@ sort-star="
    -
    +
    @@ -204,7 +200,7 @@ sort-star="
    - back +
    diff --git a/web/templates/user/list_search.html b/web/templates/user/list_search.html index 5545f205..d8c677fe 100644 --- a/web/templates/user/list_search.html +++ b/web/templates/user/list_search.html @@ -23,9 +23,6 @@ - - - @@ -39,27 +36,27 @@ $value) { ++$i; - if ($data[$key]['SUSPENDED'] == 'yes') { + if ($value['SUSPENDED'] == 'yes') { $status = 'suspended'; $spnd_action = 'unsuspend' ; } else { $status = 'active'; $spnd_action = 'suspend'; } - if ($data[$key]['TYPE'] == 'db') { + if ($value['TYPE'] == 'db') { $object = 'database'; } else { - $object = strtolower($data[$key]['TYPE']." ".$data[$key]['KEY']); + $object = strtolower($value['TYPE']." ".$value['KEY']); } - $uniq_id = $data[$key]['TYPE'].'-'; - if($data[$key]['KEY'] == 'ACCOUNT'){ + $uniq_id = $value['TYPE'].'-'; + if($value['KEY'] == 'ACCOUNT'){ $uniq_id .= 'acc-'; } - $uniq_id .= sha1($data[$key]['RESULT']); + $uniq_id .= sha1($value['RESULT']); ?> -
    +
    -
    - +
    +
    -
    +
    -
    - +
    +
    @@ -184,14 +161,14 @@
    -
    +
    :
    - +
    @@ -235,4 +212,4 @@
    -
    \ No newline at end of file +
    diff --git a/web/templates/user/list_stats.html b/web/templates/user/list_stats.html index dc9419b4..aa70d794 100644 --- a/web/templates/user/list_stats.html +++ b/web/templates/user/list_stats.html @@ -37,11 +37,7 @@
    -
    - - - @@ -268,4 +264,4 @@ - \ No newline at end of file + diff --git a/web/templates/user/list_user.html b/web/templates/user/list_user.html index 0242ac83..3087bc65 100644 --- a/web/templates/user/list_user.html +++ b/web/templates/user/list_user.html @@ -52,11 +52,7 @@ - - - - @@ -79,8 +75,8 @@ } ?> -
    @@ -93,30 +89,10 @@ sort-disk="" sort-star=" -
     L
    - - -
    -

    -
    - +
     L
    +
     L
     ↵
    @@ -141,7 +117,7 @@ sort-disk="" sort-star="
    -
    +
    diff --git a/web/templates/user/list_web.html b/web/templates/user/list_web.html index eb78d638..fc5de903 100644 --- a/web/templates/user/list_web.html +++ b/web/templates/user/list_web.html @@ -36,18 +36,13 @@
    -
    - + - - - -
    @@ -122,8 +117,8 @@ -
    @@ -161,7 +156,7 @@ sort-bandwidth="" sort-disk="">
    -
    +
    @@ -197,7 +192,7 @@ sort-bandwidth="" sort-disk="
    :
    - +
    diff --git a/web/upload/UploadHandler.php b/web/upload/UploadHandler.php index 7db8bc41..cc575156 100755 --- a/web/upload/UploadHandler.php +++ b/web/upload/UploadHandler.php @@ -1078,7 +1078,6 @@ class UploadHandler protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, $index = null, $content_range = null) { - $file = new \stdClass(); $file->name = $this->get_file_name($uploaded_file, $name, $size, $type, $error, $index, $content_range); @@ -1103,7 +1102,7 @@ class UploadHandler ); } else { chmod($uploaded_file, 0644); - //move_uploaded_file($uploaded_file, $file_path); +// move_uploaded_file($uploaded_file, $file_path); exec (VESTA_CMD . "v-copy-fs-file ". USERNAME ." {$uploaded_file} {$file_path}", $output, $return_var); $error = check_return_code($return_var, $output); @@ -1111,11 +1110,11 @@ class UploadHandler //var_dump(VESTA_CMD . "v-copy-fs-file {$user} {$fn} {$path}"); //var_dump($path); //var_dump($output); - $file->error = 'Error while saving file'; - /*var_dump(VESTA_CMD . "v-copy-fs-file ". USERNAME ." {$uploaded_file} {$file_path}"); - var_dump($return_var); - var_dump($output); - die();*/ + $file->error = 'Error while saving file '; +// var_dump(VESTA_CMD . "v-copy-fs-file ". USERNAME ." {$uploaded_file} {$file_path}"); +// var_dump($return_var); +// var_dump($output); +// exit(); } } } else {