Merge remote-tracking branch 'refs/remotes/serghey-rodin/master'

This commit is contained in:
nguyenngocphuongnb 2015-11-08 00:52:16 +07:00
commit c58a200780
184 changed files with 1692 additions and 821 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*.tar
*.zip
*.gzip

67
bin/v-activate-vesta-license Executable file
View file

@ -0,0 +1,67 @@
#!/bin/bash
# info: activate vesta license
# options: MODULE LICENSE
#
# The function activates and register vesta license
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument defenition
module=$(echo $1 | tr '[:lower:]' '[:upper:]')
license=$2
# Importing system enviroment
source /etc/profile
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
# Checking arg number
check_args '2' "$#" 'MODULE LICENSE'
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Activating license
v_host='https://vestacp.com/checkout'
answer=$(curl -s $v_host/activate.php?licence_key=$license&module=$module)
check_result $? "cant' connect to vestacp.com " $E_CONNECT
# Checking server answer
if [[ "$answer" != '0' ]]; then
echo "Error: $module license $license is invalid"
exit $E_INVALID
fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# Updating vesta.conf
if [ -z "$(grep "${module}_KEY" $VESTA/conf/vesta.conf)" ]; then
echo "${module}_KEY='$license'" >> $VESTA/conf/vesta.conf
else
sed -i "s/${module}_KEY=.*/${module}_KEY='$license'/g" $VESTA/conf/vesta.conf
fi
# Activating sftpjail
if [ "$module" = 'SFTPJAIL' ]; then
setsid $BIN/v-add-sys-sftp-jail 2>/dev/null
fi
# Logging
log_event "$OK" "$EVENT"
exit

View file

@ -1,22 +1,16 @@
#!/bin/bash #!/bin/bash
# info: archive directory # info: archive directory
# options: USER ARCHIVE DIRECTORY [DIRECTORY_N] # options: USER ARCHIVE SOURCE
# #
# The function creates tar archive # The function creates tar archive
user=$1 user=$1
archive=$2 archive=$2
src1=$3 src=$3
src2=$4
src3=$5
src4=$6
src5=$7
src6=$8
src7=$9
# Checking arguments # Checking arguments
if [ -z "$src1" ]; then if [ -z "$src" ]; then
echo "Usage: USER ARCHIVE DIRECTORY [DIRECTORY_N]" echo "Usage: USER ARCHIVE SOURCE"
exit 1 exit 1
fi fi
@ -40,19 +34,22 @@ if [ -e "$archive.tar.gz" ]; then
fi fi
# Checking source path # Checking source path
for src_path in $src1 $src2 $src3 $src4 $src5 $src6 $src7; do rpath=$(readlink -f "$src")
rpath=$(readlink -f "$src_path") if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then echo "Error: invalid source path $src"
echo "Error: invalid source path $src_path"
exit 1 exit 1
fi fi
done
# Parsing current directory
d=$(dirname "$src")
# Removing leading file path
f=$(echo "$src" |sed -e "s|$d/||")
# Creating tar.gz archive # Creating tar.gz archive
sudo -u $user tar -czf "$archive.tar.gz" \ sudo -u $user tar -czf "$archive.tar.gz" -C $d $f >/dev/null 2>&1
$src1 $src2 $src3 $src4 $src5 $src6 $src7 > /dev/null 2>&1
if [ "$?" -ne 0 ]; then if [ "$?" -ne 0 ]; then
# echo "Error: archive $archive.tar.gz was not created" echo "Error: archive $archive.tar.gz was not created"
exit 3 exit 3
fi fi

View file

@ -44,7 +44,7 @@ remote_dns_health_check
str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf 2>/dev/null) str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf 2>/dev/null)
if [ -z "$str" ]; then if [ -z "$str" ]; then
pipe="$VESTA/data/queue/dns-cluster.pipe" pipe="$VESTA/data/queue/dns-cluster.pipe"
queue_str=$(grep -n "$SCRIPT $1 $2 no$" $pipe |cut -f1 -d: |head -n1) queue_str=$(grep -n "$SCRIPT $1 $2 " $pipe |cut -f1 -d: |head -n1)
if [ ! -z "$queue_str" ]; then if [ ! -z "$queue_str" ]; then
sed -i "$queue_str d" $pipe sed -i "$queue_str d" $pipe
fi fi

57
bin/v-add-sys-firewall Executable file
View file

@ -0,0 +1,57 @@
#!/bin/bash
# info: add system firewall
# opions: NONE
#
# The script enables firewall
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
if [ "$FIREWALL_SYSTEM" = 'iptables' ]; then
exit
fi
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Adding firewall directory
mkdir -p $VESTA/data/firewall/
# Adding default ruleset
if [ ! -e "$VESTA/data/firewall/rules.conf" ]; then
cp $VESTA/install/rhel/7/* $VESTA/data/firewall/
fi
# Updating FIREWAL_SYSTEM value
if [ -z "$(grep FIREWALL_SYSTEM $VESTA/conf/vesta.conf)" ]; then
echo "FIREWALL_SYSTEM='iptables'" >> $VESTA/conf/vesta.conf
else
sed -i "s/FIREWALL_SYSTEM.*/FIREWALL_SYSTEM='iptables'/g" \
$VESTA/conf/vesta.conf
fi
# Updating firewall rules
$BIN/v-update-firewall
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# Logging
log_event "$OK" "$EVENT"
exit

View file

