Skip to content

Commit

Permalink
a (#2)
Browse files Browse the repository at this point in the history
* Fixed correct dutch sentences

* outroll#1311

* ur.php

translation of vesta eng file to urdu language.

* pt-Br translation corrections

Corrected words:
Email => E-mail (https://www.dicio.com.br/e-mail/)
Dominio => Domínio
Extenções  => Extensões
Mes => Mês

+ Added translation for "Email Credentials".

* Added Odoo web template, see Odoo's deployment at https://www.odoo.com/documentation/10.0/setup/deploy.html

* ur.ph update

added 'Email Credentials' => 'ای میل کی سند',

* Update v-extract-fs-archive

* Update ur.php

* Create v-update-host-certificate

Add a file that's setting the hostname certificate for exim, dovecot & vesta-web so the email is always with a valid LE certificate.

# Todo:
- add to cronjobs (default every month) of adds to lets encrypt renewall/request when updating system hostname certificate

* Securing v-update-host-certificate and few small fixes

* v-update-host-certificate fix: restarting vesta instead of web-backend

* Permissions for web files

* Backup filename changed (outroll#1289)

* Backup filename changed

Changed the backup filename for running more backup each day - for example every 4 hours

* Restore user fix with new backup date

* Check if the backup name has an old notation

* Fix backup permission check

* fixed regex

* fix

* Better permissions for web files

* Fix in v-update-host-certificate: added restart for dovecot

* Update nginx.conf

Added 
timer_resolution         50ms; 
In order to free some CPU cycles

Updated Cloudflare's IP addresses

* blank space indent fix

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* New template for OpenCart CMS

* security fix / thanks to Christopher Tarquini

* Latest CF IPs update

Latest CF IPs update

* CloudFlare IPs update

* Latest CF IPs update

* Latest CF IPs update

* CF IPs update

* CF IPs update

* CF IPs update

* CF IPs update

* CF IPs Update

* CF IPs update

* CF IPs update

* CF IPs update

* CF IPs update

* fixed checkbox issue

checkbox to an array allowing it to pass all three Vesta packages instead of just one.

* LetsEncrypt support for IDN domains

* Fix for leading dot domains

* Fix for LE domain restore

* changing web server includes back to %domain% for better readability

* Probably good idea to not to rebuild web domains if Apache is frontend web server

* New style for web configs / separate conf per domain

* v-list-mail-account-autoreply: JSON export function fix for quotes and backslash

* /web/edit/mail/index.php: fix for new lines in autoreply

Because JSON is properly escaped now, see outroll@a8d857f

* fix for new domain deletetion

* improved ioncube package specs

* PROXY_YSTEM => PROXY_SYSTEM

* fixed typo: PROXY_YSTEM instead of PROXY_SYSTEM

* Softaculous spec for RPM based systems

* Improved softaculous.spec

* Deb package for softaculous

* Apps panel

* enable/disable softaculous plugin

* removed post install routine for softaculous

* changed default action name from install to add

* added dependency for ioncube package

* Softaculous enable/disable scripts

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* fix for multiple init scripts

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* Minor fix for location vstats

* added trailing ;

* removed double ;
  • Loading branch information
cdnmall committed Dec 27, 2017
1 parent 41badba commit a9d9b7f
Show file tree
Hide file tree
Showing 1,764 changed files with 66,564 additions and 26,408 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.zip
*.gzip
*.gz
.vscode
.DS_Store
23 changes: 23 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### Operating System (OS/VERSION):

Type here, e.g. CentOS 6

### VestaCP Version:

Type here, e.g. 3.14159

### Installed Software (what you got with the installer):

Type here, e.g. php-fpm, apache, nginx, mysql

### Steps to Reproduce:

Type here, e.g. install vesta and type rm -rf / --no-preserve-root

### Related Issues/Forum Threads:

Found anything that might be related to this? It might help us find the cause.

### Other Notes:

Anything else?
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[Vesta Control Panel](http://vestacp.com/)
==================================================

[![Join the chat at https://gitter.im/vesta-cp/Lobby](https://badges.gitter.im/vesta-cp/Lobby.svg)](https://gitter.im/vesta-cp/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

* Vesta is an open source hosting control panel.
* Vesta has a clean and focused interface without the clutter.
* Vesta has the latest of very innovative technologies.


How to install
How to install (2 step)
----------------------------
Connect to your server as root via SSH
```bash
Expand All @@ -18,7 +19,13 @@ Download the installation script, and run it:
curl http://vestacp.com/pub/vst-install.sh | bash
```

If the above example does not work, try this 2 step method:
How to install (3 step)
----------------------------
If the above example does not work, try this 3 step method:
Connect to your server as root via SSH
```bash
ssh root@your.server
```

Download the installation script:
```bash
Expand Down
22 changes: 17 additions & 5 deletions bin/v-add-backup-host
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ if [ "$type" = 'ftp' ]; then
fi

# Checking write permissions
ftpc "mkdir $path" > /dev/null 2>&1
ftmpdir="$path/vst.bK76A9SUkt"
if [ -z $path ]; then
ftmpdir="vst.bK76A9SUkt"
else
ftpc "mkdir $path" > /dev/null 2>&1
ftmpdir="$path/vst.bK76A9SUkt"
fi
ftp_result=$(ftpc "mkdir $ftmpdir" "rm $ftmpdir"|grep -v Trying)
if [ ! -z "$ftp_result" ] ; then
echo "$ftp_result"
Expand All @@ -137,9 +141,17 @@ if [ "$type" = 'sftp' ]; then
if [ -z $port ]; then
port=22
fi
if sftpc "mkdir $path" > /dev/null 2>&1 ; then
sftmpdir="$path/vst.bK76A9SUkt"
sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
if [ -z $path ]; then
sftmpdir="vst.bK76A9SUkt"
sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
else
if sftpc "mkdir $path" > /dev/null 2>&1 ; then
sftmpdir="$path/vst.bK76A9SUkt"
sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
else
sftmpdir="$path/vst.bK76A9SUkt"
sftpc "mkdir $sftmpdir" "rmdir $sftmpdir" > /dev/null 2>&1
fi
fi
rc=$?
if [[ "$rc" != 0 ]]; then
Expand Down
43 changes: 43 additions & 0 deletions bin/v-add-cron-letsencrypt-job
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
# info: add letsencrypt cronjob
# options: NONE
#
# The script for enabling letsencrypt cronjob


#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#

# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf


#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#

is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'


#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#

# Add cron job
cmd="sudo /usr/local/vesta/bin/v-update-sys-queue letsencrypt"
check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
if [ -z "$check_cron" ] && [ ! -z "$CRON_SYSTEM" ]; then
$BIN/v-add-cron-job admin '*/5' '*' '*' '*' '*' "$cmd"
fi


#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#

# Logging
log_event "$OK" "$ARGUMENTS"

exit
39 changes: 16 additions & 23 deletions bin/v-add-dns-domain
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,8 @@

# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
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
domain=$2
domain_idn=$2
ip=$3
ns1=$4
ns2=$5
Expand All @@ -40,6 +33,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf

# Additional argument formatting
format_domain
format_domain_idn


#----------------------------------------------------------#
# Verifications #
Expand All @@ -56,37 +53,35 @@ template=$(get_user_value '$DNS_TEMPLATE')
is_dns_template_valid $template

if [ ! -z "$ns1" ]; then
ns1=$(echo $4 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns1=$(echo $4 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns1'
fi
if [ ! -z "$ns2" ]; then
ns2=$(echo $5 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns2=$(echo $5 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns2'
fi

if [ ! -z "$ns3" ]; then
ns3=$(echo $6 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns3=$(echo $6 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns3'
fi
if [ ! -z "$ns4" ]; then
ns4=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns4=$(echo $7 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns4'
fi
if [ ! -z "$ns5" ]; then
ns5=$(echo $8 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns5=$(echo $8 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns5'
fi
if [ ! -z "$ns6" ]; then
ns6=$(echo $9 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns6=$(echo $9 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns6'
fi
if [ ! -z "$ns7" ]; then
ns7=$(echo ${10} | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns7=$(echo ${10} |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns7'
fi

if [ ! -z "$ns8" ]; then
ns8=$(echo ${11} | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns8=$(echo ${11} |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns8'
fi

Expand Down Expand Up @@ -203,10 +198,8 @@ increase_user_value "$user" '$U_DNS_DOMAINS'
increase_user_value "$user" '$U_DNS_RECORDS' "$records"

# Restart named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "DNS restart failed"
fi
$BIN/v-restart-dns $restart
check_result $? "DNS restart failed"

# Logging
log_history "added dns domain $domain"
Expand Down
25 changes: 15 additions & 10 deletions bin/v-add-dns-record
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# Argument definition
user=$1
domain=$2
domain_idn=$2
record=$(idn -t --quiet -u "$3" )
record=$(echo "$record" | tr '[:upper:]' '[:lower:]')
rtype=$(echo "$4"| tr '[:lower:]' '[:upper:]')
Expand All @@ -26,11 +27,6 @@ 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
Expand All @@ -44,11 +40,22 @@ fi
# Add trailing dot at the end of NS/CNAME/MX/PTR/SRV record
if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
trailing_dot=$(echo $dvalue | grep "\.$")
if [ -z $trailing_dot ]; then
if [ -z "$trailing_dot" ]; then
dvalue="$dvalue."
fi
fi

dvalue=${dvalue//\"/}

if [[ "$dvalue" =~ [\;[:space:]] ]]; then
dvalue='"'"$dvalue"'"'
fi

# Additional argument formatting
format_domain
format_domain_idn
# TODO: $domain_idn not used in this script - maybe $domain should be converted to $doman_idn ?


#----------------------------------------------------------#
# Verifications #
Expand Down Expand Up @@ -115,10 +122,8 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records"
increase_user_value "$user" '$U_DNS_RECORDS'

# Restart named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? $E_RESTART 'dns failed to restart'
fi
$BIN/v-restart-dns $restart
check_result $? $E_RESTART 'dns failed to restart'

# Logging
log_history "added $rtype dns record $record for $domain"
Expand Down
18 changes: 8 additions & 10 deletions bin/v-add-domain
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,14 @@ if [ ! -z "$MAIL_SYSTEM" ]; then
fi

# Restarting services
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "can't restart web" > /dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "can't restart proxy" > /dev/null
fi
$BIN/v-restart-dns
check_result $? "can't restart dns" > /dev/null
fi
$BIN/v-restart-web $restart
check_result $? "can't restart web" > /dev/null

$BIN/v-restart-proxy $restart
check_result $? "can't restart proxy" > /dev/null

$BIN/v-restart-dns $restart
check_result $? "can't restart dns" > /dev/null


#----------------------------------------------------------#
Expand Down
60 changes: 40 additions & 20 deletions bin/v-add-fs-archive
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

user=$1
archive=$2
src=$3
src0=$3

# Checking arguments
if [ -z "$src" ]; then
echo "Usage: USER ARCHIVE SOURCE"
if [ -z "$src0" ]; then
echo "Usage: USER ARCHIVE FILE [FILE_2] [FILE_3] [FILE ...]"
exit 1
fi

Expand All @@ -21,36 +21,56 @@ if [ ! -e "$VESTA/data/users/$user" ]; then
fi

# Checking user homedir
homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :)
homedir=$(grep "^$user:" /etc/passwd |cut -f 6 -d :)
if [ -z $homedir ]; then
echo "Error: user home directory doesn't exist"
exit 12
fi

# Checking archive
if [ -e "$archive.tar.gz" ]; then
echo "Error: archive already exist $archive.tar.gz"
if [ -e "$archive" ]; then
echo "Error: archive already exist $archive"
exit 1
fi

# Checking source path
rpath=$(readlink -f "$src")
if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
echo "Error: invalid source path $src"
exit 1
fi
IFS=$'\n'
i=1
for src in $*; do
if [ "$i" -gt 2 ]; then
rpath=$(readlink -f "$src")
if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then
echo "Error: invalid source path $src"
exit 1
fi
fi
((i++))
done

# Parsing current directory
d=$(dirname "$src")
i=1
for src in $*; do
if [ "$i" -gt 2 ]; then
# Deleting leading home path
src=$(echo "$src"| sed -e "s|/home/$user/||")

# Removing leading file path
f=$(echo "$src" |sed -e "s|$d/||")
# Creating tar.gz archive
sudo -u $user tar -rf "${archive/.gz/}" -C /home/$user $src >\
/dev/null 2>&1
if [ "$?" -ne 0 ]; then
echo "Error: archive $archive was not created"
exit 3
fi
fi
((i++))
done

# Creating tar.gz archive
sudo -u $user tar -czf "$archive.tar.gz" -C $d $f >/dev/null 2>&1
if [ "$?" -ne 0 ]; then
echo "Error: archive $archive.tar.gz was not created"
exit 3
# Checking gzip
if [[ "$archive" =~ \.gz$ ]]; then
sudo -u $user gzip "${archive/.gz/}" >/dev/null 2>&1
if [ "$?" -ne 0 ]; then
echo "Error: archive $archive was not gziped"
exit 3
fi
fi

exit
Loading

0 comments on commit a9d9b7f

Please sign in to comment.