@ -75,6 +75,9 @@ if [ ! -z "$WEB_BACKEND" ]; then
fi fi
get_domain_backend_values get_domain_backend_values
backend=$(get_user_value '$BACKEND_TEMPLATE') backend=$(get_user_value '$BACKEND_TEMPLATE')
if [ -z "$backend" ]; then
backend='default'
fi
fi fi
# Defining variables for add_config function # Defining variables for add_config function

View file

@ -13,7 +13,7 @@
user=$1 user=$1
domain=$2 domain=$2
domain_idn=$(idn -t --quiet -a "$domain") domain_idn=$(idn -t --quiet -a "$domain")
template=$3 template=${3-default}
# Includes # Includes
source $VESTA/func/main.sh source $VESTA/func/main.sh

View file

@ -22,6 +22,8 @@ source $VESTA/conf/vesta.conf
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
$BIN/v-check-vesta-license >/dev/null
if [ -z "$BACKUP_SYSTEM" ]; then if [ -z "$BACKUP_SYSTEM" ]; then
exit exit
fi fi

View file

@ -5,10 +5,10 @@
# The function opens/reads files on the file system # The function opens/reads files on the file system
user=$1 user=$1
src_file=$2 src=$2
# Checking arguments # Checking arguments
if [ -z "$src_file" ]; then if [ -z "$src" ]; then
echo "Usage: USER FILE" echo "Usage: USER FILE"
exit 1 exit 1
fi fi
@ -27,27 +27,19 @@ if [ -z $homedir ]; then
fi fi
# Checking path # Checking path
if [ ! -z "$src_file" ]; then if [ ! -z "$src" ]; then
rpath=$(readlink -f "$src_file") rpath=$(readlink -f "$src")
if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
echo "Error: invalid source path $src_file" echo "Error: invalid source path $user $src"
exit 2 exit 2
fi fi
fi fi
# Reading file
#sudo -u $user cat "$src_file" 2>/dev/null
#if [ $? -ne 0 ]; then
# echo "Error: file $src_file was not opened"
# exit 3
#fi
# Checking if file has readable permission # Checking if file has readable permission
if [[ ! -r $src_file ]] sudo -u $user ls "$src" > /dev/null 2>&1
then if [ $? -ne 0 ]; then
# echo "File is readable" echo "Error: can't read $src"
#else exit 1
echo "Cannot read file"
fi fi
# Exiting # Exiting

63
bin/v-check-vesta-license Executable file
View file

@ -0,0 +1,63 @@
#!/bin/bash
# info: check vesta license
# options: [MODULE]
#
# The function activates and register vesta license
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument defenition
module=$(echo $1 | tr '[:lower:]' '[:upper:]')
# Importing system enviroment
source /etc/profile
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Checking module
if [ -z "$module" ]; then
modules=$(grep _KEY= $VESTA/conf/vesta.conf)
else
modules=$(grep "${module}_KEY" $VESTA/conf/vesta.conf)
fi
IFS=$'\n'
for str in $modules; do
module=$(echo "$str" |cut -f 1 -d _)
license=$(echo "$str" |cut -f 2 -d \')
if [ ! -z "$license" ]; then
v_host='https://vestacp.com/checkout'
answer=$(curl -s "$v_host/check.php?licence_key=$license&module=$module")
check_result $? "cant' connect to vestacp.com " 0
echo "$module $license $answer"
if [[ "$answer" != '0' ]]; then
if [ "$module" = 'SFTPJAIL' ]; then
setsid $BIN/v-delete-sys-sftp-jail 2>/dev/null
fi
sed -i "s/${module}_KEY=.*/${module}_KEY=''/g" \
$VESTA/conf/vesta.conf
fi
fi
done
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

65
bin/v-deactivate-vesta-license Executable file
View file

@ -0,0 +1,65 @@
#!/bin/bash
# info: deactivate vesta license
# options: MODULE LICENSE
#
# The function activates and register vesta license
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument defenition
module=$(echo $1 | tr '[:lower:]' '[:upper:]')
license=$2
# Importing system enviroment
source /etc/profile
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
# Checking arg number
check_args '2' "$#" 'MODULE LICENSE'
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Activating license
v_host='https://vestacp.com/checkout'
answer=$(curl -s $v_host/cancel.php?licence_key=$license)
check_result $? "cant' connect to vestacp.com " $E_CONNECT
# Checking server answer
if [[ "$answer" != '0' ]]; then
echo "Error: $module license $license is invalid"
exit $E_INVALID
fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# Updating vesta.conf
if [ ! -z "$(grep "${module}_KEY" $VESTA/conf/vesta.conf)" ]; then
sed -i "s/${module}_KEY=.*/${module}_KEY=''/g" $VESTA/conf/vesta.conf
fi
# Deactivating sftpjail
if [ "$module" = 'SFTPJAIL' ]; then
setsid $BIN/v-delete-sys-sftp-jail 2>/dev/null
fi
# Logging
log_event "$OK" "$EVENT"
exit

View file

@ -45,7 +45,8 @@ if [ -z "$check_ip" ]; then
fi fi
# Deleting ip from banlist # Deleting ip from banlist
sed -i "/IP='$ip' CHAIN='$chain'/d" $conf sip=$(echo "$ip"| sed "s|/|\\\/|g")
sed -i "/IP='$sip' CHAIN='$chain'/d" $conf
b=$($iptables -L fail2ban-$chain --line-number -n|grep $ip|awk '{print $1}') b=$($iptables -L fail2ban-$chain --line-number -n|grep $ip|awk '{print $1}')
$iptables -D fail2ban-$chain $b 2>/dev/null $iptables -D fail2ban-$chain $b 2>/dev/null

View file

@ -55,7 +55,7 @@ for cluster in $(cat $VESTA/conf/dns-cluster.conf); do
# Sync domain # Sync domain
cluster_cmd v-delete-dns-record $DNS_USER $domain $id 'no' cluster_cmd v-delete-dns-record $DNS_USER $domain $id 'no'
check_result $? "$HOST connection failed (rebuild)" $E_CONNECT #check_result $? "$HOST connection failed (delete)" $E_CONNECT
# Rebuilding dns zone # Rebuilding dns zone
cluster_cmd v-rebuild-dns-domain $DNS_USER $domain 'yes' 'no' cluster_cmd v-rebuild-dns-domain $DNS_USER $domain 'yes' 'no'

48
bin/v-delete-sys-firewall Executable file
View file

@ -0,0 +1,48 @@
#!/bin/bash
# info: delete system firewall
# opions: NONE
#
# The script disables firewall support
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
if [ -z "$FIREWALL_SYSTEM" ]; then
exit
fi
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Stopping firewall
$BIN/v-stop-firewall
# Updating FIREWALL_SYSTEM value
if [ -z "$(grep FIREWALL_SYSTEM $VESTA/conf/vesta.conf)" ]; then
echo "FIREWALL_SYSTEM=''" >> $VESTA/conf/vesta.conf
else
sed -i "s/FIREWALL_SYSTEM=.*/FIREWALL_SYSTEM=''/g" $VESTA/conf/vesta.conf
fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# Logging
log_event "$OK" "$EVENT"
exit

View file

@ -22,9 +22,9 @@ source $VESTA/conf/vesta.conf
# Verifications # # Verifications #
#----------------------------------------------------------# #----------------------------------------------------------#
if [ -z "$SFTPJAIL_KEY" ]; then #if [ -z "$SFTPJAIL_KEY" ]; then
exit # exit
fi #fi
#----------------------------------------------------------# #----------------------------------------------------------#

View file

@ -34,7 +34,7 @@ if [ -z "$(echo $rpath |grep $homedir)" ]; then
fi fi
# Listing file type # Listing file type
sudo -u $user file -i -b $path 2>/dev/null sudo -u $user file -i -b "$path" 2>/dev/null
# Exiting # Exiting
exit $? exit $?

View file

@ -40,7 +40,6 @@ fi
# Listing directory # Listing directory
sudo -u $user find "$path" -maxdepth 1 \ sudo -u $user find "$path" -maxdepth 1 \
-printf "%y|%m|%TY-%Tm-%Td|%TH:%TM|%u|%g|%s|%P\n" 2>/dev/null -printf "%y|%m|%TY-%Tm-%Td|%TH:%TM|%u|%g|%s|%P\n" 2>/dev/null
# -printf "%y|%m|%TY-%Tm-%Td|%TH:%TM:%TS|%u|%g|%s|%P\n" 2>/dev/null
# Exiting # Exiting
exit $? exit $?

View file

@ -42,8 +42,8 @@ else
dpkg_data=$(dpkg-query -s vesta) dpkg_data=$(dpkg-query -s vesta)
pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/vesta.list) 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 \-) 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 \-) RELEASE=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 2 -d \-)
DATE=$(date -d @$pkg_date +"%F") DATE=$(date -d @$pkg_date +"%F")
TIME=$(date -d @$pkg_date +"%T") TIME=$(date -d @$pkg_date +"%T")
fi fi
@ -65,8 +65,8 @@ else
dpkg_data=$(dpkg-query -s vesta-php) dpkg_data=$(dpkg-query -s vesta-php)
pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/vesta-php.list) pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/vesta-php.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 \-) 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 \-) RELEASE=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 2 -d \-)
DATE=$(date -d @$pkg_date +"%F") DATE=$(date -d @$pkg_date +"%F")
TIME=$(date -d @$pkg_date +"%T") TIME=$(date -d @$pkg_date +"%T")
fi fi
@ -89,8 +89,8 @@ else
dpkg_data=$(dpkg-query -s vesta-nginx) dpkg_data=$(dpkg-query -s vesta-nginx)
pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/vesta-nginx.list) pkg_date=$(stat -c "%Y" /var/lib/dpkg/info/vesta-nginx.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 \-) 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 \-) RELEASE=$(echo "$dpkg_data"|grep ^Version |cut -f 2 -d ' '|cut -f 2 -d \-)
DATE=$(date -d @$pkg_date +"%F") DATE=$(date -d @$pkg_date +"%F")
TIME=$(date -d @$pkg_date +"%T") TIME=$(date -d @$pkg_date +"%T")
fi fi

View file

@ -341,7 +341,7 @@ search_objects() {
# Get user value # Get user value
get_user_value() { get_user_value() {
grep "^${1//$/}=" $USER_DATA/user.conf| cut -f 2 -d \' grep "^${1//$/}=" $USER_DATA/user.conf |awk -F "'" '{print $2}'
} }
# Update user value in user.conf # Update user value in user.conf

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1176,6 +1176,9 @@ update-rc.d vesta defaults
service vesta start service vesta start
check_result $? "vesta start failed" check_result $? "vesta start failed"
# Adding notifications
$VESTA/upd/add_notifications.sh
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta Access Info # # Vesta Access Info #

View file

@ -1245,6 +1245,9 @@ chkconfig vesta on
service vesta start service vesta start
check_result $? "vesta start failed" check_result $? "vesta start failed"
# Adding notifications
$VESTA/upd/add_notifications.sh
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta Access Info # # Vesta Access Info #

View file

@ -1165,6 +1165,9 @@ update-rc.d vesta defaults
service vesta start service vesta start
check_result $? "vesta start failed" check_result $? "vesta start failed"
# Adding notifications
$VESTA/upd/add_notifications.sh
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta Access Info # # Vesta Access Info #

View file

@ -1,7 +1,7 @@
Source: vesta-nginx Source: vesta-nginx
Package: vesta-nginx Package: vesta-nginx
Priority: optional Priority: optional
Version: 0.9.7-3 Version: 0.9.8-15
Section: admin Section: admin
Maintainer: Serghey Rodin <skid@vestacp.com> Maintainer: Serghey Rodin <skid@vestacp.com>
Homepage: http://vestacp.com Homepage: http://vestacp.com

View file

@ -1,7 +1,7 @@
Source: vesta-php Source: vesta-php
Package: vesta-php Package: vesta-php
Priority: optional Priority: optional
Version: 0.9.7-3 Version: 0.9.8-15
Section: admin Section: admin
Maintainer: Serghey Rodin <skid@vestacp.com> Maintainer: Serghey Rodin <skid@vestacp.com>
Homepage: http://vestacp.com Homepage: http://vestacp.com

View file

@ -1,7 +1,7 @@
Source: vesta Source: vesta
Package: vesta Package: vesta
Priority: optional Priority: optional
Version: 0.9.8-14 Version: 0.9.8-15
Section: admin Section: admin
Maintainer: Serghey Rodin <skid@vestacp.com> Maintainer: Serghey Rodin <skid@vestacp.com>
Homepage: http://vestacp.com Homepage: http://vestacp.com

View file

@ -1,34 +1,13 @@
#!/bin/bash #!/bin/bash
# Run fwd_only trigger
if [ -x "/usr/local/vesta/upd/add_fwd_only.sh" ]; then
/usr/local/vesta/upd/add_fwd_only.sh
fi
# Run exim permission fixer
if [ -x "/usr/local/vesta/upd/fix_exim_permissions.sh" ]; then
/usr/local/vesta/upd/fix_exim_permissions.sh
fi
# Run vesta permission fixer
if [ -x "/usr/local/vesta/upd/fix_vesta_ssl_permissions.sh" ]; then
/usr/local/vesta/upd/fix_vesta_ssl_permissions.sh
fi
# Run MySQL autostart fixed
if [ -x "/usr/local/vesta/upd/fix_mysql_startup.sh" ]; then
/usr/local/vesta/upd/fix_mysql_startup.sh
fi
# Run SUDO trigger # Run SUDO trigger
if [ -x "/usr/local/vesta/upd/add_sudo.sh" ]; then if [ -x "/usr/local/vesta/upd/add_sudo.sh" ]; then
/usr/local/vesta/upd/add_sudo.sh /usr/local/vesta/upd/add_sudo.sh
fi fi
# Run Firewall trigger # Run Notification trigger
if [ -x "/usr/local/vesta/upd/add_firewall.sh" ]; then if [ -x "/usr/local/vesta/upd/add_notifications.sh" ]; then
/usr/local/vesta/upd/add_firewall.sh /usr/local/vesta/upd/add_notifications.sh
fi fi
exit 0 exit 0

View file

@ -490,8 +490,11 @@ env[LANG] = en_US.UTF-8
; Default Value: nothing is defined by default except the values in php.ini and ; Default Value: nothing is defined by default except the values in php.ini and
; specified at startup with the -d argument ; specified at startup with the -d argument
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com php_flag[display_errors] = off
;php_flag[display_errors] = off php_admin_value[error_log] = /usr/local/vesta/log/fpm-php.log
;php_admin_value[error_log] = /var/log/fpm-php.www.log php_admin_flag[log_errors] = on
;php_admin_flag[log_errors] = on php_admin_value[memory_limit] = 256M
;php_admin_value[memory_limit] = 32M 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

View file

@ -1,6 +1,6 @@
Name: vesta-nginx Name: vesta-nginx
Version: 0.9.8 Version: 0.9.8
Release: 3 Release: 15
Summary: Vesta Control Panel Summary: Vesta Control Panel
Group: System Environment/Base Group: System Environment/Base
License: BSD-like License: BSD-like

View file

@ -1,6 +1,6 @@
Name: vesta-php Name: vesta-php
Version: 0.9.8 Version: 0.9.8
Release: 2 Release: 15
Summary: Vesta Control Panel Summary: Vesta Control Panel
Group: System Environment/Base Group: System Environment/Base
License: GPL License: GPL

View file

@ -1,6 +1,6 @@
Name: vesta Name: vesta
Version: 0.9.8 Version: 0.9.8
Release: 14 Release: 15
Summary: Vesta Control Panel Summary: Vesta Control Panel
Group: System Environment/Base Group: System Environment/Base
License: GPL License: GPL
@ -30,23 +30,11 @@ rm -rf %{buildroot}
%post %post
if [ $1 -ge 2 ]; then if [ $1 -ge 2 ]; then
if [ -e /usr/local/vesta/upd/convert_templates.sh ]; then
/usr/local/vesta/upd/convert_templates.sh
fi
if [ -e /usr/local/vesta/upd/convert_webip.sh ]; then
/usr/local/vesta/upd/convert_webip.sh
fi
if [ -e /usr/local/vesta/upd/add_fwd_only.sh ]; then
/usr/local/vesta/upd/add_fwd_only.sh
fi
if [ -e /usr/local/vesta/upd/fix_vesta_ssl_permissions.sh ]; then
/usr/local/vesta/upd/fix_vesta_ssl_permissions.sh
fi
if [ -e /usr/local/vesta/upd/add_sudo.sh ]; then if [ -e /usr/local/vesta/upd/add_sudo.sh ]; then
/usr/local/vesta/upd/add_sudo.sh /usr/local/vesta/upd/add_sudo.sh
fi fi
if [ -e /usr/local/vesta/upd/add_firewall.sh ]; then if [ -e /usr/local/vesta/upd/add_notifications.sh ]; then
/usr/local/vesta/upd/add_firewall.sh /usr/local/vesta/upd/add_notifications.sh
fi fi
fi fi
%files %files
@ -62,6 +50,32 @@ fi
%config(noreplace) %{_vestadir}/web/css/uploadify.css %config(noreplace) %{_vestadir}/web/css/uploadify.css
%changelog %changelog
* Fri Nov 06 2015 Serghey Rodin <builder@vestacp.com> - 0.9.8-15
- File Manager (commercial plugin)
- SFTP Chroot (commercial plugin)
- Monitoring Tools: top/free/df/server-status/mysql-status/etc
- New installer
- Improved PHP-FPM support
- UI: Notification center
- UI: Starred objects
- UI: Object sorting
- UI: HotKeys suport
- UI: Mail account settings JS hint
- UI: Autofocus on first input when adding/editing
- UI: Up to 8 nameserver dns support
- Core: Improved system logger, domain adding api and backup routine
- Japanese language support. Thanks to Flatta
- Polish language support. Thanks to MarPiRK
- Vietnamese language support. Thanks to Nguyen Ngoc Phuong
- Security Fix: Command Injection and XSS Thanks to Global IT
- BugFix: DNS Cluster SOA synchronization
- BugFix: Bulk Operation
- BugFix: Backup exclusions
- BugFix: Domain validation
- BugFix: FTP user name prefix
- BugFix: Fail2Ban manager
- BugFix: Service manager
* Wed Jun 03 2015 Serghey Rodin <builder@vestacp.com> - 0.9.8-13 * Wed Jun 03 2015 Serghey Rodin <builder@vestacp.com> - 0.9.8-13
- New UI - New UI
- PHP-FPM support - PHP-FPM support

10
upd/add_notifications.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
# Add notifications
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 <a href='http://vestacp.com/features/#filemanager'>File Manager</a>. Plugin is avaiable for <a href='/edit/server/?lead=filemanager#module-filemanager'>purchase</a>." '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 <a href='/edit/server/?lead=sftp#module-sftp'>purchase</a> and enable <a href='http://vestacp.com/features/#sftpchroot'>SFTP Chroot</a>. "
/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. <a href='/list/server/?cpu'> Server -> Show CPU, Memory, Disk usage</a>"
/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 <a href='http://vestacp.com/roadmap/#0.9.8-15'>release notes</a>"
fi

View file

@ -1,10 +1,18 @@
#!/bin/bash #!/bin/bash
# New sudoers format
if [ ! -e /etc/sudoers.d/admin ]; then if [ ! -e '/etc/sudoers.d/admin' ]; then
echo "# Created by vesta update-trigger" > /etc/sudoers.d/admin if [ ! -d '/etc/sudoers.d' ]; then
echo "# $(date)" >> /etc/sudoers.d/admin mkidr /etc/sudoers.d
echo "admin ALL=(ALL) ALL" >> /etc/sudoers.d/admin chmod 750 /etc/sudoers.d
echo "admin ALL=NOPASSWD:/usr/local/vesta/bin/*" >> /etc/sudoers.d/admin fi
echo '# Created by vesta update-trigger' > /etc/sudoers.d/admin
echo 'Defaults env_keep="VESTA"' >> /etc/sudoers.d/admin
echo 'Defaults:admin !syslog' >> /etc/sudoers.d/admin
echo 'Defaults:admin !requiretty' >> /etc/sudoers.d/admin
echo '' >> /etc/sudoers.d/admin
echo 'admin ALL=(ALL) ALL' >> /etc/sudoers.d/admin
echo 'admin ALL=NOPASSWD:/usr/local/vesta/bin/*' >> /etc/sudoers.d/admin
chmod 440 /etc/sudoers.d/admin chmod 440 /etc/sudoers.d/admin
if [ -z "$(grep /etc/sudoers.d /etc/sudoers)" ]; then if [ -z "$(grep /etc/sudoers.d /etc/sudoers)" ]; then

View file

@ -26,7 +26,7 @@ if (!empty($_POST['ok'])) {
// Check empty fields // Check empty fields
if (empty($_POST['v_action'])) $errors[] = __('action'); if (empty($_POST['v_action'])) $errors[] = __('action');
if (empty($_POST['v_protocol'])) $errors[] = __('protocol'); if (empty($_POST['v_protocol'])) $errors[] = __('protocol');
if (empty($_POST['v_port'])) $errors[] = __('port'); if (!isset($_POST['v_port'])) $errors[] = __('port');
if (empty($_POST['v_ip'])) $errors[] = __('ip address'); if (empty($_POST['v_ip'])) $errors[] = __('ip address');
if (!empty($errors[0])) { if (!empty($errors[0])) {
foreach ($errors as $i => $error) { foreach ($errors as $i => $error) {

View file

@ -35,12 +35,10 @@ if ($_SESSION['user'] == 'admin') {
foreach ($domain as $value) { foreach ($domain as $value) {
$value = escapeshellarg($value); $value = escapeshellarg($value);
echo VESTA_CMD.$cmd." ".$user." ".$value." no";
exec (VESTA_CMD.$cmd." ".$user." ".$value." no", $output, $return_var); exec (VESTA_CMD.$cmd." ".$user." ".$value." no", $output, $return_var);
$restart='yes'; $restart='yes';
} }
if (isset($restart)) { if (isset($restart)) {
exec (VESTA_CMD."v-restart-web", $output, $return_var); exec (VESTA_CMD."v-restart-web", $output, $return_var);
exec (VESTA_CMD."v-restart-proxy", $output, $return_var); exec (VESTA_CMD."v-restart-proxy", $output, $return_var);

View file

@ -3,7 +3,7 @@ body { margin: 0; padding: 0; }
.l-logo { .l-logo {
background-color: #7B7B7B; background-color: #7B7B7B;
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-position: -117px -57px; background-position: -117px -57px;
background-repeat: no-repeat; background-repeat: no-repeat;
border: 9px solid #7B7B7B; border: 9px solid #7B7B7B;
@ -111,6 +111,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b
/* .listing li .icon { background: url("/images/document.png") no-repeat scroll -2px 6px; float: left; margin-left: -17px; width: 13px; height: 24px; }*/ /* .listing li .icon { background: url("/images/document.png") no-repeat scroll -2px 6px; float: left; margin-left: -17px; width: 13px; height: 24px; }*/
.listing li .icon { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; float: left; margin-left: -17px; width: 31px; height: 31px; margin-top: 1px; } .listing li .icon { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; float: left; margin-left: -17px; width: 31px; height: 31px; margin-top: 1px; }
.listing li .icon.filetype-dir { background: url("/images/flat_icons.png") no-repeat scroll -24px -98px; } .listing li .icon.filetype-dir { background: url("/images/flat_icons.png") no-repeat scroll -24px -98px; }
.listing li .icon.filetype-link { background: url("/images/flat_icons.png") no-repeat scroll -97px -121px; }
.listing li .icon.filetype-tif, .listing li .icon.filetype-tif,
.listing li .icon.filetype-gif, .listing li .icon.filetype-gif,
@ -474,7 +475,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b
} }
.progress-container .progress-elm .close { .progress-container .progress-elm .close {
background: rgba(0, 0, 0, 0) url("/images/sprite.png") repeat scroll -428px -487px; background: rgba(0, 0, 0, 0) url("/images/sprite.png?1446554103") repeat scroll -428px -487px;
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
float: right; float: right;
@ -505,7 +506,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b
} }
/*W /*W
.check-label::before { .check-label::before {
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-position: -232px -9px; background-position: -232px -9px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 450px auto; background-size: 450px auto;
@ -658,7 +659,7 @@ input[type="checkbox"] {
line-height: 30px; line-height: 30px;
} }
.shortcuts .close { .shortcuts .close {
background: url("/images/sprite.png") repeat scroll -408px -469px; background: url("/images/sprite.png?1446554103") repeat scroll -408px -469px;
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
float: right; float: right;
@ -715,7 +716,7 @@ input[type="checkbox"] {
.l-icon-shortcuts { .l-icon-shortcuts {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
width: 35px; width: 35px;
height: 35px; height: 35px;
background-position: -122px -283px; background-position: -122px -283px;

View file

@ -28,8 +28,8 @@ input.save:active { border: 1px solid #FFCC00; background-color: #FFCC00; color:
.ace_gutter, .ace_gutter,
.ace_scroller { padding-top: 0px; } .ace_scroller { padding-top: 0px; }
.ace-twilight .ace_gutter-active-line { margin-top: 10px; } /*.ace-twilight .ace_gutter-active-line { margin-top: 10px; } */
.ace_gutter-cell { color: #777; } .ace_gutter-cell { color: #777; }
.ace_editor { font-size: 19px !important; } .ace_editor { font-size: 17px !important; font-family: "Courier New", Courier, "Lucida Console", Monaco, monospace !important; }

117
web/css/styles.min.css vendored
View file

@ -629,10 +629,11 @@ a {
left: 0; left: 0;
top: 0; top: 0;
display: inline-block; display: inline-block;
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-size: 450px auto; background-size: 450px auto;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: -232px -9px; background-position: -232px -9px;
z-index: 99;
} }
input[type="checkbox"] { input[type="checkbox"] {
@ -655,7 +656,7 @@ input[type="checkbox"] {
} }
.l-logo { .l-logo {
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-position: -117px -7px; background-position: -117px -7px;
background-repeat: no-repeat; background-repeat: no-repeat;
display: inline-block; display: inline-block;
@ -672,7 +673,7 @@ input[type="checkbox"] {
margin-bottom: 28px; margin-bottom: 28px;
position: fixed; position: fixed;
width: 100%; width: 100%;
z-index: 11; z-index: 100;
} }
.l-header a { .l-header a {
font-size: 12px; font-size: 12px;
@ -777,7 +778,7 @@ input[type="checkbox"] {
} }
.l-profile__notifications { .l-profile__notifications {
background: url("/images/sprite.png") no-repeat scroll -129px -135px; background: url("/images/sprite.png?1446554103") no-repeat scroll -129px -135px;
border-radius: 30px; border-radius: 30px;
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
@ -799,11 +800,6 @@ input[type="checkbox"] {
background-color: #c4da5e; background-color: #c4da5e;
} }
.l-profile__notifications.updates { .l-profile__notifications.updates {
background-position: -165px -135px;
}
.l-profile__notifications.updates2 {
/* background-position: -202px -135px; */
background-position: -202px -157px; background-position: -202px -157px;
} }
@ -817,35 +813,43 @@ input[type="checkbox"] {
position: fixed; position: fixed;
top: 34px; top: 34px;
width: 351px; width: 351px;
z-index: 21; z-index: 200;
font-size: 12px; font-size: 12px;
padding: 0; padding: 0;
color: #9E9E9E; color: #7f7f7f;
} }
.notification-container .unseen {
color: #ABABAB;
}
.notification-container li { .notification-container li {
border-bottom: 1px solid #555; border-bottom: 1px solid #555;
padding: 10px 15px 24px; padding: 10px 15px 24px;
} }
.notification-container .mark-seen { .notification-container .mark-seen {
background: rgba(0, 0, 0, 0) url("/images/sprite.png") repeat scroll -427px -486px; background-color: #abc04b;
border: 5px solid #454545; border: 2px solid #454545;
border-radius: 12px; border-radius: 10px;
cursor: pointer; cursor: pointer;
display: inline-block; display: none;
float: right; float: right;
height: 9px; height: 7px;
margin-right: -8px; margin-right: -5px;
margin-top: -3px; margin-top: 0;
width: 9px; width: 7px;
} }
.notification-container .mark-seen:hover { .notification-container .mark-seen:hover {
background-color: #333; background-color: #333;
border-color: #333; border-color: #abc04b;
} }
.notification-container .mark-seen:active { .notification-container .mark-seen:active {
background-color: #777; background-color: #777;
border-color: #777; border-color: #777;
} }
.notification-container .unseen .mark-seen{
display: inline-block;
}
.notification-container .title { .notification-container .title {
color: #9e9e9e; color: #9e9e9e;
font-weight: bold; font-weight: bold;
@ -870,7 +874,6 @@ input[type="checkbox"] {
color: #dacf2e; color: #dacf2e;
} }
.notification-container a { .notification-container a {
color: #5ABDB5;/* #eee;*/ color: #5ABDB5;/* #eee;*/
} }
@ -881,6 +884,21 @@ input[type="checkbox"] {
color: #00C0C0; color: #00C0C0;
} }
.notification-container .icon {
display: inline-block;
width: 0;
}
.notification-container .icon.filemanager {
display: inline-block;
width: 22px;
background: url("/images/flat_icons.png") repeat scroll -31px -100px;
}
.notification-container .icon.starred {
display: inline-block;
width: 21px;
background: url("/images/sprite.png?1446554103") repeat scroll -184px 556px;
}
.l-stat { .l-stat {
@ -889,7 +907,7 @@ input[type="checkbox"] {
margin: 34px auto; margin: 34px auto;
position: fixed; position: fixed;
background-color: #fff; background-color: #fff;
z-index: 10; z-index: 100;
padding-top: 30px; padding-top: 30px;
} }
.l-stat__col { .l-stat__col {
@ -972,25 +990,25 @@ div.l-content > div.l-separator:nth-of-type(2) {
margin-top: 214px; margin-top: 214px;
width: 100%; width: 100%;
position: fixed; position: fixed;
z-index: 20; z-index: 120;
} }
div.l-content > div.l-separator:nth-of-type(4) { div.l-content > div.l-separator:nth-of-type(4) {
margin-top: 259px; margin-top: 259px;
width: 100%; width: 100%;
position: fixed; position: fixed;
z-index: 5; z-index: 100;
} }
.l-sort { .l-sort {
position: fixed; position: fixed;
width: 998px; width: 998px;
background-color: #fff; background-color: #fff;
z-index: 10; z-index: 110;
margin-top: 215px; margin-top: 215px;
} }
.l-sort__create-btn { .l-sort__create-btn {
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-position: -331px -107px; background-position: -331px -107px;
background-repeat: no-repeat; background-repeat: no-repeat;
bottom: -23px; bottom: -23px;
@ -1058,7 +1076,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
padding: 12px; padding: 12px;
} }
.context-menu.sort-order span.name { .context-menu.sort-order span.name {
background: url("/images/sprite.png") no-repeat scroll -292px -361px rgba(0, 0, 0, 0); background: url("/images/sprite.png?1446554103") no-repeat scroll -292px -361px rgba(0, 0, 0, 0);
display: inline-block; display: inline-block;
padding: 12px 28px 12px 12px; padding: 12px 28px 12px 12px;
width: 117px; width: 117px;
@ -1066,7 +1084,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
font-weight: bold; font-weight: bold;
} }
.context-menu.sort-order span.up { .context-menu.sort-order span.up {
background: url("/images/sprite.png") no-repeat scroll -434px -417px rgba(0, 0, 0, 0); background: url("/images/sprite.png?1446554103") no-repeat scroll -434px -417px rgba(0, 0, 0, 0);
display: inline-block; display: inline-block;
padding: 12px 14px; padding: 12px 14px;
width: 16px; width: 16px;
@ -1152,7 +1170,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
float: left; float: left;
width: 30px; width: 30px;
height: 30px; height: 30px;
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-position: -333px -1px; background-position: -333px -1px;
border: none; border: none;
} }
@ -1173,7 +1191,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
float: left; float: left;
width: 25px; width: 25px;
height: 25px; height: 25px;
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-position: -333px -37px; background-position: -333px -37px;
border: none; border: none;
} }
@ -1226,7 +1244,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
.l-select:after { .l-select:after {
pointer-events: none; pointer-events: none;
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-position: -245px -175px; background-position: -245px -175px;
width: 7px; width: 7px;
height: 4px; height: 4px;
@ -1261,14 +1279,12 @@ div.l-content > div.l-separator:nth-of-type(4) {
overflow: hidden; overflow: hidden;
font-size: 13px; font-size: 13px;
} }
.units div:last-child {
border-bottom: none !important;
}
.units .l-unit { .units .l-unit {
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
} }
.units > div:last-child {
border-bottom: none;
}
@ -1566,7 +1582,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
position: relative; position: relative;
} }
.actions-panel__col i { .actions-panel__col i {
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-repeat: no-repeat; background-repeat: no-repeat;
display: inline-block; display: inline-block;
float: right; float: right;
@ -1993,7 +2009,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
.l-icon-up-arrow, .l-icon-down-arrow, .l-icon-star, .l-icon-to-top, .l-icon-shortcuts, .l-icon-star-orange, .l-icon-star-blue { .l-icon-up-arrow, .l-icon-down-arrow, .l-icon-star, .l-icon-to-top, .l-icon-shortcuts, .l-icon-star-orange, .l-icon-star-blue {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
} }
.l-icon-down-arrow { .l-icon-down-arrow {
@ -2233,7 +2249,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
height: 16px; height: 16px;
overflow: hidden; overflow: hidden;
padding-top: 6px; padding-top: 6px;
width: 620px; width: 593px;
} }
.vst-ok { .vst-ok {
@ -2328,7 +2344,7 @@ label {
.vst-input:disabled, .vst-input:disabled,
.vst-list:disabled { .vst-list:disabled {
background-color: #ebebeb; background-color: #e0e0e0;
} }
.vst-input:focus:disabled { .vst-input:focus:disabled {
border-color: #f1f1f1; border-color: #f1f1f1;
@ -2351,7 +2367,7 @@ label {
margin: 2px 6px 0 0; margin: 2px 6px 0 0;
min-width: 138px; min-width: 138px;
padding: 8px 1px 6px 10px; padding: 8px 1px 6px 10px;
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-position: -185px -604px; background-position: -185px -604px;
width: 270px; width: 270px;
appearance:none; appearance:none;
@ -2764,7 +2780,7 @@ form#vstobjects.suspended {
#add-icon { #add-icon {
width: 45px; width: 45px;
height: 45px; height: 45px;
background-image: url("/images/sprite.png"); background-image: url("/images/sprite.png?1446554103");
background-position: -378px -107px; background-position: -378px -107px;
background-repeat: no-repeat; background-repeat: no-repeat;
display: inline-block; display: inline-block;
@ -2831,13 +2847,14 @@ form#vstobjects.suspended {
} }
.search-input { .search-input {
background-color: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
height: 21px; height: 21px;
line-height: 28px; line-height: 28px;
padding-left: 7px; padding-left: 7px;
float: left; float: left;
width: 0px; width: 74px;
visibility: hidden; /* visibility: hidden;*/
-webkit-transition: width .2s ease-out; -webkit-transition: width .2s ease-out;
-moz-transition: width .2s ease-out; -moz-transition: width .2s ease-out;
-o-transition: width .2s ease-out; -o-transition: width .2s ease-out;
@ -2848,9 +2865,9 @@ form#vstobjects.suspended {
visibility: visible; visibility: visible;
} }
.search-input:focus { .search-input:focus {
background-color: #d7f9ff; // background-color: #e8fcff;
border-color: #55c9c0; // border-color: #75c9c2;
color: #333; // color: #333;
} }
.float-left { .float-left {
@ -2902,7 +2919,7 @@ form#vstobjects.suspended {
letter-spacing: 3px; letter-spacing: 3px;
} }
.shortcuts .close { .shortcuts .close {
background: url("/images/sprite.png") repeat scroll -408px -469px; background: url("/images/sprite.png?1446554103") repeat scroll -408px -469px;
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
float: right; float: right;
@ -3001,6 +3018,10 @@ form#vstobjects.suspended {
background-color: #5f9491; background-color: #5f9491;
} }
.description.cancel-success {
color: #8fac0a;
font-weight: bold;
}
.description .licence { .description .licence {
padding: 20px 0; padding: 20px 0;

View file

@ -0,0 +1,30 @@
<?php
// Init
error_reporting(NULL);
session_start();
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check token
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
header('location: /login/');
exit();
}
if($_GET['delete'] == 1){
$v_username = escapeshellarg($user);
$v_id = escapeshellarg((int)$_GET['notification_id']);
exec (VESTA_CMD."v-delete-user-notification ".$v_username." ".$v_id, $output, $return_var);
check_return_code($return_var,$output);
unset($output);
} 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);
}
exit;

View file

@ -1,11 +1,23 @@
<?php <?php
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
if ((!isset($_SESSION['FILEMANAGER_KEY'])) || (empty($_SESSION['FILEMANAGER_KEY']))) {
header("Location: /login/");
exit;
}
$user = $_SESSION['user'];
if (($_SESSION['user'] == 'admin') && (!empty($_SESSION['look']))) {
$user=$_SESSION['look'];
}
if (!empty($_REQUEST['path'])) { if (!empty($_REQUEST['path'])) {
$path = $_REQUEST['path']; $path = $_REQUEST['path'];
if (is_readable($path)) { header("Content-type: application/octet-stream");
header("Content-Transfer-Encoding: binary");
header("Content-disposition: attachment;filename=".basename($path)); header("Content-disposition: attachment;filename=".basename($path));
readfile($path); passthru (VESTA_CMD . "v-open-fs-file " . $user . " " . escapeshellarg($path));
exit; exit;
}
} }
else { else {
die('File not found'); die('File not found');

Some files were not shown because too many files have changed in this diff Show more