From f95e29952198a2744e3657ee736a59d51a15b07c Mon Sep 17 00:00:00 2001 From: Mostafa Amiri Date: Thu, 17 Dec 2015 20:40:37 +0330 Subject: [PATCH 001/229] Added use_localtime attribute to vsftpd By adding this attribute users will get files listing by their local timezone --- install/debian/7/vsftpd/vsftpd.conf | 1 + install/debian/8/vsftpd/vsftpd.conf | 1 + install/rhel/5/vsftpd/vsftpd.conf | 1 + install/rhel/6/vsftpd/vsftpd.conf | 1 + install/rhel/7/vsftpd/vsftpd.conf | 1 + install/ubuntu/12.04/vsftpd/vsftpd.conf | 1 + install/ubuntu/12.10/vsftpd/vsftpd.conf | 1 + install/ubuntu/13.04/vsftpd/vsftpd.conf | 1 + install/ubuntu/13.10/vsftpd/vsftpd.conf | 1 + install/ubuntu/14.04/vsftpd/vsftpd.conf | 1 + install/ubuntu/14.10/vsftpd/vsftpd.conf | 1 + install/ubuntu/15.04/vsftpd/vsftpd.conf | 1 + install/ubuntu/15.10/vsftpd/vsftpd.conf | 1 + 13 files changed, 13 insertions(+) diff --git a/install/debian/7/vsftpd/vsftpd.conf b/install/debian/7/vsftpd/vsftpd.conf index 0902899e7..1cc0a2b0e 100644 --- a/install/debian/7/vsftpd/vsftpd.conf +++ b/install/debian/7/vsftpd/vsftpd.conf @@ -22,3 +22,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/debian/8/vsftpd/vsftpd.conf b/install/debian/8/vsftpd/vsftpd.conf index 0902899e7..1cc0a2b0e 100644 --- a/install/debian/8/vsftpd/vsftpd.conf +++ b/install/debian/8/vsftpd/vsftpd.conf @@ -22,3 +22,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES diff --git a/install/rhel/5/vsftpd/vsftpd.conf b/install/rhel/5/vsftpd/vsftpd.conf index 7a986aff0..7ad6b5a93 100644 --- a/install/rhel/5/vsftpd/vsftpd.conf +++ b/install/rhel/5/vsftpd/vsftpd.conf @@ -19,3 +19,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/vsftpd/vsftpd.conf b/install/rhel/6/vsftpd/vsftpd.conf index 7a986aff0..7ad6b5a93 100644 --- a/install/rhel/6/vsftpd/vsftpd.conf +++ b/install/rhel/6/vsftpd/vsftpd.conf @@ -19,3 +19,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/vsftpd/vsftpd.conf b/install/rhel/7/vsftpd/vsftpd.conf index 4673c838d..19996eb64 100644 --- a/install/rhel/7/vsftpd/vsftpd.conf +++ b/install/rhel/7/vsftpd/vsftpd.conf @@ -20,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/ubuntu/12.04/vsftpd/vsftpd.conf b/install/ubuntu/12.04/vsftpd/vsftpd.conf index 0902899e7..1cc0a2b0e 100644 --- a/install/ubuntu/12.04/vsftpd/vsftpd.conf +++ b/install/ubuntu/12.04/vsftpd/vsftpd.conf @@ -22,3 +22,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/vsftpd/vsftpd.conf b/install/ubuntu/12.10/vsftpd/vsftpd.conf index 0902899e7..1cc0a2b0e 100644 --- a/install/ubuntu/12.10/vsftpd/vsftpd.conf +++ b/install/ubuntu/12.10/vsftpd/vsftpd.conf @@ -22,3 +22,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/vsftpd/vsftpd.conf b/install/ubuntu/13.04/vsftpd/vsftpd.conf index 0902899e7..1cc0a2b0e 100644 --- a/install/ubuntu/13.04/vsftpd/vsftpd.conf +++ b/install/ubuntu/13.04/vsftpd/vsftpd.conf @@ -22,3 +22,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/vsftpd/vsftpd.conf b/install/ubuntu/13.10/vsftpd/vsftpd.conf index 0902899e7..1cc0a2b0e 100644 --- a/install/ubuntu/13.10/vsftpd/vsftpd.conf +++ b/install/ubuntu/13.10/vsftpd/vsftpd.conf @@ -22,3 +22,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/vsftpd/vsftpd.conf b/install/ubuntu/14.04/vsftpd/vsftpd.conf index 0902899e7..1cc0a2b0e 100644 --- a/install/ubuntu/14.04/vsftpd/vsftpd.conf +++ b/install/ubuntu/14.04/vsftpd/vsftpd.conf @@ -22,3 +22,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/vsftpd/vsftpd.conf b/install/ubuntu/14.10/vsftpd/vsftpd.conf index 0902899e7..1cc0a2b0e 100644 --- a/install/ubuntu/14.10/vsftpd/vsftpd.conf +++ b/install/ubuntu/14.10/vsftpd/vsftpd.conf @@ -22,3 +22,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/vsftpd/vsftpd.conf b/install/ubuntu/15.04/vsftpd/vsftpd.conf index 0902899e7..1cc0a2b0e 100644 --- a/install/ubuntu/15.04/vsftpd/vsftpd.conf +++ b/install/ubuntu/15.04/vsftpd/vsftpd.conf @@ -22,3 +22,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/vsftpd/vsftpd.conf b/install/ubuntu/15.10/vsftpd/vsftpd.conf index 0902899e7..1cc0a2b0e 100644 --- a/install/ubuntu/15.10/vsftpd/vsftpd.conf +++ b/install/ubuntu/15.10/vsftpd/vsftpd.conf @@ -22,3 +22,4 @@ seccomp_sandbox=NO pasv_enable=YES pasv_max_port=12100 pasv_min_port=12000 +use_localtime=YES From 73fc463bd3f6c6979a78bc081348df1836176af1 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Thu, 17 Dec 2015 14:55:53 -0500 Subject: [PATCH 002/229] Update for Vesta 0.9.8-15 --- web/inc/i18n/tw.php | 809 +++++++++++++++++++++++++------------------- 1 file changed, 457 insertions(+), 352 deletions(-) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index 03aaf3c23..4d40a230d 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -1,141 +1,138 @@ '套件', - 'IP' => 'IP', - 'Graphs' => '圖表', - 'Statistics' => '狀態', - 'Log' => '日誌', - 'Server' => '服務器', + 'Packages' => '方案設定', + 'IP' => 'IP管理', + 'Graphs' => '資源使用圖表', + 'Statistics' => '統計資料', + 'Log' => '系統紀錄', 'Services' => '服務', 'Firewall' => '防火牆', - 'Updates' => '更新', + 'Server' => '伺服器', + 'Updates' => '系統更新', 'Log in' => '登入', 'Log out' => '登出', - - 'USER' => '使用者', - 'WEB' => '網頁', - 'DNS' => 'DNS', - 'MAIL' => '電子郵件', + 'USER' => '使用者管理', + 'WEB' => '網站管理', + 'DNS' => 'DNS管理', + 'MAIL' => '信箱管理', 'DB' => '資料庫', - 'CRON' => '排程', + 'CRON' => '任務排程', 'BACKUP' => '備份', - 'Add User' => '新增使用者', 'Add Domain' => '新增網域', - 'Add Web Domain' => '新增網頁網域', - 'Add DNS Domain' => '新增 DNS 網域', - 'Add DNS Record' => '新增 DNS 紀錄', - 'Add Mail Domain' => '新增電子郵件網域', - 'Add Mail Account' => '新增電子郵件帳號', + 'Add Web Domain' => '新增網站網域', + 'Add DNS Domain' => '新增DNS網域', + 'Add DNS Record' => '新增DNS紀錄', + 'Add Mail Domain' => '新增信箱網域', + 'Add Mail Account' => '新增信箱帳號', 'Add Database' => '新增資料庫', - 'Add Cron Job' => '新增排程工作', + 'Add Cron Job' => '新增任務排程', 'Create Backup' => '建立備份', - 'Configure' => '設置', - 'Restore All' => '全部還原', - 'Add Package' => '新增套件', - 'Add IP' => '新增 IP 位址', + 'Configure' => '配置', + 'Restore All' => '全部回復', + 'Add Package' => '新增方案', + 'Add IP' => '新增IP', 'Add Rule' => '新增規則', - 'Ban IP Address' => '封鎖 IP 位址', + 'Ban IP Address' => '封鎖IP', 'Search' => '搜尋', - 'Add one more FTP Account' => '新增多個 FTP 帳號', - 'Overall Statistics' => '整體報告', + 'Add one more FTP Account' => '增加一個FTP帳號', + 'Overall Statistics' => '整理統計資料', 'Daily' => '每天', 'Weekly' => '每週', - 'Monthly' => '每星期', + 'Monthly' => '每月', 'Yearly' => '每年', 'Add' => '新增', - 'Back' => '上一頁', + 'Back' => '返回', 'Save' => '儲存', 'Submit' => '送出', - - 'toggle all' => '全部切換', - 'apply to selected' => '套用到所選擇的', + 'toggle all' => '批次執行', + 'apply to selected' => '套用到所有已選擇的', 'rebuild' => '重建', - 'rebuild web' => '重建網頁', - 'rebuild dns' => '重建 dns', - 'rebuild mail' => '重建郵件', + 'rebuild web' => '重建網站', + 'rebuild dns' => '重建DNS', + 'rebuild mail' => '重建信箱', 'rebuild db' => '重建資料庫', - 'rebuild cron' => '重建排程', - 'update counters' => '更新計數', - 'suspend' => '暫停', - 'unsuspend' => '取消暫停', + 'rebuild cron' => '重建任務排程', + 'update counters' => '更新計數器', + 'suspend' => '封鎖', + 'unsuspend' => '解除封鎖', 'delete' => '刪除', - 'show per user' => '顯示每一個使用者', - 'login as' => '登入成為', + 'show per user' => '依照選擇的使用者', + 'login as' => '登入帳號', 'logout' => '登出', 'edit' => '編輯', - 'open webstats' => '開啟網頁狀態', - 'view logs' => '檢視日誌', + 'open webstats' => '開啟網站統計資料', + 'view logs' => '查看系統紀錄', 'list records' => '列出 %s 紀錄', 'add record' => '新增紀錄', 'list accounts' => '列出 %s 帳號', 'add account' => '新增帳號', - 'open webmail' => '開啟網頁郵件', - 'list fail2ban' => '列出 fail2ban', + 'open webmail' => '開啟網路信箱', + 'list fail2ban' => '列出登入失敗遭封鎖名單', 'open %s' => '開啟 %s', 'download' => '下載', - 'restore' => '還原', - 'configure restore settings' => '設置還原設定', + 'restore' => '回復', + 'configure restore settings' => '配置回復設定', 'stop' => '停止', - 'start' => '啟用', - 'restart' => '重啟', + 'start' => '啟動', + 'restart' => '重新啟動', 'update' => '更新', 'generate' => '產生', - 'Generate CSR' => '產生 CSR', - 'reread IP' => '重讀 IP', + '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' => '列出中', + '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' => '暫停', + 'Adding Firewall Rule' => '新增防火牆規則', + 'Editing Firewall Rule' => '編輯防火牆規則', + 'Adding IP Address to Banlist' => '新增IP至黑名單', + 'active' => '正常', + 'spnd' => '封鎖', + 'suspended' => '已封鎖', 'running' => '執行中', 'stopped' => '已停止', - 'outdated' => '已過期', - 'updated' => '已更新', - + 'outdated' => '有新版本可升級', + 'updated' => '已是最新版本', 'yes' => '是', 'no' => '否', - 'none' => '沒有', - 'pb' => 'pb', - 'tb' => 'tb', - 'gb' => 'gb', - 'mb' => 'mb', + 'none' => '無', + 'pb' => 'PB', + 'tb' => 'TB', + 'gb' => 'GB', + 'mb' => 'MB', 'minute' => '分鐘', 'hour' => '小時', 'day' => '天', @@ -143,356 +140,464 @@ $LANG['tw'] = array( 'hours' => '小時', 'minutes' => '分鐘', 'month' => '月', - 'package' => '套件', + 'package' => '方案', 'Bandwidth' => '流量', - 'Disk' => '磁碟', - 'Web' => '網頁', - 'Mail' => '郵件', + '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 位址', + 'Template' => '模板', + 'Web Template' => 'Apache模板', + 'Proxy Template' => 'Nginx模板', + 'DNS Template' => 'DNS模板', + 'Web Domains' => '網站網域', + 'SSL Domains' => 'SSL網域', + 'Web Aliases' => '網站次網域', + 'per domain' => '(每網域)', + 'DNS domains' => 'DNS網域', + 'DNS records' => 'DNS紀錄', + 'Name Servers' => '域名服務器', + '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', + 'backup exclusions' => '備份例外', + 'template' => '模板', + 'SSL Support' => 'SSL支援', + 'SSL Home Directory' => 'SSL主目錄', + 'Proxy Support' => 'Nginx支援', + 'Proxy Extensions' => 'Nginx擴充', + 'Web Statistics' => '網站統計', + 'Additional FTP Account' => '其他FTP帳號', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => '過期', 'Records' => '紀錄', - 'Catchall email' => '抓取外部郵件', + 'Catchall email' => '收到所有郵件', 'AntiVirus Support' => '防毒支援', - 'AntiSpam Support' => '防垃圾信支援', - 'DKIM Support' => 'DKIM 支援', + 'AntiSpam Support' => '防垃圾郵件支援', + 'DKIM Support' => 'DKIM支援', 'Accounts' => '帳號', - 'Quota' => '額度', + 'Quota' => '配額', 'Autoreply' => '自動回覆', 'Forward to' => '轉寄到', - 'Do not store forwarded mail' => '不要儲存轉寄郵件', + 'Do not store forwarded mail' => '不保留已轉發的郵件', 'database' => '資料庫', 'User' => '使用者', 'Host' => '主機', - 'Charset' => '字元', + 'Charset' => '編碼', 'Min' => '分鐘', 'Hour' => '小時', 'Day' => '天', 'Month' => '月', 'Day of week' => '星期幾', 'local' => '本地', - 'Run Time' => '執行時間', + 'Run Time' => '運作時間', 'Backup Size' => '備份大小', 'SYS' => 'SYS', 'Domains' => '網域', 'Status' => '狀態', - 'shared' => '已分享', - 'dedicated' => '專屬', + 'shared' => '共享', + 'dedicated' => '獨立', 'Owner' => '擁有者', 'Users' => '使用者', - 'Load Average' => '負載平均', + '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', + 'Bandwidth Usage p2p1' => '流量使用量 (p2p1)', + 'Bandwidth Usage ppp0' => '流量使用量 (ppp0)', + 'Bandwidth Usage ppp1' => '流量使用量 (ppp1)', + 'HTTPD Usage' => 'Apache使用量', + 'APACHE2 Usage' => 'Apache2使用量', + 'NGINX Usage' => 'NGINX使用量', + 'Exim Usage' => 'Exim使用量', + 'MySQL Usage on localhost' => 'MySQL使用量 (localhost)', + 'PostgreSQL Usage on localhost' => 'PostgreSQL使用量 (localhost)', + 'Bandwidth Usage eth0' => '網路流量 (eth0)', + 'FTP Usage' => 'FTP使用量', + 'SSH Usage' => 'SSH使用量', + 'ACCEPT' => '允許', + 'DROP' => '封鎖', + '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' => '防止暴力破解', + 'LoadAverage' => '平均負載量', + 'CPU' => '處理器負載', + 'MEMORY' => '記憶體', + 'DISK' => '磁碟', + 'NETWORK' => '網路', 'Memory' => '記憶體', - 'Uptime' => '上線時間', - 'core package' => '核心套件', - 'php interpreter' => 'php 編譯器', - 'internal web server' => '內部網頁伺服器', + 'Uptime' => '已啟動時間', + 'core package' => '核心系統', + 'php interpreter' => 'PHP解析', + 'internal web server' => '管理系統伺服器', 'Version' => '版本', - 'Release' => '釋出', + 'Release' => '發佈號碼', 'Architecture' => '架構', 'Object' => 'Object', 'Owner' => '擁有者', - 'Username' => '帳號', + 'Username' => '使用者名稱', 'Password' => '密碼', - 'Email' => '電子郵件', - 'Package' => '套件', - 'Language' => '語系', - 'First Name' => '名', - 'Last Name' => '姓', - 'Send login credentials to email address' => '傳送登入憑證到電子郵件地址', - 'Default Template' => '預設方案', - 'Default Name Servers' => '預設名稱伺服器(NS)', + 'Email' => '電子信箱', + 'Package' => '方案', + 'Language' => '語言', + 'First Name' => '名字', + 'Last Name' => '姓氏', + 'Send login credentials to email address' => '傳送登入資訊至使用者的信箱', + 'Default Template' => '預設模板', + 'Default Name Servers' => '預設域名服務器', 'Domain' => '網域', - 'DNS Support' => 'DNS 功能', - 'Mail Support' => '電子郵件功能', + 'DNS Support' => 'DNS支援', + 'Mail Support' => '信箱支援', 'Advanced options' => '進階選項', - 'Aliases' => '別名', - 'SSL Certificate' => 'SSL 憑證', - 'SSL Key' => 'SSL 金鑰', - 'SSL Certificate Authority / Intermediate' => 'SSL 憑證權力 / 中級', - 'SSL CSR' => 'SSL CSR', - 'optional' => '自訂', + 'Aliases' => '次網域', + 'SSL Certificate' => 'SSL憑證', + 'SSL Key' => 'SSL密鑰', + 'SSL Certificate Authority / Intermediate' => 'SSL中繼憑證', + 'SSL CSR' => 'SSL憑證簽署請求 (CSR)', + 'optional' => '選用', 'internal' => '內部', - 'Statistics Authorization' => '授權狀態', - 'Statistics Auth' => '授權狀態', + 'Statistics Authorization' => '統計授權', + 'Statistics Auth' => '統計驗證', 'Account' => '帳號', - 'Prefix will be automaticaly added to username' => '字首 %s 將會自動加入到帳號', - 'Send FTP credentials to email' => '傳送 FTP 憑證到電子郵件地址', - 'Expiration Date' => '到期日', + '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)', + 'Name servers' => '域名服務器', 'Record' => '紀錄', - 'IP or Value' => 'IP 或是主機名稱', - 'Priority' => '優先權', - 'Record Number' => '紀錄號碼', - 'in megabytes' => '在 MB', + '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 將會自動新增到資料庫名稱和資料庫使用者名稱。', + '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' => '套件名稱', + 'Package Name' => '方案名稱', 'Netmask' => '子網路遮罩', - 'Interface' => '介面', - 'Shared' => '已分享', - 'Assigned user' => '分配的使用者', - 'Assigned domain' => '分配的網域', - 'NAT IP association' => 'NAT IP 組合', + 'Interface' => '端口', + 'Shared' => '共享', + 'Assigned user' => '指定使用者', + 'Assigned domain' => '指定網址', + 'NAT IP association' => 'NAT IP連結', 'shell' => 'shell', - 'web domains' => '網頁網域', - 'web aliases' => '網頁別名', - 'dns records' => 'dns 紀錄', - 'mail domains' => '電子郵件網域', - 'mail accounts' => '電子郵件帳號', + 'web domains' => '網站網域', + 'web aliases' => '網站次網域', + 'dns records' => 'DNS記錄', + 'mail domains' => '信箱網域', + 'mail accounts' => '信箱帳號', 'accounts' => '帳號', 'databases' => '資料庫', - 'cron jobs' => '排程工作', + 'cron jobs' => '任務排程', 'backups' => '備份', - 'quota' => '額度', + 'quota' => '配額', 'day of week' => '星期幾', 'cmd' => '指令', 'users' => '使用者', 'domains' => '網域', - 'aliases' => '別名', - 'records' => '紀錄', - 'jobs' => '工作', - 'username' => '帳號', + 'aliases' => '次網域', + 'records' => '記錄', + 'jobs' => '任務', + 'username' => '使用者名稱', 'password' => '密碼', 'type' => '類型', - 'charset' => '字元', + 'charset' => '編碼', 'domain' => '網域', - 'ip' => 'ip', - 'ip address' => 'ip 位址', - 'IP address' => 'IP 位址', + 'ip' => 'IP', + 'ip address' => 'IP位置', + 'IP address' => 'IP位置', 'netmask' => '子網路遮罩', - 'interface' => '介面', - 'assigned user' => '分配使用者', + 'interface' => '端口', + 'assigned user' => '指定使用者', 'ns1' => 'ns1', 'ns2' => 'ns2', 'user' => '使用者', - 'email' => '電子郵件', - 'first name' => '名', - 'last name' => '姓', + 'email' => '信箱', + 'first name' => '名字', + 'last name' => '姓氏', 'account' => '帳號', - 'ssl certificate' => 'ssl 憑證', - 'ssl key' => 'ssl 金鑰', - 'stats user password' => '統計帳號密碼', - 'stats username' => '統計帳號', + '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', + 'ftp user password' => 'FTP使用者帳號密碼', + 'ftp user' => 'FTP使用者', + 'Last 70 lines of %s.%s.log' => '最後70行的 %s.%s.記錄', + 'Download AccessLog' => '下載存取記錄', + 'Download ErrorLog' => '下載錯誤記錄', 'Country' => '國家', - '2 letter code' => '2個字元', + '2 letter code' => '國家簡碼(台灣是TW/香港是HK)', 'State / Province' => '州 / 省', - 'City / Locality' => '城市 / 地方', - 'Organization' => '組織', + 'City / Locality' => '市 / 地區', + 'Organization' => '組織名稱', 'Action' => '動作', - 'Protocol' => '通訊協定', - 'Port' => '連接埠', - 'Comment' => '註解', - 'Banlist' => '封鎖清單', - 'ranges are acceptable' => '可使用範圍', - 'CIDR format is supported' => 'CIDR 格式是支援的', + 'Protocol' => '協議', + 'Port' => '端口', + 'Comment' => '備註', + 'Banlist' => '黑名單', + 'ranges are acceptable' => '可使用範圍(例如:21-22)', + 'CIDR format is supported' => '支援CIDR格式', + '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 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 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 log record' => '1 系統記錄', + '%s log records' => '%s 系統記錄', '1 object' => '1 object', '%s objects' => '%s objects', - 'no exclusions' => '沒有排除', + '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 嗎?', - 'RESTART_CONFIRMATION' => '您確定您要重新啟動 %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 已加入成功!', + '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' => 'Rule 已加入成功!', + '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' => '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 嗎?', + 'RESTART_CONFIRMATION' => '確定要重新啟動 %s 嗎?', 'Welcome' => '歡迎', - 'LOGGED_IN_AS' => '登入為使用者 %s', + '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', + '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 虛擬主機系統 ', + 'IP address is in use' => 'IP位置為使用中', + 'BACKUP_SCHEDULED' => '您的要求已加入隊列中,備份完成後會再以電子郵件通知您', + 'BACKUP_EXISTS' => '已經有一個備份正在執行中,請等待備份完成後在操作', + 'RESTORE_SCHEDULED' => '您的要求已加入隊列中,回復完成後會再以電子郵件通知您', + 'RESTORE_EXISTS' => '已經有一個回復正在執行中,請等待備份完成後在操作', + '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 虛擬主機系統\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 虛擬主機系統\n", - - 'Database Credentials' => '資料庫資料', - 'DATABASE_READY' => "資料庫已經建立成功。\n\n資料庫: %s\n帳號: %s\n密碼: %s\n%s\n\n--\nVesta 虛擬主機系統\n", - + 'FTP_ACCOUNT_READY' => "FTP帳號已成功建立,並可以開始使用了!\n\n主機名稱: %s\n使用者名稱: %s_%s\n密碼: %s\n\n--\nVesta Control Panel\n", + 'Database Credentials' => "資料庫 登入資料", + 'DATABASE_READY' => "資料庫已加入成功!\n\n資料庫名稱: %s\n使用者名稱: %s\n密碼: %s\n%s\n\n--\nVesta Control Panel\n", 'forgot password' => '忘記密碼', 'Confirm' => '確認', - 'New Password' => '新的密碼', + 'New Password' => '新密碼', 'Confirm Password' => '確認密碼', 'Reset' => '重設', - 'Reset Code' => '重設驗證碼', + '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", + '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", - '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' => '1月', + 'Feb' => '2月', + 'Mar' => '3月', + 'Apr' => '4月', + 'May' => '5月', + 'Jun' => '6月', + 'Jul' => '7月', + 'Aug' => '8月', + 'Sep' => '9月', + 'Oct' => '10月', + 'Nov' => '11月', + 'Dec' => '12月', - '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', + 'Configuring Server' => '配置主機', + 'Hostname' => '主機名稱', + 'Time Zone' => '時區', + 'Default Language' => '預設語言', + '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' => '顯示: 處理器 / 記憶體 / 網路 / 硬碟', + + 'sort by' => '排序按照', + 'Date' => '日期', + 'Starred' => '加註星號', + 'Name' => '名稱', + + 'File Manager' => '檔案管理器', + 'type' => '類型', + 'size' => '大小', + 'date' => '日期', + 'name' => '名稱', + 'Initializing' => '正在初始化', + 'UPLOAD' => '上傳', + 'NEW FILE' => '新增檔案', + 'NEW DIR' => '新增資料夾', + 'DELETE' => '刪除', + 'RENAME' => '重新命名', + 'COPY' => '複製', + 'ARCHIVE' => '壓縮', + 'EXTRACT' => '解壓縮', + 'DOWNLOAD' => '下載', + 'Hit' => 'Hit', + 'to reload the page' => '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' => '壓縮', + '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' => '新增資料夾', + + 'Add New object' => 'Add New object', + 'Save Form' => 'Save Form', + 'Cancel saving 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' => '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' => '下載', + 'Rename' => '重新命名', + 'Copy' => '複製', + 'Archive' => '壓縮', + 'Delete' => '刪除', + '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 Last File' => '回到上個檔案', + 'Open File/Enter Directory' => '開啟檔案/進入資料夾', + 'Go to Parent Directory' => '回到上一頁', + 'Select Current File' => '選取目前的檔案', + 'Select Bunch of Files' => '選取多個檔案', + 'Append File to the Current Selection' => 'Append 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', + + '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.' => '這是一個付費模組,您需要購買授權金鑰才能啟動它。' ); From ce0cabf9aaab89bda82031bfb7ab0ec844e0f67d Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Fri, 18 Dec 2015 17:51:59 -0500 Subject: [PATCH 003/229] 12/18/2015 - Minor edit --- web/inc/i18n/tw.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index 4d40a230d..23d2ea2a3 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -301,6 +301,7 @@ $LANG['tw'] = array( 'web domains' => '網站網域', 'web aliases' => '網站次網域', 'dns records' => 'DNS記錄', + 'DNS Domains' => 'DNS網域', 'mail domains' => '信箱網域', 'mail accounts' => '信箱帳號', 'accounts' => '帳號', From 337a5924a30cc7e5287ffe1892b9df3e1c016c72 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Wed, 23 Dec 2015 06:03:12 -0500 Subject: [PATCH 004/229] Update tw.php Add miss translated string "Path" --- web/inc/i18n/tw.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index 23d2ea2a3..fa06d6b63 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -273,6 +273,7 @@ $LANG['tw'] = array( 'Statistics Auth' => '統計驗證', 'Account' => '帳號', 'Prefix will be automaticaly added to username' => '前綴 %s 將會自動加到使用者名稱', + 'Path' => '路徑', 'Send FTP credentials to email' => '將FTP登入資料傳送到使用者信箱', 'Expiration Date' => '到期日期', 'YYYY-MM-DD' => 'YYYY-MM-DD', From b5838322fed96df17e5ea3cd551da9c4450b8f17 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Fri, 25 Dec 2015 09:08:11 -0500 Subject: [PATCH 005/229] Update tw.php --- web/inc/i18n/tw.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index fa06d6b63..c7abb5a09 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -190,9 +190,9 @@ $LANG['tw'] = array( 'User' => '使用者', 'Host' => '主機', 'Charset' => '編碼', - 'Min' => '分鐘', - 'Hour' => '小時', - 'Day' => '天', + 'Min' => '分', + 'Hour' => '時', + 'Day' => '日', 'Month' => '月', 'Day of week' => '星期幾', 'local' => '本地', @@ -210,13 +210,17 @@ $LANG['tw'] = array( 'Bandwidth Usage p2p1' => '流量使用量 (p2p1)', 'Bandwidth Usage ppp0' => '流量使用量 (ppp0)', 'Bandwidth Usage ppp1' => '流量使用量 (ppp1)', + 'Bandwidth Usage eth0' => '流量使用量 (eth0)', + 'Bandwidth Usage eth1' => '流量使用量 (eth1)', + 'Bandwidth Usage sit0' => '流量使用量 (sit0)', + 'Bandwidth Usage sit1' => '流量使用量 (sit1)', + 'Bandwidth Usage he-ipv6' => '流量使用量 (he-ipv6)', 'HTTPD Usage' => 'Apache使用量', 'APACHE2 Usage' => 'Apache2使用量', 'NGINX Usage' => 'NGINX使用量', 'Exim Usage' => 'Exim使用量', 'MySQL Usage on localhost' => 'MySQL使用量 (localhost)', 'PostgreSQL Usage on localhost' => 'PostgreSQL使用量 (localhost)', - 'Bandwidth Usage eth0' => '網路流量 (eth0)', 'FTP Usage' => 'FTP使用量', 'SSH Usage' => 'SSH使用量', 'ACCEPT' => '允許', From b557ba4576f50533e2f0d64f47f11fec31becc98 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Fri, 25 Dec 2015 10:23:19 -0500 Subject: [PATCH 006/229] Update tw.php --- web/inc/i18n/tw.php | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index c7abb5a09..a0b6a1a8a 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -525,7 +525,7 @@ $LANG['tw'] = array( 'EXTRACT' => '解壓縮', 'DOWNLOAD' => '下載', 'Hit' => 'Hit', - 'to reload the page' => 'to reload the page', + 'to reload the page' => '重新整理頁面', 'Directory name cannot be empty' => '資料夾名稱不能為空白', 'File name cannot be empty' => '檔案名稱不能為空白', 'No file selected' => '還沒選取任何檔案', @@ -543,8 +543,8 @@ $LANG['tw'] = array( 'Create' => '新增', 'Compress' => '壓縮', 'OK' => '確定', - 'Are you sure you want to copy' => '確定要複製嗎?', - 'Are you sure you want to delete' => '確定要刪除嗎?', + 'Are you sure you want to copy' => '確定要複製', + 'Are you sure you want to delete' => '確定要刪除', 'into' => '資訊', 'existing files will be replaced' => '原本的檔案會被覆蓋', 'Original name' => '原始名稱', @@ -553,9 +553,9 @@ $LANG['tw'] = array( 'Create file' => '新增檔案', 'Create directory' => '新增資料夾', - 'Add New object' => 'Add New object', - 'Save Form' => 'Save Form', - 'Cancel saving form' => 'Cancel saving form', + 'Add New object' => '新增', + 'Save Form' => '儲存設定', + 'Cancel saving form' => '不要儲存設定', 'Go to USER list' => '回到使用者列表', 'Go to WEB list' => '回到網站列表', 'Go to DNS list' => '回到DNS列表', @@ -563,11 +563,11 @@ $LANG['tw'] = array( 'Go to DB list' => '回到資料庫列表', 'Go to CRON 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', + 'Focus on search' => '搜尋', + 'Display/Close shortcuts' => '顯示/關閉 快捷鍵列表', + 'Move backward through top menu' => '在頂置選單中向左移動', + 'Move forward through top menu' => '在頂置選單中向右移動', + 'Enter focused element' => '進去選擇的選項', 'Upload' => '上傳', 'New File' => '新增檔案', @@ -577,23 +577,25 @@ $LANG['tw'] = array( 'Copy' => '複製', 'Archive' => '壓縮', 'Delete' => '刪除', + 'Shortcuts' => '快捷鍵', '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' => '回到檔案列表頂端', + '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' => '開啟檔案/進入資料夾', + 'Open File / Enter Directory' => '開啟檔案 或 進入資料夾', 'Go to Parent Directory' => '回到上一頁', 'Select Current File' => '選取目前的檔案', 'Select Bunch of Files' => '選取多個檔案', - 'Append File to the Current Selection' => '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', + '快捷鍵是的想法是由 magnificent GNU Midnight Commander 檔案管理器 啟發的', + 'Save' => '儲存', 'Licence Key' => '授權金鑰', 'Enter License Key' => '輸入授權金鑰', From 49c26edc0a4b72355d1d1848c2af2e01b0a5034f Mon Sep 17 00:00:00 2001 From: Pavel Galkin Date: Sat, 26 Dec 2015 22:53:12 +0300 Subject: [PATCH 007/229] Farsi/Persian language file Farsi/Persian language file --- web/inc/i18n/fa.php | 610 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 610 insertions(+) create mode 100644 web/inc/i18n/fa.php diff --git a/web/inc/i18n/fa.php b/web/inc/i18n/fa.php new file mode 100644 index 000000000..32b69138e --- /dev/null +++ b/web/inc/i18n/fa.php @@ -0,0 +1,610 @@ + 'بسته ها', + 'IP' => 'آي پي', + 'Graphs' => 'نمودار ها', + 'Statistics' => 'آمار', + 'Log' => 'گزارش', + 'Server' => 'سرور', + 'Services' => 'خدمات', + 'Firewall' => 'ديوار آتشين', + 'firewall' => 'ديوار آتشين', + 'brute-force monitor' => 'مانيتور بروت فورس', + 'Updates' => 'بروز رساني ها', + 'Log in' => 'ورود', + 'Log out' => 'خروج', + + 'USER' => 'كاربر', + 'WEB' => 'وب', + 'DNS' => 'نام سرور', + 'MAIL' => 'ايميل', + 'DB' => 'پايگاه داده', + 'CRON' => 'خودكار', + 'BACKUP' => 'پشتيبان', + + '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 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 اضافه', + 'SOA' => 'SOA', + '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' => 'سيستم', + 'Domains' => 'دامنه ها', + 'Status' => 'وضعيت', + 'shared' => 'مشترك', + 'dedicated' => 'اختصاصي', + 'Owner' => 'مالك', + 'Users' => 'كاربران', + 'Load Average' => 'ميانگين بارگزاري', + 'Memory Usage' => 'مصرف حافظه', + 'HTTPD Usage' => 'مصرف HTTPD', + 'NGINX Usage' => 'مصرف NGINX', + 'MySQL Usage on localhost' => 'مصرف MySQL در localhost', + 'PostgreSQL Usage on localhost' => 'مصرف PostgreSQL در localhost', + 'Bandwidth Usage eth0' => 'پهناي باند مصرفي eth0', + 'FTP Usage' => 'مصرف FTP', + 'SSH Usage' => 'مصرف SSH', + 'Exim Usage' => 'مصرف Exim', + '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' => 'پردازنده', + 'Memory' => 'حافظه', + 'Uptime' => 'زمان كاركرد', + 'core package' => 'بسته هسته', + 'php interpreter' => 'مترجم پي اچ پي', + 'internal web server' => 'وب سرور داخلي', + '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' => 'نام سرور پيش فرض', + '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', + '70 خط اخر %s.%s.log' => 'هفتاد خط انتهايي از %s.%s.log', + '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 پشتیبانی می شود', + 'Add one more Name Server' => 'افزودن یک نام سرور دیگر', + + '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 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' => 'قانون با موفقيت ايجاد شد.', + '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' => '', + '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' => 'زبان پیشفرض', + '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' => 'مرتب سازی بر اساس', + 'Date' => 'تاریخ', + 'Starred' => 'ستاره دار', + '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' => 'فشرده سازي', + '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' => 'ایجاد پوشه', + + + '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' => 'ورود به مورد انتخاب شده', + + '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' => + 'ميانبرها الهام گرفته از 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.' => 'اين ماژول تجاريست, شما بايد كليد مجوز براي فعال سازي سفارش دهيد.' + +); \ No newline at end of file From 806e2743841bb6c1ddb4162f235868b65641fb3f Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:22:01 -0500 Subject: [PATCH 008/229] Open TCP port 53 for dns --- install/rhel/7/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/rhel/7/firewall/ports.conf b/install/rhel/7/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 2df042d4089938c4bb253be977d1763914c07dec Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:24:02 -0500 Subject: [PATCH 009/229] Open TCP port 53 for dns --- install/rhel/7/firewall/rules.conf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/rhel/7/firewall/rules.conf b/install/rhel/7/firewall/rules.conf index 956c2e1d9..4fc57b36f 100644 --- a/install/rhel/7/firewall/rules.conf +++ b/install/rhel/7/firewall/rules.conf @@ -5,6 +5,7 @@ RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='I 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='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' From 1d10dbdc4d4fcf3cd3c19fc45790fb22538063df Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:24:40 -0500 Subject: [PATCH 010/229] Open TCP port 53 for dns --- install/rhel/6/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/rhel/6/firewall/ports.conf b/install/rhel/6/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 46f2fbb47176e909badb664ff30d443ad6c9c0aa Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:25:20 -0500 Subject: [PATCH 011/229] Open TCP port 53 for dns --- install/rhel/6/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/rhel/6/firewall/rules.conf b/install/rhel/6/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From ce18377ad952973b1bbdcc7ce5004458a4dd9d9e Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:26:46 -0500 Subject: [PATCH 012/229] Update rules.conf --- install/rhel/7/firewall/rules.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/rhel/7/firewall/rules.conf b/install/rhel/7/firewall/rules.conf index 4fc57b36f..fba98e1e4 100644 --- a/install/rhel/7/firewall/rules.conf +++ b/install/rhel/7/firewall/rules.conf @@ -4,7 +4,7 @@ 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='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' From 1c24b05a1e6c3d68eefadecc0c3b7443f700c74d Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:28:25 -0500 Subject: [PATCH 013/229] Open TCP port 53 for dns --- install/rhel/5/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/rhel/5/firewall/ports.conf b/install/rhel/5/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 421a6b24006951dd333cb7640a746520bbec36f5 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:28:53 -0500 Subject: [PATCH 014/229] Open TCP port 53 for dns --- install/rhel/5/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/rhel/5/firewall/rules.conf b/install/rhel/5/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From 2b4543b85ee8dc5bdfc9f5a415d66f2dd95fae5f Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:29:27 -0500 Subject: [PATCH 015/229] Open TCP port 53 for dns --- install/debian/7/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/debian/7/firewall/ports.conf b/install/debian/7/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 5c627c6b99abe70e2e045f437d174dfa1a08b37b Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:30:11 -0500 Subject: [PATCH 016/229] Open TCP port 53 for dns --- install/debian/7/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/debian/7/firewall/rules.conf b/install/debian/7/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From 8fd120435f511f0725d8a495026a37b300166a39 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:31:03 -0500 Subject: [PATCH 017/229] Open TCP port 53 for dns --- install/debian/8/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/debian/8/firewall/ports.conf b/install/debian/8/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 113aefcf73e5ae00cd6241eb36985ce84705d5c5 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:31:42 -0500 Subject: [PATCH 018/229] Open TCP port 53 for dns --- install/debian/8/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/debian/8/firewall/rules.conf b/install/debian/8/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From 2d3aa5622a00ed8a25c9d61182012d2307c5af0c Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:32:18 -0500 Subject: [PATCH 019/229] Open TCP port 53 for dns --- install/ubuntu/15.10/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/ubuntu/15.10/firewall/ports.conf b/install/ubuntu/15.10/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 97a86e4da6675b37235d2fd739a43eb75464e153 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:32:47 -0500 Subject: [PATCH 020/229] Open TCP port 53 for dns --- install/ubuntu/15.10/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/ubuntu/15.10/firewall/rules.conf b/install/ubuntu/15.10/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From 9db2e8acf2eae022817eb079176a8c2fe4381022 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:33:11 -0500 Subject: [PATCH 021/229] Open TCP port 53 for dns --- install/ubuntu/15.04/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/ubuntu/15.04/firewall/ports.conf b/install/ubuntu/15.04/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 368d4b0069d229d9bc2965dcfe10068fab2f1682 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:33:40 -0500 Subject: [PATCH 022/229] Open TCP port 53 for dns --- install/ubuntu/15.04/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/ubuntu/15.04/firewall/rules.conf b/install/ubuntu/15.04/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From d30504856a7dedb3bd16f2041a7f1b2085980508 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:34:08 -0500 Subject: [PATCH 023/229] Open TCP port 53 for dns --- install/ubuntu/14.10/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/ubuntu/14.10/firewall/ports.conf b/install/ubuntu/14.10/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 7991da62595fb643364de38b317534c0add0120c Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:34:36 -0500 Subject: [PATCH 024/229] Open TCP port 53 for dns --- install/ubuntu/14.10/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/ubuntu/14.10/firewall/rules.conf b/install/ubuntu/14.10/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From b00bf0e43c9b6e615d8e166b0daaf0a717223bcf Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:35:08 -0500 Subject: [PATCH 025/229] Open TCP port 53 for dns --- install/ubuntu/14.04/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/ubuntu/14.04/firewall/ports.conf b/install/ubuntu/14.04/firewall/ports.conf index a6ef4dae5..b730d012c 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' From cbfcbe837ff92015921e2367cada7532969210c9 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:35:53 -0500 Subject: [PATCH 026/229] Open TCP port 53 for dns --- install/ubuntu/14.04/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/ubuntu/14.04/firewall/rules.conf b/install/ubuntu/14.04/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From 9efd4211fdd1ede6c34e136cfa171786aa8ffb64 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:36:29 -0500 Subject: [PATCH 027/229] Open TCP port 53 for dns --- install/ubuntu/13.10/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/ubuntu/13.10/firewall/ports.conf b/install/ubuntu/13.10/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 82c335a9fcf3eaa97c3044fa625758e36efc3f6e Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:36:55 -0500 Subject: [PATCH 028/229] Open TCP port 53 for dns --- install/ubuntu/13.10/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/ubuntu/13.10/firewall/rules.conf b/install/ubuntu/13.10/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From f8b449f124adfd18cdece53fb25cbddf9edc6ceb Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:37:16 -0500 Subject: [PATCH 029/229] Open TCP port 53 for dns --- install/ubuntu/12.10/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/ubuntu/12.10/firewall/ports.conf b/install/ubuntu/12.10/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 7654b21e4cabd501faa5d1562828b2b53e2017e8 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:37:37 -0500 Subject: [PATCH 030/229] Open TCP port 53 for dns --- install/ubuntu/12.10/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/ubuntu/12.10/firewall/rules.conf b/install/ubuntu/12.10/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From 176ab61ef4a8f6bd102dae117745d84fc9c4f495 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:38:05 -0500 Subject: [PATCH 031/229] Open TCP port 53 for dns --- install/ubuntu/13.04/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/ubuntu/13.04/firewall/ports.conf b/install/ubuntu/13.04/firewall/ports.conf index a6ef4dae5..b730d012c 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' From 6d1dd2a01cc7db46ede74f84d90295206c32d4db Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:38:30 -0500 Subject: [PATCH 032/229] Open TCP port 53 for dns --- install/ubuntu/13.04/firewall/rules.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/ubuntu/13.04/firewall/rules.conf b/install/ubuntu/13.04/firewall/rules.conf index 956c2e1d9..7015507d5 100644 --- a/install/ubuntu/13.04/firewall/rules.conf +++ b/install/ubuntu/13.04/firewall/rules.conf @@ -4,6 +4,7 @@ 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='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' 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' From 20c9b83e710486972ff02d3c30043571fe9f29c9 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:39:10 -0500 Subject: [PATCH 033/229] Open TCP port 53 for dns --- install/ubuntu/12.04/firewall/ports.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/ubuntu/12.04/firewall/ports.conf b/install/ubuntu/12.04/firewall/ports.conf index a6ef4dae5..b730d012c 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' From db10790d82df82bbc58c06b8d8d1a9223a56cb37 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:39:43 -0500 Subject: [PATCH 034/229] Open TCP port 53 for dns --- install/ubuntu/12.04/firewall/rules.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/ubuntu/12.04/firewall/rules.conf b/install/ubuntu/12.04/firewall/rules.conf index 956c2e1d9..fba98e1e4 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' From b78f41c1a77c5af6965a94412fa7a0c6a55d28bd Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:40:11 -0500 Subject: [PATCH 035/229] Open TCP port 53 for dns --- install/ubuntu/13.04/firewall/rules.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/ubuntu/13.04/firewall/rules.conf b/install/ubuntu/13.04/firewall/rules.conf index 7015507d5..fba98e1e4 100644 --- a/install/ubuntu/13.04/firewall/rules.conf +++ b/install/ubuntu/13.04/firewall/rules.conf @@ -5,7 +5,7 @@ RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='I 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='TCP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' 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='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' From 8d8dca8168edeb02d350d9f9283c45c3470e0912 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:43:23 -0500 Subject: [PATCH 036/229] Open TCP port 53 for dns --- install/rhel/7/firewall/rules.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/install/rhel/7/firewall/rules.conf b/install/rhel/7/firewall/rules.conf index fba98e1e4..d00a9900d 100644 --- a/install/rhel/7/firewall/rules.conf +++ b/install/rhel/7/firewall/rules.conf @@ -9,3 +9,4 @@ RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' S 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' + From 431e805e29fe27b165e4ea1ed9ed2d561171b012 Mon Sep 17 00:00:00 2001 From: Joe M Date: Mon, 28 Dec 2015 05:44:27 -0500 Subject: [PATCH 037/229] Open TCP port 53 for dns --- install/rhel/7/firewall/rules.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/install/rhel/7/firewall/rules.conf b/install/rhel/7/firewall/rules.conf index d00a9900d..fba98e1e4 100644 --- a/install/rhel/7/firewall/rules.conf +++ b/install/rhel/7/firewall/rules.conf @@ -9,4 +9,3 @@ RULE='8' ACTION='ACCEPT' PROTOCOL='UDP' PORT='53' IP='0.0.0.0/0' COMMENT='DNS' S 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' - From a4be1eb035a7009aafcd57d660ac2fa4b5054d69 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Mon, 28 Dec 2015 10:12:02 -0500 Subject: [PATCH 038/229] update tw.php --- web/inc/i18n/tw.php | 652 -------------------------------------------- 1 file changed, 652 deletions(-) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index 879f42368..0b0f40fd4 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -1,476 +1,11 @@ '方案設定', - 'IP' => 'IP管理', - 'Graphs' => '資源使用圖表', - 'Statistics' => '統計資料', - 'Log' => '系統紀錄', - 'Services' => '服務', - 'Firewall' => '防火牆', - 'Updates' => '系統更新', - 'Log in' => '登入', - 'Log out' => '登出', - 'USER' => '使用者管理', - 'WEB' => '網站管理', - 'DNS' => 'DNS管理', - 'MAIL' => '信箱管理', - 'DB' => '資料庫', - 'CRON' => 'CRON', - 'BACKUP' => '備份', - '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' => '新增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' => '重建 Cron', - 'update counters' => '更新計數器', - 'suspend' => '封鎖', - 'unsuspend' => '解除封鎖', - 'delete' => '刪除', - 'show per user' => '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' => '列出登入失敗遭封鎖名單', - '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' => '編輯Cron Job', - 'Adding Cron Job' => '新增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' => 'Apache模板', - 'Proxy Template' => 'Nginx模板', - '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' => 'Cron Jobs', - 'SSH Access' => 'SSH權限', - 'IP Addresses' => 'IP位置', - 'Backups' => '備份', - 'Backup System' => '備份系統', - 'backup exclusions' => '備份例外', - 'template' => '模板', - 'SSL Support' => 'SSL支援', - 'SSL Home Directory' => 'SSL主目錄', - 'Proxy Support' => 'Nginx支援', - 'Proxy Extensions' => 'Nginx擴充', - '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' => 'Apache使用量', - 'NGINX Usage' => 'NGINX使用量', - 'MySQL Usage on localhost' => 'MySQL使用量 (localhost)', - 'PostgreSQL Usage on localhost' => 'PostgreSQL使用量 (localhost)', - 'Bandwidth Usage eth0' => '網路流量 (eth0)', - 'FTP Usage' => 'FTP使用量', - 'SSH Usage' => 'SSH使用量', - 'reverse proxy' => '反向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' => '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' => 'Cron Jobs', - 'backups' => '備份', - 'quota' => '配額', - 'day of week' => '星期幾', - 'cmd' => '指令', - 'users' => '使用者', - 'domains' => '網域', - 'aliases' => '次網域', - 'records' => '記錄', - 'jobs' => '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.記錄', - 'Download AccessLog' => '下載存取記錄', - 'Download ErrorLog' => '下載錯誤記錄', - 'Country' => '國家', - '2 letter code' => '國家簡碼(台灣是TW/香港是HK)', - 'State / Province' => '州 / 省', - 'City / Locality' => '市 / 地區', - 'Organization' => '組織名稱', - 'Action' => '動作', - 'Protocol' => 'Protocol', - 'Port' => 'Port', - 'Comment' => '備註', - 'Banlist' => '黑名單', - 'ranges are acceptable' => '可使用範圍(例如:21-22)', - 'CIDR format is supported' => '支援CIDR格式', - 'Add one more Name Server' => 'Add one more Name Server', - - '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 Cron Job', - '%s cron jobs' => '%s Cron Jobs', - '1 archive' => '1 archive', - '%s archives' => '%s archives', - '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 has been 已加入成功!', - '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' => 'Cron Job 已加入成功!', - 'IP_CREATED_OK' => 'IP位置 %s 已加入成功!', - 'PACKAGE_CREATED_OK' => '方案 %s 已加入成功!', - 'SSL_GENERATED_OK' => 'SSL證書 已加入成功!', - 'RULE_CREATED_OK' => 'Rule 已加入成功!', - '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 電子郵件回報已成功關閉', - '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' => '確定要刪除 Cron Job嗎?', - 'SUSPEND_CRON_CONFIRMATION' => '確定要封鎖 Cron Job嗎?', - 'UNSUSPEND_CRON_CONFIRMATION' => '確定要解除封鎖 Cron Job嗎?', - '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 嗎?', - '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' => "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", - '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_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_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', -); - -/** - * Vesta language file - * 吳汝剛 (ak6783@gmail.com) ->>>>>>> serghey-rodin/master */ $LANG['tw'] = array( 'Packages' => '方案設定', @@ -820,7 +355,6 @@ $LANG['tw'] = array( 'City / Locality' => '市 / 地區', 'Organization' => '組織名稱', 'Action' => '動作', -<<<<<<< HEAD 'Protocol' => '協議', 'Port' => '端口', 'Comment' => '備註', @@ -828,16 +362,6 @@ $LANG['tw'] = array( 'ranges are acceptable' => '可使用範圍(例如:21-22)', 'CIDR format is supported' => '支援CIDR格式', 'Add one more Name Server' => '新增域名服務器', -======= - 'Protocol' => '通訊協定', - 'Port' => '連接埠', - 'Comment' => '註解', - 'Banlist' => '封鎖清單', - 'ranges are acceptable' => '可使用範圍', - 'CIDR format is supported' => 'CIDR 格式是支援的', - 'Add one more Name Server' => 'Add one more Name Server', ->>>>>>> serghey-rodin/master - '1 account' => '1 帳號', '%s accounts' => '%s 帳號', '1 domain' => '1 網域', @@ -865,7 +389,6 @@ $LANG['tw'] = array( 'no exclusions' => '取消排除', '1 rule' => '1 規則', '%s rules' => '%s 規則', -<<<<<<< HEAD 'There are no currently banned IP' => '目前沒有任何已封鎖的IP', 'USER_CREATED_OK' => '使用者 %s has been 已加入成功!', 'WEB_DOMAIN_CREATED_OK' => '網域 %s 已加入成功!', @@ -911,55 +434,6 @@ $LANG['tw'] = array( 'SUSPEND_RULE_CONFIRMATION' => '確定要封鎖規則 #%s 嗎?', 'UNSUSPEND_RULE_CONFIRMATION' => '確定要解除封鎖規則 #%s 嗎?', 'RESTART_CONFIRMATION' => '確定要重新啟動 %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 嗎?', ->>>>>>> serghey-rodin/master 'Welcome' => '歡迎', 'LOGGED_IN_AS' => '以使用者身份 %s 登入', 'Error' => '錯誤', @@ -1001,7 +475,6 @@ $LANG['tw'] = array( '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", - 'Jan' => '1月', 'Feb' => '2月', 'Mar' => '3月', @@ -1014,7 +487,6 @@ $LANG['tw'] = array( 'Oct' => '10月', 'Nov' => '11月', 'Dec' => '12月', - 'Configuring Server' => '配置主機', 'Hostname' => '主機名稱', 'Time Zone' => '時區', @@ -1028,12 +500,10 @@ $LANG['tw'] = array( 'Backup Migration Manager' => '備份轉移管理器', 'FileManager' => '檔案管理器', 'show: CPU / MEM / NET / DISK' => '顯示: 處理器 / 記憶體 / 網路 / 硬碟', - 'sort by' => '排序按照', 'Date' => '日期', 'Starred' => '加註星號', 'Name' => '名稱', - 'File Manager' => '檔案管理器', 'type' => '類型', 'size' => '大小', @@ -1077,7 +547,6 @@ $LANG['tw'] = array( 'already exists' => '已經存在', 'Create file' => '新增檔案', 'Create directory' => '新增資料夾', - 'Add New object' => '新增', 'Save Form' => '儲存設定', 'Cancel saving form' => '不要儲存設定', @@ -1093,7 +562,6 @@ $LANG['tw'] = array( 'Move backward through top menu' => '在頂置選單中向左移動', 'Move forward through top menu' => '在頂置選單中向右移動', 'Enter focused element' => '進去選擇的選項', - 'Upload' => '上傳', 'New File' => '新增檔案', 'New Folder' => '新增資料夾', @@ -1121,8 +589,6 @@ $LANG['tw'] = array( 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => '快捷鍵是的想法是由 magnificent GNU Midnight Commander 檔案管理器 啟發的', 'Save' => '儲存', - -<<<<<<< HEAD 'Licence Key' => '授權金鑰', 'Enter License Key' => '輸入授權金鑰', 'Buy Licence' => '購買授權', @@ -1133,122 +599,4 @@ $LANG['tw'] = array( '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.' => '這是一個付費模組,您需要購買授權金鑰才能啟動它。' -======= - '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', ->>>>>>> serghey-rodin/master - - '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', - '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', - - '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' => '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', - '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 From 2abad2edf02713cf3b9dde20f14a7783241ea01f Mon Sep 17 00:00:00 2001 From: MarPiRK Date: Mon, 28 Dec 2015 22:20:24 +0100 Subject: [PATCH 039/229] Updated Polish translation --- web/inc/i18n/pl.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/web/inc/i18n/pl.php b/web/inc/i18n/pl.php index 19483d664..4035c0854 100644 --- a/web/inc/i18n/pl.php +++ b/web/inc/i18n/pl.php @@ -588,15 +588,15 @@ $LANG['pl'] = array( '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.' ); From 6306461a7d4c29ac92a7eaf12182154295dbdad4 Mon Sep 17 00:00:00 2001 From: Joe M Date: Tue, 29 Dec 2015 07:39:36 -0500 Subject: [PATCH 040/229] Fix css issue for forgot password page. --- web/css/styles.min.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/css/styles.min.css b/web/css/styles.min.css index 3dae45c82..abab8cf04 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);*/ From 7fbeb1ef3c268c78c625d3f33a39786494e2ecab Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Thu, 7 Jan 2016 11:48:24 -0500 Subject: [PATCH 041/229] Update i18n.php --- web/inc/i18n.php | 725 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 616 insertions(+), 109 deletions(-) diff --git a/web/inc/i18n.php b/web/inc/i18n.php index 1dab4cae4..539801db7 100644 --- a/web/inc/i18n.php +++ b/web/inc/i18n.php @@ -1,112 +1,619 @@ 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 +$LANG['tw'] = array( + 'Packages' => '方案設定', + 'IP' => 'IP管理', + 'Graphs' => '資源使用圖表', + 'Statistics' => '統計資料', + 'Log' => '系統紀錄', + 'Services' => '服務', + 'Firewall' => '防火牆', + 'Server' => '伺服器', + 'Updates' => '系統更新', + 'Log in' => '登入', + 'Log out' => '登出', + 'USER' => '使用者管理', + 'WEB' => '網站管理', + 'DNS' => 'DNS管理', + 'MAIL' => '信箱管理', + 'DB' => '資料庫', + 'CRON' => '任務排程', + 'BACKUP' => '備份', + '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' => '列出登入失敗遭封鎖名單', + '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' => 'Apache模板', + 'Proxy Template' => 'Nginx模板', + 'DNS Template' => 'DNS模板', + 'Web Domains' => '網站網域', + 'SSL Domains' => 'SSL網域', + 'Web Aliases' => '網站次網域', + 'per domain' => '(每網域)', + 'DNS domains' => 'DNS網域', + 'DNS records' => 'DNS紀錄', + 'Name Servers' => '域名服務器', + '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' => 'Nginx支援', + 'Proxy Extensions' => 'Nginx擴充', + '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' => '記憶體使用量', + 'Bandwidth Usage p2p1' => '流量使用量 (p2p1)', + 'Bandwidth Usage ppp0' => '流量使用量 (ppp0)', + 'Bandwidth Usage ppp1' => '流量使用量 (ppp1)', + 'Bandwidth Usage eth0' => '流量使用量 (eth0)', + 'Bandwidth Usage eth1' => '流量使用量 (eth1)', + 'Bandwidth Usage sit0' => '流量使用量 (sit0)', + 'Bandwidth Usage sit1' => '流量使用量 (sit1)', + 'Bandwidth Usage he-ipv6' => '流量使用量 (he-ipv6)', + 'HTTPD Usage' => 'Apache使用量', + 'APACHE2 Usage' => 'Apache2使用量', + 'NGINX Usage' => 'NGINX使用量', + 'Exim Usage' => 'Exim使用量', + 'MySQL Usage on localhost' => 'MySQL使用量 (localhost)', + 'PostgreSQL Usage on localhost' => 'PostgreSQL使用量 (localhost)', + 'FTP Usage' => 'FTP使用量', + 'SSH Usage' => 'SSH使用量', + 'ACCEPT' => '允許', + 'DROP' => '封鎖', + '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' => '防止暴力破解', + 'LoadAverage' => '平均負載量', + 'CPU' => '處理器負載', + 'MEMORY' => '記憶體', + 'DISK' => '磁碟', + 'NETWORK' => '網路', + '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' => '預設域名服務器', + '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 將會自動加到使用者名稱', + 'Path' => '路徑', + 'Send FTP credentials to email' => '將FTP登入資料傳送到使用者信箱', + 'Expiration Date' => '到期日期', + 'YYYY-MM-DD' => 'YYYY-MM-DD', + 'Name servers' => '域名服務器', + '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記錄', + 'DNS Domains' => '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' => '最後70行的 %s.%s.記錄', + 'Download AccessLog' => '下載存取記錄', + 'Download ErrorLog' => '下載錯誤記錄', + 'Country' => '國家', + '2 letter code' => '國家簡碼(台灣是TW/香港是HK)', + 'State / Province' => '州 / 省', + 'City / Locality' => '市 / 地區', + 'Organization' => '組織名稱', + 'Action' => '動作', + 'Protocol' => '協議', + 'Port' => '端口', + 'Proxy Server' => '代理伺服器', + 'Web Server' => '網頁伺服器', + 'DNS Server' => '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' => '異地備份', + '' => '', + 'Comment' => '備註', + 'Banlist' => '黑名單', + 'ranges are acceptable' => '可使用範圍(例如:21-22)', + 'CIDR format is supported' => '支援CIDR格式', + 'Add one more Name Server' => '新增域名服務器', + '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 has been 已加入成功!', + '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' => 'Rule 已加入成功!', + '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' => '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 嗎?', + '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' => "輸入網域名稱,每行一個網域。如要排除備份所有網域請使用*。排除特定的資料夾請依照這個格式: 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_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_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", + 'Jan' => '1月', + 'Feb' => '2月', + 'Mar' => '3月', + 'Apr' => '4月', + 'May' => '5月', + 'Jun' => '6月', + 'Jul' => '7月', + 'Aug' => '8月', + 'Sep' => '9月', + 'Oct' => '10月', + 'Nov' => '11月', + 'Dec' => '12月', + 'Configuring Server' => '配置主機', + 'Hostname' => '主機名稱', + 'Time Zone' => '時區', + 'Default Language' => '預設語言', + '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' => '顯示: 處理器 / 記憶體 / 網路 / 硬碟', + 'sort by' => '排序按照', + 'Date' => '日期', + 'Starred' => '加註星號', + 'Name' => '名稱', + 'File Manager' => '檔案管理器', + 'type' => '類型', + 'size' => '大小', + 'date' => '日期', + 'name' => '名稱', + 'Initializing' => '正在初始化', + 'UPLOAD' => '上傳', + 'NEW FILE' => '新增檔案', + 'NEW DIR' => '新增資料夾', + 'DELETE' => '刪除', + 'RENAME' => '重新命名', + 'COPY' => '複製', + 'ARCHIVE' => '壓縮', + 'EXTRACT' => '解壓縮', + 'DOWNLOAD' => '下載', + 'Hit' => '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' => '壓縮', + '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' => '新增資料夾', + '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' => '進去選擇的選項', + 'Upload' => '上傳', + 'New File' => '新增檔案', + 'New Folder' => '新增資料夾', + 'Download' => '下載', + 'Rename' => '重新命名', + 'Copy' => '複製', + 'Archive' => '壓縮', + 'Delete' => '刪除', + 'Shortcuts' => '快捷鍵', + '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' => + '快捷鍵是的想法是由 magnificent GNU Midnight Commander 檔案管理器 啟發的', + 'Save' => '儲存', + '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.' => '這是一個付費模組,您需要購買授權金鑰才能啟動它。' +); From 94e439b5d7c761e24659b9d4c687db12ddc3fad9 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Thu, 7 Jan 2016 11:50:32 -0500 Subject: [PATCH 042/229] Update i18n.php --- web/inc/i18n.php | 711 +++++++---------------------------------------- 1 file changed, 95 insertions(+), 616 deletions(-) diff --git a/web/inc/i18n.php b/web/inc/i18n.php index 539801db7..7c746ea1c 100644 --- a/web/inc/i18n.php +++ b/web/inc/i18n.php @@ -1,619 +1,98 @@ '方案設定', - 'IP' => 'IP管理', - 'Graphs' => '資源使用圖表', - 'Statistics' => '統計資料', - 'Log' => '系統紀錄', - 'Services' => '服務', - 'Firewall' => '防火牆', - 'Server' => '伺服器', - 'Updates' => '系統更新', - 'Log in' => '登入', - 'Log out' => '登出', - 'USER' => '使用者管理', - 'WEB' => '網站管理', - 'DNS' => 'DNS管理', - 'MAIL' => '信箱管理', - 'DB' => '資料庫', - 'CRON' => '任務排程', - 'BACKUP' => '備份', - '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' => '列出登入失敗遭封鎖名單', - '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' => 'Apache模板', - 'Proxy Template' => 'Nginx模板', - 'DNS Template' => 'DNS模板', - 'Web Domains' => '網站網域', - 'SSL Domains' => 'SSL網域', - 'Web Aliases' => '網站次網域', - 'per domain' => '(每網域)', - 'DNS domains' => 'DNS網域', - 'DNS records' => 'DNS紀錄', - 'Name Servers' => '域名服務器', - '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' => 'Nginx支援', - 'Proxy Extensions' => 'Nginx擴充', - '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' => '記憶體使用量', - 'Bandwidth Usage p2p1' => '流量使用量 (p2p1)', - 'Bandwidth Usage ppp0' => '流量使用量 (ppp0)', - 'Bandwidth Usage ppp1' => '流量使用量 (ppp1)', - 'Bandwidth Usage eth0' => '流量使用量 (eth0)', - 'Bandwidth Usage eth1' => '流量使用量 (eth1)', - 'Bandwidth Usage sit0' => '流量使用量 (sit0)', - 'Bandwidth Usage sit1' => '流量使用量 (sit1)', - 'Bandwidth Usage he-ipv6' => '流量使用量 (he-ipv6)', - 'HTTPD Usage' => 'Apache使用量', - 'APACHE2 Usage' => 'Apache2使用量', - 'NGINX Usage' => 'NGINX使用量', - 'Exim Usage' => 'Exim使用量', - 'MySQL Usage on localhost' => 'MySQL使用量 (localhost)', - 'PostgreSQL Usage on localhost' => 'PostgreSQL使用量 (localhost)', - 'FTP Usage' => 'FTP使用量', - 'SSH Usage' => 'SSH使用量', - 'ACCEPT' => '允許', - 'DROP' => '封鎖', - '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' => '防止暴力破解', - 'LoadAverage' => '平均負載量', - 'CPU' => '處理器負載', - 'MEMORY' => '記憶體', - 'DISK' => '磁碟', - 'NETWORK' => '網路', - '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' => '預設域名服務器', - '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 將會自動加到使用者名稱', - 'Path' => '路徑', - 'Send FTP credentials to email' => '將FTP登入資料傳送到使用者信箱', - 'Expiration Date' => '到期日期', - 'YYYY-MM-DD' => 'YYYY-MM-DD', - 'Name servers' => '域名服務器', - '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記錄', - 'DNS Domains' => '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' => '最後70行的 %s.%s.記錄', - 'Download AccessLog' => '下載存取記錄', - 'Download ErrorLog' => '下載錯誤記錄', - 'Country' => '國家', - '2 letter code' => '國家簡碼(台灣是TW/香港是HK)', - 'State / Province' => '州 / 省', - 'City / Locality' => '市 / 地區', - 'Organization' => '組織名稱', - 'Action' => '動作', - 'Protocol' => '協議', - 'Port' => '端口', - 'Proxy Server' => '代理伺服器', - 'Web Server' => '網頁伺服器', - 'DNS Server' => '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' => '異地備份', - '' => '', - 'Comment' => '備註', - 'Banlist' => '黑名單', - 'ranges are acceptable' => '可使用範圍(例如:21-22)', - 'CIDR format is supported' => '支援CIDR格式', - 'Add one more Name Server' => '新增域名服務器', - '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 has been 已加入成功!', - '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' => 'Rule 已加入成功!', - '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' => '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 嗎?', - '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' => "輸入網域名稱,每行一個網域。如要排除備份所有網域請使用*。排除特定的資料夾請依照這個格式: 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_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_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", - 'Jan' => '1月', - 'Feb' => '2月', - 'Mar' => '3月', - 'Apr' => '4月', - 'May' => '5月', - 'Jun' => '6月', - 'Jul' => '7月', - 'Aug' => '8月', - 'Sep' => '9月', - 'Oct' => '10月', - 'Nov' => '11月', - 'Dec' => '12月', - 'Configuring Server' => '配置主機', - 'Hostname' => '主機名稱', - 'Time Zone' => '時區', - 'Default Language' => '預設語言', - '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' => '顯示: 處理器 / 記憶體 / 網路 / 硬碟', - 'sort by' => '排序按照', - 'Date' => '日期', - 'Starred' => '加註星號', - 'Name' => '名稱', - 'File Manager' => '檔案管理器', - 'type' => '類型', - 'size' => '大小', - 'date' => '日期', - 'name' => '名稱', - 'Initializing' => '正在初始化', - 'UPLOAD' => '上傳', - 'NEW FILE' => '新增檔案', - 'NEW DIR' => '新增資料夾', - 'DELETE' => '刪除', - 'RENAME' => '重新命名', - 'COPY' => '複製', - 'ARCHIVE' => '壓縮', - 'EXTRACT' => '解壓縮', - 'DOWNLOAD' => '下載', - 'Hit' => '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' => '壓縮', - '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' => '新增資料夾', - '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' => '進去選擇的選項', - 'Upload' => '上傳', - 'New File' => '新增檔案', - 'New Folder' => '新增資料夾', - 'Download' => '下載', - 'Rename' => '重新命名', - 'Copy' => '複製', - 'Archive' => '壓縮', - 'Delete' => '刪除', - 'Shortcuts' => '快捷鍵', - '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' => - '快捷鍵是的想法是由 magnificent GNU Midnight Commander 檔案管理器 啟發的', - 'Save' => '儲存', - '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.' => '這是一個付費模組,您需要購買授權金鑰才能啟動它。' -); +function _translate() { + global $LANG; + $args = func_get_args(); + $l = $args[0]; + if (!$l) return 'NO LANGUAGE DEFINED'; + $key = $args[1]; + if (!isset($LANG[$l])) { + require_once($_SERVER['DOCUMENT_ROOT'].'/inc/i18n/'.$l.'.php'); + } + if (!isset($LANG[$l][$key])) { + $text=$key; + } else { + $text=$LANG[$l][$key]; + } + array_shift($args); + if (count($args)>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; +} From a1ebeedd58c07f5bb1a3b631bb4daf1518abc1b3 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Thu, 7 Jan 2016 11:50:59 -0500 Subject: [PATCH 043/229] Update tw.php --- web/inc/i18n/tw.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index 0b0f40fd4..6f1a1c3b6 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -357,6 +357,23 @@ $LANG['tw'] = array( 'Action' => '動作', 'Protocol' => '協議', 'Port' => '端口', + 'Proxy Server' => '代理伺服器', + 'Web Server' => '網頁伺服器', + 'DNS Server' => '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' => '異地備份', + '' => '', 'Comment' => '備註', 'Banlist' => '黑名單', 'ranges are acceptable' => '可使用範圍(例如:21-22)', @@ -596,7 +613,7 @@ $LANG['tw'] = array( '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.' => '瀏覽、複製、編輯、取得你所有的網站資料使用全能的檔案管理器', + '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 +); From aa16839ead200b57e6b1da9dfe2e9dd4fccd2bb3 Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Sat, 9 Jan 2016 23:24:53 +0200 Subject: [PATCH 044/229] Update ru.php --- web/inc/i18n/ru.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/inc/i18n/ru.php b/web/inc/i18n/ru.php index 4e26d8e46..3f0e7f993 100644 --- a/web/inc/i18n/ru.php +++ b/web/inc/i18n/ru.php @@ -575,7 +575,7 @@ $LANG['ru'] = array( 'Delete' => 'Удалить', 'Save File (in text editor)' => 'Сохранить Файл (в рамках текстового редактора)', 'Close Popup / Cancel' => 'Закрыть Попап / Отмена', - 'Move Cursor Up' => 'Переемстить курсор вверх', + 'Move Cursor Up' => 'Переместить курсор вверх', 'Move Cursor Dow' => 'Переместить курсор вниз', 'Switch to Left Tab' => 'Переключиться на таб слева', 'Switch to Right Tab' => 'Переключиться на таб справа', @@ -602,4 +602,4 @@ $LANG['ru'] = array( '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.' => 'Это коммерческий модуль, чтобы включить его, вам необходимо приобрести лицензию.' -); \ No newline at end of file +); From 14cd546222a4c0560967cffdcb2338809d7d047c Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:44:06 +0200 Subject: [PATCH 045/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/debian/8/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/debian/8/nginx/nginx.conf b/install/debian/8/nginx/nginx.conf index 1e29f1fce..ca6929592 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; From e2a7eb0113447efd6f6171cf723a63a8a4c3a7cd Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:45:29 +0200 Subject: [PATCH 046/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/debian/7/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/debian/7/nginx/nginx.conf b/install/debian/7/nginx/nginx.conf index 1e29f1fce..ca6929592 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; From 62d337e87d081b54032932d4115430c171af1f64 Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:46:30 +0200 Subject: [PATCH 047/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/rhel/5/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/rhel/5/nginx/nginx.conf b/install/rhel/5/nginx/nginx.conf index 1b953c01a..f64919fd0 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; From 1a0387b183a246c318d09af2c6428362b5f59571 Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:47:16 +0200 Subject: [PATCH 048/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/rhel/6/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/rhel/6/nginx/nginx.conf b/install/rhel/6/nginx/nginx.conf index 1b953c01a..f64919fd0 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; From 576e50c2c99199243404b59f3d24bd0bb51773b1 Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:48:11 +0200 Subject: [PATCH 049/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/rhel/7/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/rhel/7/nginx/nginx.conf b/install/rhel/7/nginx/nginx.conf index 1b953c01a..f64919fd0 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; From 50d1484a7ce921abd4efa85da1f3c0f7dec5bdce Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:49:46 +0200 Subject: [PATCH 050/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/ubuntu/12.04/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/ubuntu/12.04/nginx/nginx.conf b/install/ubuntu/12.04/nginx/nginx.conf index 1e29f1fce..ca6929592 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; From ffde0fd730b753c259c366022ffa754511ea4051 Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:50:46 +0200 Subject: [PATCH 051/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/ubuntu/12.10/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/ubuntu/12.10/nginx/nginx.conf b/install/ubuntu/12.10/nginx/nginx.conf index 1e29f1fce..ca6929592 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; From 115a7afa6a2e37dd67b3c0d449aeea286820a515 Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:51:39 +0200 Subject: [PATCH 052/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/ubuntu/13.04/nginx/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/ubuntu/13.04/nginx/nginx.conf b/install/ubuntu/13.04/nginx/nginx.conf index 1e29f1fce..828b028df 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; From 7bc7c44931800dc3bb9bc938d2d818e4f7340093 Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:52:39 +0200 Subject: [PATCH 053/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/ubuntu/13.10/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/ubuntu/13.10/nginx/nginx.conf b/install/ubuntu/13.10/nginx/nginx.conf index 1e29f1fce..ca6929592 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; From cdfca212e84671f1ba4480c75ed995701a685122 Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:53:39 +0200 Subject: [PATCH 054/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/ubuntu/14.04/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/ubuntu/14.04/nginx/nginx.conf b/install/ubuntu/14.04/nginx/nginx.conf index 1e29f1fce..ca6929592 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; From e956cdf1dbeac3d9d4fa25a7e46a8d454c718d3c Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:54:23 +0200 Subject: [PATCH 055/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/ubuntu/14.10/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/ubuntu/14.10/nginx/nginx.conf b/install/ubuntu/14.10/nginx/nginx.conf index 1e29f1fce..ca6929592 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; From 42f8d4dacd3d518a021d5042b17eca92c4a0f233 Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:55:18 +0200 Subject: [PATCH 056/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/ubuntu/15.04/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/ubuntu/15.04/nginx/nginx.conf b/install/ubuntu/15.04/nginx/nginx.conf index 1e29f1fce..ca6929592 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; From 9f127afa1f0e10e37de6c3880b2523b88514d6ab Mon Sep 17 00:00:00 2001 From: Olexandr Loskutov Date: Wed, 13 Jan 2016 00:56:01 +0200 Subject: [PATCH 057/229] Update nginx.conf Add more gzip_types https://forum.vestacp.com/viewtopic.php?f=29&t=5100#p20750 --- install/ubuntu/15.10/nginx/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/ubuntu/15.10/nginx/nginx.conf b/install/ubuntu/15.10/nginx/nginx.conf index 1e29f1fce..ca6929592 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; From 3b2f499e7fd0f43aaddf1317459419700ccdf701 Mon Sep 17 00:00:00 2001 From: Joe Mattos Date: Fri, 15 Jan 2016 06:06:05 -0500 Subject: [PATCH 058/229] Fixed incorrect variables for PostgreSQL Support --- web/edit/server/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/edit/server/index.php b/web/edit/server/index.php index a47056991..073dc97b3 100644 --- a/web/edit/server/index.php +++ b/web/edit/server/index.php @@ -59,7 +59,7 @@ 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_pgsql = 'yes'; } // List backup settings @@ -207,7 +207,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); From ec7994a402db48844b01964a2a57c19acff83708 Mon Sep 17 00:00:00 2001 From: teryanik Date: Wed, 20 Jan 2016 11:03:49 +0300 Subject: [PATCH 059/229] Fix bug with "user already exists" --- bin/v-add-user | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-add-user b/bin/v-add-user index 35424381b..dd73e870f 100755 --- a/bin/v-add-user +++ b/bin/v-add-user @@ -22,7 +22,7 @@ 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" From f95af89939fb8b66ab5e4e2633d3e74a833664ee Mon Sep 17 00:00:00 2001 From: dpeca Date: Sun, 31 Jan 2016 03:47:30 +0100 Subject: [PATCH 060/229] Update vesta.php New version of roundcube 'password' plugin is expecting class instead of function. --- install/debian/8/roundcube/vesta.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/debian/8/roundcube/vesta.php b/install/debian/8/roundcube/vesta.php index 8fb202a44..db31d89a3 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'); @@ -60,3 +60,4 @@ } } +} From 7d2b34193f7648ffe967695671b0f5dc7c4f7145 Mon Sep 17 00:00:00 2001 From: atonit Date: Sun, 31 Jan 2016 16:48:24 +0000 Subject: [PATCH 061/229] updated exim to exim4 directory in localuser_fwd_only debian ubuntu --- install/debian/7/exim/exim4.conf.template | 2 +- install/debian/8/exim/exim4.conf.template | 2 +- install/ubuntu/12.04/exim/exim4.conf.template | 2 +- install/ubuntu/12.10/exim/exim4.conf.template | 2 +- install/ubuntu/13.04/exim/exim4.conf.template | 2 +- install/ubuntu/13.10/exim/exim4.conf.template | 2 +- install/ubuntu/14.04/exim/exim4.conf.template | 2 +- install/ubuntu/14.10/exim/exim4.conf.template | 2 +- install/ubuntu/15.04/exim/exim4.conf.template | 2 +- install/ubuntu/15.10/exim/exim4.conf.template | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/install/debian/7/exim/exim4.conf.template b/install/debian/7/exim/exim4.conf.template index 742f0409e..6d9c51191 100644 --- a/install/debian/7/exim/exim4.conf.template +++ b/install/debian/7/exim/exim4.conf.template @@ -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/exim/exim4.conf.template b/install/debian/8/exim/exim4.conf.template index 742f0409e..6d9c51191 100644 --- a/install/debian/8/exim/exim4.conf.template +++ b/install/debian/8/exim/exim4.conf.template @@ -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/exim/exim4.conf.template b/install/ubuntu/12.04/exim/exim4.conf.template index 742f0409e..6d9c51191 100644 --- a/install/ubuntu/12.04/exim/exim4.conf.template +++ b/install/ubuntu/12.04/exim/exim4.conf.template @@ -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/exim/exim4.conf.template b/install/ubuntu/12.10/exim/exim4.conf.template index 742f0409e..6d9c51191 100644 --- a/install/ubuntu/12.10/exim/exim4.conf.template +++ b/install/ubuntu/12.10/exim/exim4.conf.template @@ -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/exim/exim4.conf.template b/install/ubuntu/13.04/exim/exim4.conf.template index 742f0409e..6d9c51191 100644 --- a/install/ubuntu/13.04/exim/exim4.conf.template +++ b/install/ubuntu/13.04/exim/exim4.conf.template @@ -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/exim/exim4.conf.template b/install/ubuntu/13.10/exim/exim4.conf.template index 742f0409e..6d9c51191 100644 --- a/install/ubuntu/13.10/exim/exim4.conf.template +++ b/install/ubuntu/13.10/exim/exim4.conf.template @@ -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/exim/exim4.conf.template b/install/ubuntu/14.04/exim/exim4.conf.template index 742f0409e..6d9c51191 100644 --- a/install/ubuntu/14.04/exim/exim4.conf.template +++ b/install/ubuntu/14.04/exim/exim4.conf.template @@ -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/exim/exim4.conf.template b/install/ubuntu/14.10/exim/exim4.conf.template index 742f0409e..6d9c51191 100644 --- a/install/ubuntu/14.10/exim/exim4.conf.template +++ b/install/ubuntu/14.10/exim/exim4.conf.template @@ -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/exim/exim4.conf.template b/install/ubuntu/15.04/exim/exim4.conf.template index 742f0409e..6d9c51191 100644 --- a/install/ubuntu/15.04/exim/exim4.conf.template +++ b/install/ubuntu/15.04/exim/exim4.conf.template @@ -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/exim/exim4.conf.template b/install/ubuntu/15.10/exim/exim4.conf.template index 742f0409e..6d9c51191 100644 --- a/install/ubuntu/15.10/exim/exim4.conf.template +++ b/install/ubuntu/15.10/exim/exim4.conf.template @@ -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 From e58e36ce78b1260a1b9e653f9b8469d3fa8ec615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hedy=20Darg=C3=A8re?= Date: Thu, 4 Feb 2016 23:52:48 +0100 Subject: [PATCH 062/229] More terms translated in french --- web/inc/i18n/fr.php | 182 ++++++++++++++++++++++---------------------- 1 file changed, 91 insertions(+), 91 deletions(-) diff --git a/web/inc/i18n/fr.php b/web/inc/i18n/fr.php index 7772ba06e..b291d2e65 100644 --- a/web/inc/i18n/fr.php +++ b/web/inc/i18n/fr.php @@ -29,7 +29,7 @@ $LANG['fr'] = array( '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 +53,7 @@ $LANG['fr'] = array( 'Save' => 'Sauvegarde', 'Submit' => 'Envoyer', - 'toggle all' => 'selectionner tout', + 'toggle all' => 'sélectionner tout', 'apply to selected' => 'appliquer à la sélection', 'rebuild' => 'recréer', 'rebuild web' => 'recréer web', @@ -94,31 +94,31 @@ $LANG['fr'] = array( 'turn off notifications' => 'désactiver les notifications', 'Adding User' => 'Ajout d\'un Utilisateur', - 'Editing User' => 'Edition d\'un Utilisateur', + 'Editing User' => 'Édition d\'un Utilisateur', 'Adding Domain' => 'Ajout d\'un Domaine', - 'Editing Domain' => 'Edition d\'un Domaine', + 'Editing Domain' => 'Édition d\'un Domaine', 'Adding DNS Domain' => 'Ajout d\'un Domaine DNS', - 'Editing DNS Domain' => 'Edition d\'un Domaine DNS', + 'Editing DNS Domain' => 'Édition d\'un Domaine DNS', 'Adding DNS Record' => 'Ajout d\'un Enregistrement DNS', - 'Editing DNS Record' => 'Edition d\'un Enregistrement DNS', + 'Editing DNS Record' => 'Édition d\'un Enregistrement DNS', 'Adding Mail Domain' => 'Ajout d\'un Domaine Mail', - 'Editing Mail Domain' => 'Edition d\'un Domaine Mail', + 'Editing Mail Domain' => 'Édition d\'un Domaine Mail', 'Adding Mail Account' => 'Ajout d\'un Compte Mail', - 'Editing Mail Account' => 'Edition d\'un Compte Mail', + 'Editing Mail Account' => 'Édition d\'un Compte Mail', 'Adding database' => 'Ajout d\'une base de données', - 'Editing Cron Job' => 'Edition d\'une tâche Cron', + 'Editing Cron Job' => 'Édition d\'une tâche Cron', 'Adding Cron Job' => 'Ajout d\'une tâche Cron', - 'Editing Database' => 'Edition d\'une base de données', + 'Editing Database' => 'Édition d\'une base de données', 'Adding Package' => 'Ajout d\'un Paquet', - 'Editing Package' => 'Edition d\'un Paquet', + 'Editing Package' => 'Édition 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', + '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', + 'Editing Firewall Rule' => 'Édition d\'une règle de pare-feu', 'Adding IP Address to Banlist' => 'Ajout d\'une adresse IP', 'active' => 'actif', @@ -349,9 +349,9 @@ $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', + 'Add one more Name Server' => 'Ajouter un autre Serveur de Noms', - 'unlimited' => 'unlimited', + 'unlimited' => 'illimité', '1 account' => '1 compte', '%s accounts' => '%s comptes', '1 domain' => '1 domaine', @@ -424,7 +424,7 @@ $LANG['fr'] = array( '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', @@ -474,52 +474,52 @@ $LANG['fr'] = array( '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', + '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' => 'Gestionnaire de 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', + 'File Manager' => 'Gestionnaire de Fichiers', 'type' => 'type', - 'size' => 'size', + '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' => 'NOUVEAU FICHIER', + 'NEW DIR' => 'NOUVEAU RÉP.', + 'DELETE' => 'SUPPR', + 'RENAME' => 'RENOMMER', + 'COPY' => 'COPIER', + 'ARCHIVE' => 'ARCHIVER', + 'EXTRACT' => 'EXTRAIRE', + 'DOWNLOAD' => 'TÉLÉCHARGER', 'Hit' => 'Hit', 'to reload the page' => 'to reload the page', 'Directory name cannot be empty' => 'Directory name cannot be empty', @@ -530,51 +530,51 @@ $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', + 'Delete' => 'Supprimer', + 'Extract' => 'Extraire', + 'Create' => 'Créer', + 'Compress' => 'Compresser', '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', + 'Original name' => 'Nom original', + 'File' => 'Fichier', + 'already exists' => 'existe déjà', + 'Create file' => 'Créer fichier', + 'Create directory' => 'Créer répertoire', - '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', + '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', - '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', + 'Rename' => 'Renommer', + 'Copy' => 'Copier', + 'Archive' => 'Archiver', + 'Delete' => 'Supprimer', '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', 'Switch to Left Tab' => 'Switch to Left Tab', @@ -588,16 +588,16 @@ $LANG['fr'] = array( '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' => '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.' From d2e01fab7613cef8698454f120d1475524334c26 Mon Sep 17 00:00:00 2001 From: phre4k Date: Tue, 9 Feb 2016 22:30:42 +0100 Subject: [PATCH 063/229] added check for web server type in SSL config, closes #626 --- bin/v-add-web-domain-ssl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/v-add-web-domain-ssl b/bin/v-add-web-domain-ssl index 72767e772..4ed702897 100755 --- a/bin/v-add-web-domain-ssl +++ b/bin/v-add-web-domain-ssl @@ -90,11 +90,15 @@ if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh ]; then $user $domain $ip $HOMEDIR $sdocroot fi -# Checking web config +# Checking web config include web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf" -if [ -z "$(grep "$conf" $web_conf)" ]; then +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 proxy if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then From 64068699c0bdc839499fc974e14a83cdfae4b506 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Fri, 12 Feb 2016 13:37:43 -0500 Subject: [PATCH 064/229] Update tw.php --- web/inc/i18n/tw.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index 6f1a1c3b6..062cf5bd7 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -339,7 +339,7 @@ $LANG['tw'] = array( 'first name' => '名字', 'last name' => '姓氏', 'account' => '帳號', - 'ssl certificate' => 'SSL 證書', + 'ssl certificate' => 'SSL 憑證', 'ssl key' => 'SSL密鑰', 'stats user password' => '統計使用者帳號密碼', 'stats username' => '統計使用者名稱', @@ -373,7 +373,6 @@ $LANG['tw'] = array( 'Compression level' => '壓縮程度', 'Directory' => '路徑', 'Remote backup' => '異地備份', - '' => '', 'Comment' => '備註', 'Banlist' => '黑名單', 'ranges are acceptable' => '可使用範圍(例如:21-22)', @@ -417,7 +416,7 @@ $LANG['tw'] = array( 'CRON_CREATED_OK' => '任務排程 已加入成功!', 'IP_CREATED_OK' => 'IP位置 %s 已加入成功!', 'PACKAGE_CREATED_OK' => '方案 %s 已加入成功!', - 'SSL_GENERATED_OK' => 'SSL證書 已加入成功!', + 'SSL_GENERATED_OK' => 'SSL憑證 已加入成功!', 'RULE_CREATED_OK' => 'Rule 已加入成功!', 'Autoupdate has been successfully enabled' => '自動更新已成功啟動', 'Autoupdate has been successfully disabled' => '自動更新已成功關閉', @@ -604,7 +603,7 @@ $LANG['tw'] = array( 'Add File to the Current Selection' => '增加檔案到已選取的列表', 'Select All Files' => '選取所有檔案', 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => - '快捷鍵是的想法是由 magnificent GNU Midnight Commander 檔案管理器 啟發的', + "快捷鍵是的想法是由 magnificent GNU Midnight Commander 檔案管理器 啟發的
繁體中文翻譯是由 Clark's 虛擬主機服務 總工程師 Clark Chen 提供。", 'Save' => '儲存', 'Licence Key' => '授權金鑰', 'Enter License Key' => '輸入授權金鑰', From cf532e0ee39262d88cfb03db3667aa37d1553490 Mon Sep 17 00:00:00 2001 From: Phinitnan Chanasabaeng Date: Sat, 13 Feb 2016 15:40:34 +0700 Subject: [PATCH 065/229] Separates nginx's Drupal 6 & 7 template --- .../web/nginx/php5-fpm/drupal6.stpl} | 7 +- .../templates/web/nginx/php5-fpm/drupal6.tpl} | 7 +- .../templates/web/nginx/php5-fpm/drupal7.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.tpl | 93 ++++++++++++++++ .../web/nginx/php5-fpm/drupal6.stpl} | 7 +- .../php5-fpm/{drupal.tpl => drupal6.tpl} | 7 +- .../templates/web/nginx/php5-fpm/drupal7.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.tpl | 93 ++++++++++++++++ .../php-fpm/{drupal.stpl => drupal6.stpl} | 7 +- .../templates/web/nginx/php-fpm/drupal6.tpl} | 7 +- .../templates/web/nginx/php-fpm/drupal7.stpl | 96 +++++++++++++++++ .../5/templates/web/nginx/php-fpm/drupal7.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php-fpm/drupal6.stpl} | 7 +- .../templates/web/nginx/php-fpm/drupal6.tpl} | 7 +- .../templates/web/nginx/php-fpm/drupal7.stpl | 96 +++++++++++++++++ .../6/templates/web/nginx/php-fpm/drupal7.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php-fpm/drupal6.stpl | 96 +++++++++++++++++ .../7/templates/web/nginx/php-fpm/drupal6.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php-fpm/drupal7.stpl | 96 +++++++++++++++++ .../7/templates/web/nginx/php-fpm/drupal7.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal.stpl | 101 ------------------ .../templates/web/nginx/php5-fpm/drupal.tpl | 98 ----------------- .../templates/web/nginx/php5-fpm/drupal6.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal6.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal.stpl | 101 ------------------ .../templates/web/nginx/php5-fpm/drupal.tpl | 98 ----------------- .../templates/web/nginx/php5-fpm/drupal6.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal6.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal.stpl | 101 ------------------ .../templates/web/nginx/php5-fpm/drupal.tpl | 98 ----------------- .../templates/web/nginx/php5-fpm/drupal6.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal6.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal.stpl | 101 ------------------ .../templates/web/nginx/php5-fpm/drupal.tpl | 98 ----------------- .../templates/web/nginx/php5-fpm/drupal6.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal6.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal.stpl | 101 ------------------ .../templates/web/nginx/php5-fpm/drupal.tpl | 98 ----------------- .../templates/web/nginx/php5-fpm/drupal6.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal6.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal.stpl | 101 ------------------ .../templates/web/nginx/php5-fpm/drupal.tpl | 98 ----------------- .../templates/web/nginx/php5-fpm/drupal6.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal6.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal.stpl | 101 ------------------ .../templates/web/nginx/php5-fpm/drupal.tpl | 98 ----------------- .../templates/web/nginx/php5-fpm/drupal6.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal6.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal.stpl | 101 ------------------ .../templates/web/nginx/php5-fpm/drupal.tpl | 98 ----------------- .../templates/web/nginx/php5-fpm/drupal6.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal6.tpl | 93 ++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.stpl | 96 +++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal7.tpl | 93 ++++++++++++++++ 68 files changed, 4166 insertions(+), 1640 deletions(-) rename install/debian/{8/templates/web/nginx/php5-fpm/drupal.stpl => 7/templates/web/nginx/php5-fpm/drupal6.stpl} (92%) rename install/{rhel/6/templates/web/nginx/php-fpm/drupal.tpl => debian/7/templates/web/nginx/php5-fpm/drupal6.tpl} (92%) create mode 100644 install/debian/7/templates/web/nginx/php5-fpm/drupal7.stpl create mode 100644 install/debian/7/templates/web/nginx/php5-fpm/drupal7.tpl rename install/{rhel/6/templates/web/nginx/php-fpm/drupal.stpl => debian/8/templates/web/nginx/php5-fpm/drupal6.stpl} (92%) rename install/debian/8/templates/web/nginx/php5-fpm/{drupal.tpl => drupal6.tpl} (92%) create mode 100644 install/debian/8/templates/web/nginx/php5-fpm/drupal7.stpl create mode 100644 install/debian/8/templates/web/nginx/php5-fpm/drupal7.tpl rename install/rhel/5/templates/web/nginx/php-fpm/{drupal.stpl => drupal6.stpl} (92%) rename install/rhel/{7/templates/web/nginx/php-fpm/drupal.tpl => 5/templates/web/nginx/php-fpm/drupal6.tpl} (92%) create mode 100644 install/rhel/5/templates/web/nginx/php-fpm/drupal7.stpl create mode 100644 install/rhel/5/templates/web/nginx/php-fpm/drupal7.tpl rename install/rhel/{7/templates/web/nginx/php-fpm/drupal.stpl => 6/templates/web/nginx/php-fpm/drupal6.stpl} (92%) rename install/rhel/{5/templates/web/nginx/php-fpm/drupal.tpl => 6/templates/web/nginx/php-fpm/drupal6.tpl} (92%) create mode 100644 install/rhel/6/templates/web/nginx/php-fpm/drupal7.stpl create mode 100644 install/rhel/6/templates/web/nginx/php-fpm/drupal7.tpl create mode 100644 install/rhel/7/templates/web/nginx/php-fpm/drupal6.stpl create mode 100644 install/rhel/7/templates/web/nginx/php-fpm/drupal6.tpl create mode 100644 install/rhel/7/templates/web/nginx/php-fpm/drupal7.stpl create mode 100644 install/rhel/7/templates/web/nginx/php-fpm/drupal7.tpl delete mode 100644 install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.stpl delete mode 100644 install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal.tpl create mode 100644 install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal6.stpl create mode 100644 install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal6.tpl create mode 100644 install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal7.stpl create mode 100644 install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal7.tpl delete mode 100644 install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.stpl delete mode 100644 install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal.tpl create mode 100644 install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal6.stpl create mode 100644 install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal6.tpl create mode 100644 install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal7.stpl create mode 100644 install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal7.tpl delete mode 100644 install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.stpl delete mode 100644 install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal.tpl create mode 100644 install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal6.stpl create mode 100644 install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal6.tpl create mode 100644 install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal7.stpl create mode 100644 install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal7.tpl delete mode 100644 install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.stpl delete mode 100644 install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal.tpl create mode 100644 install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal6.stpl create mode 100644 install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal6.tpl create mode 100644 install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal7.stpl create mode 100644 install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal7.tpl delete mode 100644 install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.stpl delete mode 100644 install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal.tpl create mode 100644 install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal6.stpl create mode 100644 install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal6.tpl create mode 100644 install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal7.stpl create mode 100644 install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal7.tpl delete mode 100644 install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.stpl delete mode 100644 install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal.tpl create mode 100644 install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal6.stpl create mode 100644 install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal6.tpl create mode 100644 install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal7.stpl create mode 100644 install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal7.tpl delete mode 100644 install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.stpl delete mode 100644 install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal.tpl create mode 100644 install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal6.stpl create mode 100644 install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal6.tpl create mode 100644 install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal7.stpl create mode 100644 install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal7.tpl delete mode 100644 install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.stpl delete mode 100644 install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal.tpl create mode 100644 install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal6.stpl create mode 100644 install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal6.tpl create mode 100644 install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal7.stpl create mode 100644 install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal7.tpl diff --git a/install/debian/8/templates/web/nginx/php5-fpm/drupal.stpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl similarity index 92% rename from install/debian/8/templates/web/nginx/php5-fpm/drupal.stpl rename to install/debian/7/templates/web/nginx/php5-fpm/drupal6.stpl index 9a5484396..62e67cc98 100644 --- a/install/debian/8/templates/web/nginx/php5-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/rhel/6/templates/web/nginx/php-fpm/drupal.tpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl similarity index 92% rename from install/rhel/6/templates/web/nginx/php-fpm/drupal.tpl rename to install/debian/7/templates/web/nginx/php5-fpm/drupal6.tpl index 417762c18..52adf4526 100644 --- a/install/rhel/6/templates/web/nginx/php-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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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/rhel/6/templates/web/nginx/php-fpm/drupal.stpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl similarity index 92% rename from install/rhel/6/templates/web/nginx/php-fpm/drupal.stpl rename to install/debian/8/templates/web/nginx/php5-fpm/drupal6.stpl index 9a5484396..62e67cc98 100644 --- a/install/rhel/6/templates/web/nginx/php-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/debian/8/templates/web/nginx/php5-fpm/drupal.tpl b/install/debian/8/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/8/templates/web/nginx/php5-fpm/drupal6.tpl index 417762c18..52adf4526 100644 --- a/install/debian/8/templates/web/nginx/php5-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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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/rhel/5/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/5/templates/web/nginx/php-fpm/drupal.stpl rename to install/rhel/5/templates/web/nginx/php-fpm/drupal6.stpl index 9a5484396..62e67cc98 100644 --- a/install/rhel/5/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/rhel/7/templates/web/nginx/php-fpm/drupal.tpl b/install/rhel/5/templates/web/nginx/php-fpm/drupal6.tpl similarity index 92% rename from install/rhel/7/templates/web/nginx/php-fpm/drupal.tpl rename to install/rhel/5/templates/web/nginx/php-fpm/drupal6.tpl index 417762c18..52adf4526 100644 --- a/install/rhel/7/templates/web/nginx/php-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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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/7/templates/web/nginx/php-fpm/drupal.stpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal6.stpl similarity index 92% rename from install/rhel/7/templates/web/nginx/php-fpm/drupal.stpl rename to install/rhel/6/templates/web/nginx/php-fpm/drupal6.stpl index 9a5484396..62e67cc98 100644 --- a/install/rhel/7/templates/web/nginx/php-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/5/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/5/templates/web/nginx/php-fpm/drupal.tpl rename to install/rhel/6/templates/web/nginx/php-fpm/drupal6.tpl index 417762c18..52adf4526 100644 --- a/install/rhel/5/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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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/7/templates/web/nginx/php-fpm/drupal6.stpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal6.stpl new file mode 100644 index 000000000..62e67cc98 --- /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 000000000..52adf4526 --- /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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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/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 9a5484396..000000000 --- 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 417762c18..000000000 --- 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 000000000..62e67cc98 --- /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 000000000..52adf4526 --- /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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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.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 9a5484396..000000000 --- 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 417762c18..000000000 --- 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 000000000..62e67cc98 --- /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 000000000..52adf4526 --- /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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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/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 9a5484396..000000000 --- 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 417762c18..000000000 --- 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 000000000..62e67cc98 --- /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 000000000..52adf4526 --- /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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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.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 9a5484396..000000000 --- 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 417762c18..000000000 --- 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 000000000..62e67cc98 --- /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 000000000..52adf4526 --- /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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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/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 9a5484396..000000000 --- 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 417762c18..000000000 --- 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 000000000..62e67cc98 --- /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 000000000..52adf4526 --- /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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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.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 9a5484396..000000000 --- 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 417762c18..000000000 --- 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 000000000..62e67cc98 --- /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 000000000..52adf4526 --- /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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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/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 9a5484396..000000000 --- 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 417762c18..000000000 --- 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 000000000..62e67cc98 --- /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 000000000..52adf4526 --- /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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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.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 9a5484396..000000000 --- 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 417762c18..000000000 --- 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 000000000..62e67cc98 --- /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 000000000..52adf4526 --- /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 000000000..6ff87d848 --- /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 000000000..75719cd93 --- /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*; +} From 975543788d6ad8cb1ea7bfd5f61593bf181dd7f9 Mon Sep 17 00:00:00 2001 From: Phinitnan Chanasabaeng Date: Sat, 13 Feb 2016 15:43:13 +0700 Subject: [PATCH 066/229] Delete old Nginx's Drupal template --- .../templates/web/nginx/php5-fpm/drupal.stpl | 101 ------------------ .../7/templates/web/nginx/php5-fpm/drupal.tpl | 98 ----------------- 2 files changed, 199 deletions(-) delete mode 100644 install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl delete mode 100644 install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl diff --git a/install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal.stpl deleted file mode 100644 index 9a5484396..000000000 --- a/install/debian/7/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/debian/7/templates/web/nginx/php5-fpm/drupal.tpl b/install/debian/7/templates/web/nginx/php5-fpm/drupal.tpl deleted file mode 100644 index 417762c18..000000000 --- a/install/debian/7/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*; -} From 6de8aaa2e9a69eb530b5ca1e44af7290134a1ab9 Mon Sep 17 00:00:00 2001 From: Phinitnan Chanasabaeng Date: Sat, 13 Feb 2016 16:55:47 +0700 Subject: [PATCH 067/229] Added Nginx's Moodle templates --- .../templates/web/nginx/php5-fpm/moodle.stpl | 85 +++++++++++++++++++ .../7/templates/web/nginx/php5-fpm/moodle.tpl | 82 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.stpl | 85 +++++++++++++++++++ .../8/templates/web/nginx/php5-fpm/moodle.tpl | 82 ++++++++++++++++++ .../5/templates/web/nginx/php-fpm/moodle.stpl | 85 +++++++++++++++++++ .../5/templates/web/nginx/php-fpm/moodle.tpl | 82 ++++++++++++++++++ .../6/templates/web/nginx/php-fpm/moodle.stpl | 85 +++++++++++++++++++ .../6/templates/web/nginx/php-fpm/moodle.tpl | 82 ++++++++++++++++++ .../7/templates/web/nginx/php-fpm/moodle.stpl | 85 +++++++++++++++++++ .../7/templates/web/nginx/php-fpm/moodle.tpl | 82 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.stpl | 85 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.tpl | 82 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.stpl | 85 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.tpl | 82 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.stpl | 85 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.tpl | 82 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.stpl | 85 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.tpl | 82 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.stpl | 85 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.tpl | 82 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.stpl | 85 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.tpl | 82 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.stpl | 85 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.tpl | 82 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.stpl | 85 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/moodle.tpl | 82 ++++++++++++++++++ 26 files changed, 2171 insertions(+) create mode 100644 install/debian/7/templates/web/nginx/php5-fpm/moodle.stpl create mode 100644 install/debian/7/templates/web/nginx/php5-fpm/moodle.tpl create mode 100644 install/debian/8/templates/web/nginx/php5-fpm/moodle.stpl create mode 100644 install/debian/8/templates/web/nginx/php5-fpm/moodle.tpl create mode 100644 install/rhel/5/templates/web/nginx/php-fpm/moodle.stpl create mode 100644 install/rhel/5/templates/web/nginx/php-fpm/moodle.tpl create mode 100644 install/rhel/6/templates/web/nginx/php-fpm/moodle.stpl create mode 100644 install/rhel/6/templates/web/nginx/php-fpm/moodle.tpl create mode 100644 install/rhel/7/templates/web/nginx/php-fpm/moodle.stpl create mode 100644 install/rhel/7/templates/web/nginx/php-fpm/moodle.tpl create mode 100644 install/ubuntu/12.04/templates/web/nginx/php5-fpm/moodle.stpl create mode 100644 install/ubuntu/12.04/templates/web/nginx/php5-fpm/moodle.tpl create mode 100644 install/ubuntu/12.10/templates/web/nginx/php5-fpm/moodle.stpl create mode 100644 install/ubuntu/12.10/templates/web/nginx/php5-fpm/moodle.tpl create mode 100644 install/ubuntu/13.04/templates/web/nginx/php5-fpm/moodle.stpl create mode 100644 install/ubuntu/13.04/templates/web/nginx/php5-fpm/moodle.tpl create mode 100644 install/ubuntu/13.10/templates/web/nginx/php5-fpm/moodle.stpl create mode 100644 install/ubuntu/13.10/templates/web/nginx/php5-fpm/moodle.tpl create mode 100644 install/ubuntu/14.04/templates/web/nginx/php5-fpm/moodle.stpl create mode 100644 install/ubuntu/14.04/templates/web/nginx/php5-fpm/moodle.tpl create mode 100644 install/ubuntu/14.10/templates/web/nginx/php5-fpm/moodle.stpl create mode 100644 install/ubuntu/14.10/templates/web/nginx/php5-fpm/moodle.tpl create mode 100644 install/ubuntu/15.04/templates/web/nginx/php5-fpm/moodle.stpl create mode 100644 install/ubuntu/15.04/templates/web/nginx/php5-fpm/moodle.tpl create mode 100644 install/ubuntu/15.10/templates/web/nginx/php5-fpm/moodle.stpl create mode 100644 install/ubuntu/15.10/templates/web/nginx/php5-fpm/moodle.tpl 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 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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/8/templates/web/nginx/php5-fpm/moodle.stpl b/install/debian/8/templates/web/nginx/php5-fpm/moodle.stpl new file mode 100644 index 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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/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 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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/6/templates/web/nginx/php-fpm/moodle.stpl b/install/rhel/6/templates/web/nginx/php-fpm/moodle.stpl new file mode 100644 index 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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/7/templates/web/nginx/php-fpm/moodle.stpl b/install/rhel/7/templates/web/nginx/php-fpm/moodle.stpl new file mode 100644 index 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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/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 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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.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 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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/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 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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.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 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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/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 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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.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 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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/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 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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.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 000000000..c67efe862 --- /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 000000000..0147c8218 --- /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*; +} From 6fbc433a52002a238606290e5745ae8905c0d339 Mon Sep 17 00:00:00 2001 From: dpeca Date: Sun, 14 Feb 2016 17:51:16 +0100 Subject: [PATCH 068/229] SSL fix for roundcube/plugins/password/drivers/vesta.php Fix that will allow vesta driver to comunicate with VestaCP even there are self signed SSL cert. Previously fsockopen failed to connect on self-signed SSL cert. --- install/debian/8/roundcube/vesta.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/install/debian/8/roundcube/vesta.php b/install/debian/8/roundcube/vesta.php index db31d89a3..3261f656f 100644 --- a/install/debian/8/roundcube/vesta.php +++ b/install/debian/8/roundcube/vesta.php @@ -40,7 +40,16 @@ class rcube_vesta_password { $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); From 663c4dd301edc2fe5d25276bc8816edec19a4272 Mon Sep 17 00:00:00 2001 From: phre4k Date: Fri, 19 Feb 2016 14:57:36 +0100 Subject: [PATCH 069/229] change dokuwiki template to execute php files in lib/exe --- install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.stpl | 2 +- install/debian/7/templates/web/nginx/php5-fpm/dokuwiki.tpl | 2 +- install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl | 2 +- install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.tpl | 2 +- install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.stpl | 2 +- install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.tpl | 2 +- install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.stpl | 2 +- install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.tpl | 2 +- install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.stpl | 2 +- install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.tpl | 2 +- install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.stpl | 2 +- install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.tpl | 2 +- install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.stpl | 2 +- install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.tpl | 2 +- install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.stpl | 2 +- install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.tpl | 2 +- install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.stpl | 2 +- install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.tpl | 2 +- install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.stpl | 2 +- install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.tpl | 2 +- install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.stpl | 2 +- install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.tpl | 2 +- install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.stpl | 2 +- install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.tpl | 2 +- install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.stpl | 2 +- install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.tpl | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) 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 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/debian/8/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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/rhel/5/templates/web/nginx/php-fpm/dokuwiki.stpl b/install/rhel/5/templates/web/nginx/php-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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/dokuwiki.stpl b/install/rhel/6/templates/web/nginx/php-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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/rhel/7/templates/web/nginx/php-fpm/dokuwiki.stpl b/install/rhel/7/templates/web/nginx/php-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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/13.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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/14.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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/15.04/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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.10/templates/web/nginx/php5-fpm/dokuwiki.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/dokuwiki.stpl index 27483cd8c..8acad0894 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 31647c9ff..f3456aa78 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; } From fc5a07bf0f8ae10516adaa553ffcc554ade2a1bb Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Fri, 19 Feb 2016 17:59:45 +0200 Subject: [PATCH 070/229] Update ar.php Complete the Arabic Translation file (improved) --- web/inc/i18n/ar.php | 561 ++++++++++++++++++++++---------------------- 1 file changed, 282 insertions(+), 279 deletions(-) diff --git a/web/inc/i18n/ar.php b/web/inc/i18n/ar.php index ca9fbb1da..e37dc726a 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,31 @@ $LANG['ar'] = array( 'Log out' => 'تسجيل الخروج', 'USER' => 'المستخدم', - 'WEB' => 'الشبكة', - 'DNS' => 'نظام أسماء النظاقات', + 'WEB' => 'نطاقات الويب', + 'DNS' => 'بيانات DNS', 'MAIL' => 'البريد', - 'DB' => 'قاعدة بيانات', + 'DB' => 'قواعد بيانات', 'CRON' => 'مجدول الوظائف', 'BACKUP' => 'النسخ الإحتياطية', '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 +51,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' => 'عرض قائمة المحظورين للدخول الخاطئ', 'open %s' => 'فتح %s', - 'download' => 'تحميل', + 'download' => 'تنزيل', 'restore' => 'استرجاع', 'configure restore settings' => 'تهيئة إعدادات الاسترجاع', 'stop' => 'إيقاف', @@ -86,8 +86,8 @@ $LANG['ar'] = array( 'restart' => 'إعادة تشغيل', 'update' => 'تحديث', 'generate' => 'تكوين', - 'Generate CSR' => 'تكوين طلب توقيع شهادة', - 'reread IP' => 'إعادة قراءة بروتوكول الإنترنت', + 'Generate CSR' => 'تكوين طلب توقيع شهادة CSR', + 'reread IP' => 'إعادة قراءة IP', 'enable autoupdate' => 'تمكين التحديث التلقائي', 'disable autoupdate' => 'تعطيل التحديث التلقائي', @@ -107,21 +107,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 +131,9 @@ $LANG['ar'] = array( 'no' => 'لا', 'none' => 'لا شيء', 'pb' => 'pb', - 'tb' => 'tb', - 'gb' => 'gb', - 'mb' => 'mb', + 'tb' => 'تيرا', + 'gb' => 'غيغا', + 'mb' => 'ميغا', 'minute' => 'دقيقة', 'hour' => 'ساعة', 'day' => 'يوم', @@ -141,58 +141,58 @@ $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 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 إضافي
لا تحتاج حساب إضافي عادة ويتم الدخول باسم المستخدم نفسه', + 'SOA' => 'SOA', + 'TTL' => 'TTL', 'Expire' => 'تنقضي', 'Records' => 'سجلات', - 'Catchall email' => 'حصل كل البريد', + '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' => 'عدم الاحتفاظ بنسخة البريد المعاد توجيهه', 'database' => 'قاعدة بيانات', - 'User' => 'مستخدم', - 'Host' => 'مضيف', - 'Charset' => 'حزمة نص', + 'User' => 'المستخدم', + 'Host' => 'المضيف', + 'Charset' => 'تنسيق النص', 'Min' => 'دقيقة', 'Hour' => 'ساعة', 'Day' => 'يوم', @@ -215,24 +215,24 @@ $LANG['ar'] = array( '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 خادم', + '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' => 'وحدة المعالجة المركزية', + 'CPU' => 'المعالج', 'Memory' => 'الذاكرة', 'Uptime' => 'وقت التشغيل', - 'core package' => 'الرزمة الأساسية', + 'core package' => 'الحزمة الأساسية', 'php interpreter' => 'php مترجم', - 'internal web server' => 'خادم الشبكة الداخلي', + 'internal web server' => 'مخدم الويب الداخلي', 'Version' => 'إصدار', 'Release' => 'نسخة', 'Architecture' => 'هيكلية', @@ -240,64 +240,64 @@ $LANG['ar'] = array( '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 +307,47 @@ $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' => 'تحميل سجلات الأخطاء', + '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', + 'Add one more Name Server' => 'إضافة مخدم أسماء (NS) جديد', - 'unlimited' => 'unlimited', + 'unlimited' => 'غير محدود', '1 account' => '1 حساب', '%s accounts' => 'حسابات %s', '1 domain' => '1 نطاق', @@ -362,7 +362,7 @@ $LANG['ar'] = array( '%s cron jobs' => 'وظائف مجدولة %s', '1 archive' => '1 أرشيف', '%s archives' => 'أرشيف %s', - '1 package' => '1 رزمة', + '1 package' => '1 حزمة', '%s packages' => 'رزم %s', '1 IP address' => '1 عنوان بروتوكول إنترنت', '%s IP addresses' => 'عناوين بروتوكول إنترنت %s', @@ -373,8 +373,8 @@ $LANG['ar'] = array( '1 object' => '1 عنصر', '%s objects' => 'عناصر %s', 'no exclusions' => 'لا استثناءات', - '1 rule' => '1 عنصر', - '%s rule' => 'عناصر %s', + '1 rule' => '1 قاعدة', + '%s rule' => 'قواعد %s', 'There are no currently banned IP' => 'لا يوجد عناوين IP المحظورة حاليالا يوجد عناوين IP المحظورة حاليا', 'USER_CREATED_OK' => 'المستخدم %s تم إنشائه بنجاح', @@ -386,7 +386,7 @@ $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' => 'تم إنشاء القاعدة بنجاح.', 'Autoupdate has been successfully enabled' => 'تم تفيعل التحديث التلقائي بنجاح', @@ -396,30 +396,30 @@ $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?', @@ -470,135 +470,138 @@ $LANG['ar'] = array( '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' => 'اللغة الافتراضية', + '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' => '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', + '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' => 'ضغط', + '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' => 'إنشاء مجلد', - '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', + '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' => 'إذهب إلى العنصر المحدد', - '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', + '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' => - 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', + 'الاختصارات الهمت من قبل ال 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', - '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 + '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.' => 'هذه الخدمة تجارية ومأجورة, تحتاج لشراء مفتاح ترخيص لتمكينها.' + + ,'MainDomain' => 'النطاق الرئيسي', + 'SubDomain' => 'النطاق الفرعي (الجزء الاول الذي يضاف إلى النطاق الرئيسي)', + 'Add Sub Domain' => 'إضافة نطاق فرعي' +); From 81ae01099df674709395ace3a563177079eb47c2 Mon Sep 17 00:00:00 2001 From: Phinitnan Chanasabaeng Date: Mon, 22 Feb 2016 14:28:51 +0700 Subject: [PATCH 071/229] Fixed Owncloud NGINX template causes redirect loop. --- install/debian/7/templates/web/nginx/php5-fpm/owncloud.stpl | 2 +- install/debian/7/templates/web/nginx/php5-fpm/owncloud.tpl | 2 +- install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl | 2 +- install/debian/8/templates/web/nginx/php5-fpm/owncloud.tpl | 2 +- install/rhel/5/templates/web/nginx/php-fpm/owncloud.stpl | 2 +- install/rhel/5/templates/web/nginx/php-fpm/owncloud.tpl | 2 +- install/rhel/6/templates/web/nginx/php-fpm/owncloud.stpl | 2 +- install/rhel/6/templates/web/nginx/php-fpm/owncloud.tpl | 2 +- install/rhel/7/templates/web/nginx/php-fpm/owncloud.stpl | 2 +- install/rhel/7/templates/web/nginx/php-fpm/owncloud.tpl | 2 +- install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.stpl | 2 +- install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.tpl | 2 +- install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.stpl | 2 +- install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.tpl | 2 +- install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.stpl | 2 +- install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.tpl | 2 +- install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.stpl | 2 +- install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.tpl | 2 +- install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.stpl | 2 +- install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.tpl | 2 +- install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.stpl | 2 +- install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.tpl | 2 +- install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.stpl | 2 +- install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.tpl | 2 +- install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.stpl | 2 +- install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.tpl | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) 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 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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/8/templates/web/nginx/php5-fpm/owncloud.stpl b/install/debian/8/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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/rhel/5/templates/web/nginx/php-fpm/owncloud.stpl b/install/rhel/5/templates/web/nginx/php-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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/6/templates/web/nginx/php-fpm/owncloud.stpl b/install/rhel/6/templates/web/nginx/php-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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/7/templates/web/nginx/php-fpm/owncloud.stpl b/install/rhel/7/templates/web/nginx/php-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/12.04/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/12.10/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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/13.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/13.04/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/13.10/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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/14.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/14.04/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/14.10/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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/15.04/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/15.04/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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.10/templates/web/nginx/php5-fpm/owncloud.stpl b/install/ubuntu/15.10/templates/web/nginx/php5-fpm/owncloud.stpl index 8311ca43f..3d3b75474 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 57cac2f85..2e898100f 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; From 8b18ca3c9d1dbb0416fc40be850259651a9ed5cd Mon Sep 17 00:00:00 2001 From: System Void Date: Thu, 25 Feb 2016 02:42:21 +0000 Subject: [PATCH 072/229] Fixed NGINX/Named Status Sharing Issue Closes #636 --- bin/v-list-sys-services | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/v-list-sys-services b/bin/v-list-sys-services index 8e08d1755..0c9478676 100755 --- a/bin/v-list-sys-services +++ b/bin/v-list-sys-services @@ -116,9 +116,7 @@ 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'" From 1c3aaa013bece1b03fd95e46d2f20c4e14c85ed9 Mon Sep 17 00:00:00 2001 From: Phinitnan Chanasabaeng Date: Thu, 25 Feb 2016 20:55:37 +0700 Subject: [PATCH 073/229] Added Nginx's Drupal 8 templates --- .../templates/web/nginx/php5-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../5/templates/web/nginx/php-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../6/templates/web/nginx/php-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../7/templates/web/nginx/php-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.tpl | 94 ++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.stpl | 97 +++++++++++++++++++ .../templates/web/nginx/php5-fpm/drupal8.tpl | 94 ++++++++++++++++++ 26 files changed, 2483 insertions(+) create mode 100644 install/debian/7/templates/web/nginx/php5-fpm/drupal8.stpl create mode 100644 install/debian/7/templates/web/nginx/php5-fpm/drupal8.tpl create mode 100644 install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl create mode 100644 install/debian/8/templates/web/nginx/php5-fpm/drupal8.tpl create mode 100644 install/rhel/5/templates/web/nginx/php-fpm/drupal8.stpl create mode 100644 install/rhel/5/templates/web/nginx/php-fpm/drupal8.tpl create mode 100644 install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl create mode 100644 install/rhel/6/templates/web/nginx/php-fpm/drupal8.tpl create mode 100644 install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl create mode 100644 install/rhel/7/templates/web/nginx/php-fpm/drupal8.tpl create mode 100644 install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal8.stpl create mode 100644 install/ubuntu/12.04/templates/web/nginx/php5-fpm/drupal8.tpl create mode 100644 install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal8.stpl create mode 100644 install/ubuntu/12.10/templates/web/nginx/php5-fpm/drupal8.tpl create mode 100644 install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal8.stpl create mode 100644 install/ubuntu/13.04/templates/web/nginx/php5-fpm/drupal8.tpl create mode 100644 install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal8.stpl create mode 100644 install/ubuntu/13.10/templates/web/nginx/php5-fpm/drupal8.tpl create mode 100644 install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal8.stpl create mode 100644 install/ubuntu/14.04/templates/web/nginx/php5-fpm/drupal8.tpl create mode 100644 install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal8.stpl create mode 100644 install/ubuntu/14.10/templates/web/nginx/php5-fpm/drupal8.tpl create mode 100644 install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal8.stpl create mode 100644 install/ubuntu/15.04/templates/web/nginx/php5-fpm/drupal8.tpl create mode 100644 install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal8.stpl create mode 100644 install/ubuntu/15.10/templates/web/nginx/php5-fpm/drupal8.tpl 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 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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/8/templates/web/nginx/php5-fpm/drupal8.stpl b/install/debian/8/templates/web/nginx/php5-fpm/drupal8.stpl new file mode 100644 index 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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/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 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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/6/templates/web/nginx/php-fpm/drupal8.stpl b/install/rhel/6/templates/web/nginx/php-fpm/drupal8.stpl new file mode 100644 index 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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/7/templates/web/nginx/php-fpm/drupal8.stpl b/install/rhel/7/templates/web/nginx/php-fpm/drupal8.stpl new file mode 100644 index 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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/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 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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.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 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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/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 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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.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 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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/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 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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.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 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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/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 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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.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 000000000..b334d4818 --- /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 000000000..c927ab13c --- /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*; +} From 969ca7e15b6a4862d796338663b691aa2ab4e214 Mon Sep 17 00:00:00 2001 From: Scorcher Date: Sun, 28 Feb 2016 15:58:53 +0500 Subject: [PATCH 074/229] Fix hole in iptables: connect to any ports from defined in rules ports. --- bin/v-update-firewall | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/bin/v-update-firewall b/bin/v-update-firewall index 04a15a5fe..7babd84d5 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 From f0af705f92715c0ad7f0f37fcd3c48528a527fdb Mon Sep 17 00:00:00 2001 From: Nguyen Ngoc Phuong Date: Fri, 1 Apr 2016 00:41:12 +0700 Subject: [PATCH 075/229] Correct wrong spelling --- web/inc/i18n/vi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/inc/i18n/vi.php b/web/inc/i18n/vi.php index 5b04a74bf..f009d0bef 100644 --- a/web/inc/i18n/vi.php +++ b/web/inc/i18n/vi.php @@ -315,7 +315,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', From 19bf969b840b20e9f8e787571ed36d854a93b9f9 Mon Sep 17 00:00:00 2001 From: Josue Alexander Ibarra Date: Sat, 2 Apr 2016 11:59:29 -0700 Subject: [PATCH 076/229] Fixing exim auto reply bug for ubuntu and debian as stated in issue #198 --- install/debian/7/exim/exim4.conf.template | 2 +- install/debian/8/exim/exim4.conf.template | 2 +- install/ubuntu/12.04/exim/exim4.conf.template | 2 +- install/ubuntu/12.10/exim/exim4.conf.template | 2 +- install/ubuntu/13.04/exim/exim4.conf.template | 2 +- install/ubuntu/13.10/exim/exim4.conf.template | 2 +- install/ubuntu/14.04/exim/exim4.conf.template | 2 +- install/ubuntu/14.10/exim/exim4.conf.template | 2 +- install/ubuntu/15.04/exim/exim4.conf.template | 2 +- install/ubuntu/15.10/exim/exim4.conf.template | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/install/debian/7/exim/exim4.conf.template b/install/debian/7/exim/exim4.conf.template index 742f0409e..10359a151 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 diff --git a/install/debian/8/exim/exim4.conf.template b/install/debian/8/exim/exim4.conf.template index 742f0409e..10359a151 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 diff --git a/install/ubuntu/12.04/exim/exim4.conf.template b/install/ubuntu/12.04/exim/exim4.conf.template index 742f0409e..10359a151 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 diff --git a/install/ubuntu/12.10/exim/exim4.conf.template b/install/ubuntu/12.10/exim/exim4.conf.template index 742f0409e..10359a151 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 diff --git a/install/ubuntu/13.04/exim/exim4.conf.template b/install/ubuntu/13.04/exim/exim4.conf.template index 742f0409e..10359a151 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 diff --git a/install/ubuntu/13.10/exim/exim4.conf.template b/install/ubuntu/13.10/exim/exim4.conf.template index 742f0409e..10359a151 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 diff --git a/install/ubuntu/14.04/exim/exim4.conf.template b/install/ubuntu/14.04/exim/exim4.conf.template index 742f0409e..10359a151 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 diff --git a/install/ubuntu/14.10/exim/exim4.conf.template b/install/ubuntu/14.10/exim/exim4.conf.template index 742f0409e..10359a151 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 diff --git a/install/ubuntu/15.04/exim/exim4.conf.template b/install/ubuntu/15.04/exim/exim4.conf.template index 742f0409e..10359a151 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 diff --git a/install/ubuntu/15.10/exim/exim4.conf.template b/install/ubuntu/15.10/exim/exim4.conf.template index 742f0409e..10359a151 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 From a13bcf5322da612ea9ccbecbd9f115d3cf1c92cd Mon Sep 17 00:00:00 2001 From: Roman Florea Date: Sat, 2 Apr 2016 22:57:45 +0300 Subject: [PATCH 077/229] Fixing exim auto reply bug for rhel as stated in issue #198 --- install/rhel/5/exim/exim.conf | 2 +- install/rhel/6/exim/exim.conf | 2 +- install/rhel/7/exim/exim.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install/rhel/5/exim/exim.conf b/install/rhel/5/exim/exim.conf index 0f9830168..6f9a73881 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/6/exim/exim.conf b/install/rhel/6/exim/exim.conf index 0f9830168..6f9a73881 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/7/exim/exim.conf b/install/rhel/7/exim/exim.conf index 0f9830168..6f9a73881 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 From bbcf9dceb7e0a2c185d2008466c4d67804da509a Mon Sep 17 00:00:00 2001 From: rumi55 Date: Sun, 3 Apr 2016 18:12:03 +0200 Subject: [PATCH 078/229] Update bs.php Some changes ... More coming soon. --- web/inc/i18n/bs.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/web/inc/i18n/bs.php b/web/inc/i18n/bs.php index 10c4c94db..768f48677 100644 --- a/web/inc/i18n/bs.php +++ b/web/inc/i18n/bs.php @@ -226,7 +226,7 @@ $LANG['bs'] = array( 'job scheduler' => 'planer poslova', 'CPU' => 'CPU', 'Memory' => 'Memorija', - 'Uptime' => 'Radno vrijeme', + 'Uptime' => 'Vrijeme rada', 'core package' => 'glavni paket', 'php interpreter' => 'php interpreter', 'internal web server' => 'interni web server', @@ -254,7 +254,7 @@ $LANG['bs'] = array( 'SSL Key' => 'SSL Key', 'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediate', 'optional' => 'izborno', - 'internal' => 'internal', + 'internal' => 'interno', 'Statistics Authorization' => 'Ovlaštenje za statistiku', 'Statistics Auth' => 'Pristup statistici', 'Account' => 'Račun', @@ -470,22 +470,22 @@ $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', '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', @@ -522,15 +522,15 @@ $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', + 'Delete' => 'Izbrisati', + 'Extract' => 'Ekstraktovati', + 'Create' => 'Napraviti', + 'Compress' => 'Kompresovati', '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', @@ -595,4 +595,4 @@ $LANG['bs'] = array( '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 +); From ea22b393caf2897caef7842244e913fb183a8bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20BRY?= Date: Fri, 22 Apr 2016 16:30:27 +0200 Subject: [PATCH 079/229] Handle DES passwords --- bin/v-check-user-password | 25 ++++++++++++++++++------- bin/v-generate-password-hash | 5 +++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/bin/v-check-user-password b/bin/v-check-user-password index 1eecc3dd3..c84f3bb46 100755 --- a/bin/v-check-user-password +++ b/bin/v-check-user-password @@ -49,13 +49,24 @@ fi #----------------------------------------------------------# # 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 @@ -64,7 +75,7 @@ if [ -z "$salt" ]; then 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" diff --git a/bin/v-generate-password-hash b/bin/v-generate-password-hash index fd917ad38..78a551fe0 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"; From 3bf6a399a5c160c0ca5d5f5d209257130f11d377 Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 26 Apr 2016 23:12:35 +0800 Subject: [PATCH 080/229] make path first, in case the part doesn't exist. make path first, in case the part doesn't exist. --- bin/v-add-backup-host | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/v-add-backup-host b/bin/v-add-backup-host index 5595c0439..39a79046a 100755 --- a/bin/v-add-backup-host +++ b/bin/v-add-backup-host @@ -137,8 +137,10 @@ 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 From 9f1ea16dc89f74f06851ca53c91efb15afc43e86 Mon Sep 17 00:00:00 2001 From: MartinG Date: Fri, 29 Apr 2016 04:11:14 +0200 Subject: [PATCH 081/229] Update vst-install-debian.sh --- install/vst-install-debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index 0c972c79e..9f27ef4a5 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" From 170bd64ec2a36c8d237cc1ab32aa37d46b964b13 Mon Sep 17 00:00:00 2001 From: olshek Date: Wed, 4 May 2016 14:13:36 +0300 Subject: [PATCH 082/229] improved regular expression in v-backup-user file The regular expression now uses exact match of a folder/file name. With the previous version, some files were ignored during the backup process(for example .gitconfig, because it contains "conf"). --- bin/v-backup-user | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-backup-user b/bin/v-backup-user index 0a335da47..425a659f5 100755 --- a/bin/v-backup-user +++ b/bin/v-backup-user @@ -479,7 +479,7 @@ if [ "$USER" != '*' ]; then 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 ++)) From 64784e326db751e73024b5cd167a0b50591e16ff Mon Sep 17 00:00:00 2001 From: Disketsa - Azuya Date: Sun, 8 May 2016 13:56:22 +0700 Subject: [PATCH 083/229] Fix id.php translation --- web/inc/i18n/id.php | 222 ++++++++++++++++++++++---------------------- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/web/inc/i18n/id.php b/web/inc/i18n/id.php index 0a0d935a6..92e5d60f6 100644 --- a/web/inc/i18n/id.php +++ b/web/inc/i18n/id.php @@ -174,9 +174,9 @@ $LANG['id'] = array( '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', @@ -348,11 +348,11 @@ $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', 'Add one more Name Server' => 'Add one more Name Server', - 'unlimited' => 'unlimited', + 'unlimited' => 'tidak terbatas', '1 account' => '1 pengguna', '%s accounts' => '%s pengguna', '1 domain' => '1 domain', @@ -394,8 +394,8 @@ $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', + '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 +444,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 ', @@ -487,120 +487,120 @@ $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', '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 berdasarkan', + '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', + 'type' => 'tipe', + 'size' => 'ukuran', + 'date' => 'tanggal', + 'name' => 'nama', + 'Initializing' => 'Inisialisasi', + 'UPLOAD' => 'UNGGAH', + 'NEW FILE' => 'FILE BARU', + 'NEW DIR' => 'DIREKTORI BARU', + 'DELETE' => 'HAPUS', + 'RENAME' => 'GANTI', + 'COPY' => 'SALIN', + 'ARCHIVE' => 'ARSIP', + 'EXTRACT' => 'EKSTRAK', + 'DOWNLOAD' => 'UNDUH', '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' => 'Ubah', + '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', + 'Are you sure you want to copy' => 'Yakin mau disalin', + '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', - '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', + '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', - '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', + 'Upload' => 'Unggah', + 'New File' => 'File baru', + 'New Folder' => 'Folder baru', + 'Download' => 'Unduh', + 'Rename' => 'Ganti nama', + 'Copy' => 'Salin', + 'Archive' => 'Arsip', + 'Delete' => 'Hapus', + 'Save File (in text editor)' => 'Simpan File (di text editor)', + 'Close Popup / Cancel' => 'Tutup Popup / Batal', + 'Move Cursor Up' => 'Pindahkan kursur keatas', + 'Move Cursor Dow' => '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 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', + 'Go to Parent Directory' => 'Ke Parent Directory', + 'Select Current File' => 'Pilih File ini', + 'Select Bunch of Files' => 'Pilih Bunch of Files', + 'Append 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' => - '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', - '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' => 'Lisensi Key', + 'Enter License Key' => 'Masukkan Lisensi Key', + 'Buy Licence' => 'Beli Lisensi', + 'Buy Lifetime License' => 'Beli Lisensi Selamanya(Seumur Hidup)', + 'Disable and Cancel Licence' => 'Nonaktifkan dan Batalkan Lisensi', + 'Licence Activated' => 'Lisensi Diaktifkan', + 'Licence Deactivated' => 'Lisensi Di-nonaktifkan', + 'Restrict users so that they cannot use SSH and access only their home directory.' => 'Larang pengguna supaya mereka ga bisa pakai SSH dan hanya bisa mengakses direktory Home-nya saja', + 'Browse, copy, edit, view, and retrieve all of your web domain files using fully featured File Manager.' => 'Melihat-lihat, salin, edit, lihat, dan mengambil semua file dari web domain menggunakan fitur File Manager.', + 'This is a commercial module, you would need to purchace license key to enable it.' => 'Ini adalah modul berbayar, anda harus pesan lisensi untuk menggunakannya' -); \ No newline at end of file +); From 449fd9764462270a459cb34ccaee722e532c6963 Mon Sep 17 00:00:00 2001 From: Disketsa - Azuya Date: Sun, 8 May 2016 14:19:20 +0700 Subject: [PATCH 084/229] Update edit_package.html After save the package, back button link is referer to https://dimain/list/package/?package={package_name} i think we dont need this. Back button will alway go to /list/package/ .... CMIIW .... --- web/templates/admin/edit_package.html | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html index bbdcba301..0655ba348 100644 --- a/web/templates/admin/edit_package.html +++ b/web/templates/admin/edit_package.html @@ -22,12 +22,7 @@
From 30186527077e6cb3fb0a9d23b8304ebbe18b938f Mon Sep 17 00:00:00 2001 From: Rune Laenen Date: Sun, 8 May 2016 14:52:08 +0200 Subject: [PATCH 085/229] Fix wrong documentation --- bin/v-list-sys-vesta-autoupdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-list-sys-vesta-autoupdate b/bin/v-list-sys-vesta-autoupdate index ba89029f2..a221640a5 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. From 6dcfc8a3dc0df0bd4b43b29064d54a983772ec07 Mon Sep 17 00:00:00 2001 From: martijndedood Date: Tue, 31 May 2016 21:45:38 +0200 Subject: [PATCH 086/229] no-php.tpl # comment replaced with ; comment --- .../7/templates/web/php5-fpm/no-php.tpl | 22 +++++++++---------- .../8/templates/web/php5-fpm/no-php.tpl | 22 +++++++++---------- .../rhel/5/templates/web/php-fpm/no-php.tpl | 22 +++++++++---------- .../rhel/6/templates/web/php-fpm/no-php.tpl | 22 +++++++++---------- .../rhel/7/templates/web/php-fpm/no-php.tpl | 22 +++++++++---------- .../12.04/templates/web/php5-fpm/no-php.tpl | 22 +++++++++---------- .../12.10/templates/web/php5-fpm/no-php.tpl | 22 +++++++++---------- .../13.04/templates/web/php5-fpm/no-php.tpl | 22 +++++++++---------- .../13.10/templates/web/php5-fpm/no-php.tpl | 22 +++++++++---------- .../14.04/templates/web/php5-fpm/no-php.tpl | 22 +++++++++---------- .../14.10/templates/web/php5-fpm/no-php.tpl | 22 +++++++++---------- .../15.04/templates/web/php5-fpm/no-php.tpl | 22 +++++++++---------- .../15.10/templates/web/php5-fpm/no-php.tpl | 22 +++++++++---------- 13 files changed, 143 insertions(+), 143 deletions(-) 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 89487d5f5..e677f3e9f 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/8/templates/web/php5-fpm/no-php.tpl b/install/debian/8/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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/rhel/5/templates/web/php-fpm/no-php.tpl b/install/rhel/5/templates/web/php-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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/6/templates/web/php-fpm/no-php.tpl b/install/rhel/6/templates/web/php-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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/7/templates/web/php-fpm/no-php.tpl b/install/rhel/7/templates/web/php-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/12.04/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/12.10/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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/13.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/13.04/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/13.10/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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/14.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/14.04/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/14.10/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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/15.04/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/15.04/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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.10/templates/web/php5-fpm/no-php.tpl b/install/ubuntu/15.10/templates/web/php5-fpm/no-php.tpl index 89487d5f5..e677f3e9f 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 From b7e9f4b5b08a727e0b427faf285923cbbd40f337 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 16:25:00 +0300 Subject: [PATCH 087/229] deleted redundand scripts --- bin/v-list-dns-domains-src | 51 --------------------------------- bin/v-list-web-domains-alias | 54 ----------------------------------- bin/v-list-web-domains-proxy | 54 ----------------------------------- bin/v-list-web-domains-ssl | 54 ----------------------------------- bin/v-list-web-domains-stats | 55 ------------------------------------ 5 files changed, 268 deletions(-) delete mode 100755 bin/v-list-dns-domains-src delete mode 100755 bin/v-list-web-domains-alias delete mode 100755 bin/v-list-web-domains-proxy delete mode 100755 bin/v-list-web-domains-ssl delete mode 100755 bin/v-list-web-domains-stats diff --git a/bin/v-list-dns-domains-src b/bin/v-list-dns-domains-src deleted file mode 100755 index 50fc23db4..000000000 --- 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-web-domains-alias b/bin/v-list-web-domains-alias deleted file mode 100755 index 572cc56ab..000000000 --- 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 6e8144864..000000000 --- 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 84c58db73..000000000 --- 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 64e01d53c..000000000 --- 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 From 6e0ef668bb5948edb0e7bfbf94aaaae2ebdb0799 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 16:26:54 +0300 Subject: [PATCH 088/229] listing scripts refactoring + new format --- bin/v-list-backup-host | 95 +++++----- bin/v-list-cron-job | 106 ++++++----- bin/v-list-cron-jobs | 131 +++++++------- bin/v-list-database | 88 ++++----- bin/v-list-database-host | 104 ++++++----- bin/v-list-database-hosts | 123 +++++++++++-- bin/v-list-database-types | 55 +++--- bin/v-list-databases | 77 ++++++-- bin/v-list-dns-domain | 108 ++++++----- bin/v-list-dns-domains | 83 +++++++-- bin/v-list-dns-records | 122 +++++++------ bin/v-list-dns-template | 115 ++++++------ bin/v-list-dns-templates | 58 +++--- bin/v-list-firewall | 78 ++++++-- bin/v-list-firewall-ban | 69 +++++-- bin/v-list-firewall-rule | 87 +++++---- bin/v-list-mail-account | 93 +++++----- bin/v-list-mail-account-autoreply | 36 ++-- bin/v-list-mail-accounts | 97 ++++++++-- bin/v-list-mail-domain | 97 +++++----- bin/v-list-mail-domain-dkim | 44 +++-- bin/v-list-mail-domain-dkim-dns | 51 ++++-- bin/v-list-mail-domains | 82 +++++++-- bin/v-list-remote-dns-hosts | 78 ++++++-- bin/v-list-sys-config | 197 ++++++++++++++++---- bin/v-list-sys-db-status | 2 +- bin/v-list-sys-info | 63 ++++--- bin/v-list-sys-interfaces | 63 ++++--- bin/v-list-sys-ip | 103 ++++++----- bin/v-list-sys-ips | 126 +++++++------ bin/v-list-sys-languages | 47 +++-- bin/v-list-sys-rrd | 81 +++++++-- bin/v-list-sys-services | 286 +++++++++++++++++------------- bin/v-list-sys-shells | 48 +++-- bin/v-list-sys-users | 52 +++--- bin/v-list-sys-vesta-autoupdate | 43 +++-- bin/v-list-sys-vesta-updates | 109 ++++++------ bin/v-list-user | 201 +++++++++++++++------ bin/v-list-user-backup | 107 ++++++----- bin/v-list-user-backup-exclusions | 167 ++++++++++++----- bin/v-list-user-backups | 81 +++++++-- bin/v-list-user-favourites | 100 ++++++----- bin/v-list-user-ips | 137 ++++++-------- bin/v-list-user-log | 108 ++++++----- bin/v-list-user-notifications | 107 ++++++----- bin/v-list-user-ns | 56 +++--- bin/v-list-user-package | 119 ++++++++----- bin/v-list-user-packages | 131 ++++++++------ bin/v-list-user-stats | 115 ++++++++++-- bin/v-list-users | 214 ++++++++++++++-------- bin/v-list-users-stats | 113 ++++++++++-- bin/v-list-web-domain | 141 +++++++++------ bin/v-list-web-domain-accesslog | 36 ++-- bin/v-list-web-domain-errorlog | 36 ++-- bin/v-list-web-domain-ssl | 93 ++++++++-- bin/v-list-web-domains | 99 +++++++++-- bin/v-list-web-stats | 60 ++++--- bin/v-list-web-templates | 52 +++--- bin/v-list-web-templates-backend | 58 +++--- bin/v-list-web-templates-proxy | 58 +++--- 60 files changed, 3695 insertions(+), 1991 deletions(-) diff --git a/bin/v-list-backup-host b/bin/v-list-backup-host index 125a1dd97..60e80fa17 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 450153453..8aa17685d 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 5580b0743..d9b5c3791 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 295d934f6..420d0e692 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 b38b64670..326764af1 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 d7e9e0feb..4260d59b9 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": "'$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 20e6044f3..13f8edadb 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 538f96493..b3e83b1d8 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 51e9d183c..f72943f9a 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 38c5e1954..337760e39 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-records b/bin/v-list-dns-records index 1e34202ce..d23634d6b 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 89c464c0a..f82473c21 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,7 +81,7 @@ shell_list_dns() { #----------------------------------------------------------# check_args '1' "$#" 'TEMPLATE [FORMAT]' -validate_format 'template' +is_format_valid 'template' is_dns_template_valid @@ -82,16 +89,12 @@ is_dns_template_valid # 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 6cffff38d..dffdf482c 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 b45010375..5b0537c12 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 a73b863ad..178a84900 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": "'$COMMENT'", + "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 441212da4..e7c7f6b1a 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-mail-account b/bin/v-list-mail-account index ff5af1314..65cc5b907 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 b1f5386ba..257d873d3 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 f62b5c315..9d4ef41b9 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 e73140fdd..0bf29d6e3 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_DISKL": "'$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 727f53233..37088ee0b 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 a78e36e9b..d7b3e2a65 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 e4a9161e9..4421df78c 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_DISKL": "'$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 2269381de..63249af23 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 fdab5280e..c0ed38517 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 6bbfca5a7..d3dbe2f7b 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 975f7249f..dabd3160e 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 bb4dea253..1c539e6db 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 ' "'$interfaces'"' + 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 d93957bfb..3a7658c5a 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 4ab16179b..c4f3a8c0c 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 e3459fc7e..041bc1236 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 2dc026b91..d746896c4 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 8e08d1755..fb0561b9b 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,92 @@ 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 +# Checking DNS system +if [ ! -z "$DNS_SYSTEM" ] && [ "$DNS_SYSTEM" != 'remote' ]; then + if [ "$DNS_SYSTEM" == 'bind' ] || [ "$DNS_SYSTEM" == 'bind9' ]; then proc_name='named' fi - get_srv_state $service $proc_name - str="$str\nNAME='$service' SYSTEM='dns server' STATE='$state' CPU='$cpu'" - str="$str MEM='$mem' RTIME='$rtime'" + get_srv_state $DNS_SYSTEM $proc_name + data="$data\nNAME='$DNS_SYSTEM' 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,39 +230,37 @@ 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 @@ -225,32 +270,21 @@ if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then str="$str 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 be43a16e3..dec180f5c 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 16be8d658..7cbf7f629 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=$(echo "$users" |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 ba89029f2..0177cf1f0 100755 --- a/bin/v-list-sys-vesta-autoupdate +++ b/bin/v-list-sys-vesta-autoupdate @@ -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 0fefa5840..dee911dc7 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 eef71883e..05649f915 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 e20069172..2e0a98d0d 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 a06d101e7..d0f428e8e 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 eb666ab12..813ee6871 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 362d39a13..ceb2ba2c8 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 d2b7930ce..cacae76c1 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() { +# SHELL list function +shell_list() { + echo "IP NAT OWNER STATUS NAME" + echo "-- --- ----- ------ ---" + for IP in $ips; do + source $VESTA/data/ips/$IP + 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 $(ls $VESTA/data/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 - fi + 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 "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 "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 bcd0f7ce1..2b4557f41 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 23cd3f87a..1d9a976a6 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 5c950fa5e..7754285d6 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 38a390f88..26d809239 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 4f0523429..3c9238798 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 8b56fcc88..11b867afd 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 4c65b1051..14a6d007d 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 61358ef27..2a267964c 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 13f1fd715..a3e162ab6 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 2d5a6918c..24362596c 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 f1d92d8e7..3e23ecfa1 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 4d8b9ab88..c91a7cca7 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 a5cb9113a..48186feeb 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-stats b/bin/v-list-web-stats index e77889ced..b48419d67 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 fb4219bef..ec02c710f 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 4d520e7be..5536b7e83 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 42673592f..d1d604227 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 From e05dca61a628783080eff62c348b83a93658aec7 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 16:31:56 +0300 Subject: [PATCH 089/229] refactoring: log_event(), is_format_valid() --- bin/v-acknowledge-user-notification | 4 +- bin/v-activate-vesta-license | 2 +- bin/v-add-backup-host | 23 +- bin/v-add-cron-job | 13 +- bin/v-add-cron-reports | 4 +- bin/v-add-cron-restart-job | 2 +- bin/v-add-cron-vesta-autoupdate | 9 +- bin/v-add-database | 17 +- bin/v-add-database-host | 18 +- bin/v-add-dns-domain | 31 +- bin/v-add-dns-on-web-alias | 4 +- bin/v-add-dns-record | 13 +- bin/v-add-domain | 6 +- bin/v-add-firewall-ban | 11 +- bin/v-add-firewall-chain | 4 +- bin/v-add-firewall-rule | 15 +- bin/v-add-mail-account | 19 +- bin/v-add-mail-account-alias | 4 +- bin/v-add-mail-account-autoreply | 4 +- bin/v-add-mail-account-forward | 6 +- bin/v-add-mail-account-fwd-only | 6 +- bin/v-add-mail-domain | 13 +- bin/v-add-mail-domain-antispam | 4 +- bin/v-add-mail-domain-antivirus | 4 +- bin/v-add-mail-domain-catchall | 4 +- bin/v-add-mail-domain-dkim | 4 +- bin/v-add-remote-dns-domain | 2 +- bin/v-add-remote-dns-host | 11 +- bin/v-add-remote-dns-record | 2 +- bin/v-add-sys-firewall | 2 +- bin/v-add-sys-ip | 17 +- bin/v-add-sys-quota | 2 +- bin/v-add-sys-sftp-jail | 2 +- bin/v-add-user | 18 +- bin/v-add-user-favourites | 12 +- bin/v-add-user-notification | 9 +- bin/v-add-user-package | 30 +- bin/v-add-web-domain-ftp | 8 +- bin/v-add-web-domain-httpauth | 6 +- bin/v-add-web-domain-stats-user | 4 +- bin/v-backup-users | 2 +- bin/v-change-cron-job | 11 +- bin/v-change-database-host-password | 4 +- bin/v-change-database-owner | 12 +- bin/v-change-database-password | 4 +- bin/v-change-database-user | 4 +- bin/v-change-dns-domain-exp | 4 +- bin/v-change-dns-domain-ip | 4 +- bin/v-change-dns-domain-soa | 4 +- bin/v-change-dns-domain-tpl | 4 +- bin/v-change-dns-domain-ttl | 4 +- bin/v-change-dns-record | 11 +- bin/v-change-dns-record-id | 4 +- bin/v-change-domain-owner | 6 +- bin/v-change-firewall-rule | 13 +- bin/v-change-mail-account-password | 4 +- bin/v-change-mail-account-quota | 6 +- bin/v-change-mail-domain-catchall | 4 +- bin/v-change-remote-dns-domain-exp | 2 +- bin/v-change-remote-dns-domain-soa | 2 +- bin/v-change-remote-dns-domain-ttl | 2 +- bin/v-change-sys-config-value | 4 +- bin/v-change-sys-hostname | 4 +- bin/v-change-sys-ip-name | 6 +- bin/v-change-sys-ip-nat | 6 +- bin/v-change-sys-ip-owner | 4 +- bin/v-change-sys-ip-status | 8 +- bin/v-change-sys-language | 6 +- bin/v-change-sys-timezone | 4 +- bin/v-change-user-contact | 4 +- bin/v-change-user-language | 8 +- bin/v-change-user-name | 4 +- bin/v-change-user-ns | 16 +- bin/v-change-user-package | 27 +- bin/v-change-user-password | 4 +- bin/v-change-user-shell | 4 +- bin/v-change-user-template | 4 +- bin/v-change-web-domain-ftp-password | 6 +- bin/v-change-web-domain-ftp-path | 8 +- bin/v-change-web-domain-httpauth | 6 +- bin/v-check-user-password | 2 +- bin/v-deactivate-vesta-license | 2 +- bin/v-delete-backup-host | 4 +- bin/v-delete-cron-job | 4 +- bin/v-delete-cron-reports | 4 +- bin/v-delete-cron-restart-job | 2 +- bin/v-delete-cron-vesta-autoupdate | 2 +- bin/v-delete-database | 4 +- bin/v-delete-database-host | 4 +- bin/v-delete-databases | 4 +- bin/v-delete-dns-domain | 4 +- bin/v-delete-dns-domains | 4 +- bin/v-delete-dns-domains-src | 4 +- bin/v-delete-dns-on-web-alias | 4 +- bin/v-delete-dns-record | 4 +- bin/v-delete-domain | 4 +- bin/v-delete-firewall-ban | 4 +- bin/v-delete-firewall-chain | 4 +- bin/v-delete-firewall-rule | 4 +- bin/v-delete-mail-account | 4 +- bin/v-delete-mail-account-alias | 6 +- bin/v-delete-mail-account-autoreply | 6 +- bin/v-delete-mail-account-forward | 6 +- bin/v-delete-mail-account-fwd-only | 4 +- bin/v-delete-mail-domain | 4 +- bin/v-delete-mail-domain-antispam | 4 +- bin/v-delete-mail-domain-antivirus | 4 +- bin/v-delete-mail-domain-catchall | 4 +- bin/v-delete-mail-domain-dkim | 4 +- bin/v-delete-mail-domains | 4 +- bin/v-delete-remote-dns-domain | 2 +- bin/v-delete-remote-dns-host | 4 +- bin/v-delete-remote-dns-record | 2 +- bin/v-delete-sys-firewall | 2 +- bin/v-delete-sys-ip | 8 +- bin/v-delete-sys-quota | 2 +- bin/v-delete-sys-sftp-jail | 2 +- bin/v-delete-user-backup | 4 +- bin/v-delete-user-favourites | 10 +- bin/v-delete-user-ips | 4 +- bin/v-delete-user-notification | 4 +- bin/v-delete-user-package | 6 +- bin/v-delete-user-sftp-jail | 4 +- bin/v-delete-web-domain-ftp | 6 +- bin/v-delete-web-domain-httpauth | 6 +- bin/v-delete-web-domain-stats | 4 +- bin/v-delete-web-domain-stats-user | 4 +- bin/v-delete-web-domains | 4 +- bin/v-get-dns-domain-value | 4 +- bin/v-get-mail-account-value | 4 +- bin/v-get-mail-domain-value | 4 +- bin/v-get-user-value | 2 +- bin/v-get-web-domain-value | 2 +- bin/v-insert-dns-domain | 11 +- bin/v-insert-dns-record | 4 +- bin/v-insert-dns-records | 4 +- bin/v-rebuild-cron-jobs | 4 +- bin/v-rebuild-databases | 4 +- bin/v-rebuild-dns-domain | 4 +- bin/v-rebuild-dns-domains | 4 +- bin/v-rebuild-mail-domains | 4 +- bin/v-rebuild-user | 4 +- bin/v-restore-user | 28 +- bin/v-schedule-user-backup | 4 +- bin/v-schedule-user-restore | 4 +- bin/v-search-domain-owner | 2 +- bin/v-search-object | 4 +- bin/v-search-user-object | 4 +- bin/v-suspend-cron-job | 4 +- bin/v-suspend-cron-jobs | 4 +- bin/v-suspend-database | 4 +- bin/v-suspend-database-host | 4 +- bin/v-suspend-databases | 4 +- bin/v-suspend-dns-domain | 4 +- bin/v-suspend-dns-domains | 4 +- bin/v-suspend-dns-record | 4 +- bin/v-suspend-domain | 4 +- bin/v-suspend-firewall-rule | 4 +- bin/v-suspend-mail-account | 4 +- bin/v-suspend-mail-accounts | 4 +- bin/v-suspend-mail-domain | 4 +- bin/v-suspend-mail-domains | 4 +- bin/v-suspend-remote-dns-host | 4 +- bin/v-suspend-user | 4 +- bin/v-suspend-web-domains | 4 +- bin/v-unsuspend-cron-job | 4 +- bin/v-unsuspend-cron-jobs | 4 +- bin/v-unsuspend-database | 4 +- bin/v-unsuspend-database-host | 4 +- bin/v-unsuspend-databases | 4 +- bin/v-unsuspend-dns-domain | 4 +- bin/v-unsuspend-dns-domains | 4 +- bin/v-unsuspend-dns-record | 4 +- bin/v-unsuspend-domain | 4 +- bin/v-unsuspend-firewall-rule | 4 +- bin/v-unsuspend-mail-account | 4 +- bin/v-unsuspend-mail-accounts | 4 +- bin/v-unsuspend-mail-domain | 4 +- bin/v-unsuspend-mail-domains | 4 +- bin/v-unsuspend-remote-dns-host | 4 +- bin/v-unsuspend-user | 4 +- bin/v-unsuspend-web-domains | 4 +- bin/v-update-database-disk | 4 +- bin/v-update-databases-disk | 4 +- bin/v-update-dns-templates | 2 +- bin/v-update-mail-domain-disk | 4 +- bin/v-update-mail-domains-disk | 4 +- bin/v-update-sys-ip | 2 +- bin/v-update-sys-ip-counters | 4 +- bin/v-update-sys-queue | 2 +- bin/v-update-sys-rrd | 2 +- bin/v-update-sys-rrd-mysql | 2 +- bin/v-update-sys-rrd-net | 3 + bin/v-update-sys-rrd-pgsql | 2 +- bin/v-update-sys-vesta | 2 +- bin/v-update-user-backup-exclusions | 8 +- bin/v-update-user-backups | 14 +- bin/v-update-user-counters | 4 +- bin/v-update-user-disk | 4 +- bin/v-update-user-package | 4 +- bin/v-update-user-quota | 4 +- bin/v-update-user-stats | 35 +- bin/v-update-web-domain-disk | 4 +- bin/v-update-web-domain-stat | 6 +- bin/v-update-web-domain-traff | 4 +- bin/v-update-web-domains-disk | 4 +- bin/v-update-web-domains-stat | 4 +- bin/v-update-web-domains-traff | 4 +- func/db.sh | 18 +- func/main.sh | 641 +++++---------------------- func/remote.sh | 2 +- 211 files changed, 756 insertions(+), 1091 deletions(-) diff --git a/bin/v-acknowledge-user-notification b/bin/v-acknowledge-user-notification index 84823d277..19ea65f85 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 f6cc05e02..6d5c875ec 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 5595c0439..0d0b70046 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 @@ -145,7 +145,7 @@ if [ "$type" = 'sftp' ]; then $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 +153,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 +180,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 b6c41480a..2a1a7c9b2 100755 --- a/bin/v-add-cron-job +++ b/bin/v-add-cron-job @@ -34,13 +34,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 +48,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 +83,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 e0d6b21a9..df7859054 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 474ef1196..9b0612655 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 2d0268371..3ad0ba4ea 100755 --- a/bin/v-add-cron-vesta-autoupdate +++ b/bin/v-add-cron-vesta-autoupdate @@ -34,6 +34,11 @@ 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') @@ -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 68e676479..438b473ec 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 550d0a707..c7b23ddfb 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 852050ceb..df9ab30ae 100755 --- a/bin/v-add-dns-domain +++ b/bin/v-add-dns-domain @@ -41,7 +41,7 @@ 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" @@ -52,37 +52,37 @@ is_dns_template_valid 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 +127,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 +145,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 +154,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 +205,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 e0eded79a..cc587483d 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 988c0fbe8..1cdb57d79 100755 --- a/bin/v-add-dns-record +++ b/bin/v-add-dns-record @@ -52,7 +52,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 +60,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 +70,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 +119,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 0af33c0d3..c18c9cb56 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" @@ -42,7 +42,7 @@ if [ -z "$ip" ]; then ip=$(get_user_ip $user) if [ -z "$ip" ]; then echo "Error: no avaiable IP address" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi fi diff --git a/bin/v-add-firewall-ban b/bin/v-add-firewall-ban index 6fb61c8d0..a1eed13eb 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 735cd11d1..f963dade4 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 37abe98b7..6fb867d36 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-mail-account b/bin/v-add-mail-account index 5bc5cf02e..77e44dfae 100755 --- a/bin/v-add-mail-account +++ b/bin/v-add-mail-account @@ -29,16 +29,16 @@ 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" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" is_object_unsuspended 'mail' 'DOMAIN' "$domain" -is_package_full 'MAIL_ACCOUNTS' +is_package_full 'MAIL_USER' is_mail_new "$account" is_password_valid @@ -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 9cd2b06b9..004e6e4d4 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 a1cd09f9c..88070f7ce 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 5f4eaeed9..1a990a31d 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 72e7c8ec0..277776ba8 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 9fbd18525..68ac1fa1a 100755 --- a/bin/v-add-mail-domain +++ b/bin/v-add-mail-domain @@ -38,7 +38,7 @@ 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" @@ -50,10 +50,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 +139,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 20e0c2010..916f15403 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 fe7151d24..d18857cb4 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 8ce5eddf0..91dc0354b 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 f2accc035..fe709a590 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 a2f5b34a0..b82ea4fdc 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 32614ce0f..0c52f79b9 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 9848ef234..000f29486 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 ab40345bd..b154c7f09 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 3b1a835eb..307d6805b 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 f0acde21e..51074f02e 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 c31fb4390..896fb0506 100755 --- a/bin/v-add-sys-sftp-jail +++ b/bin/v-add-sys-sftp-jail @@ -101,6 +101,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 35424381b..27d0da204 100755 --- a/bin/v-add-user +++ b/bin/v-add-user @@ -25,7 +25,7 @@ is_user_free() { check_sysuser=$(cut -f 1 -d : /etc/passwd | grep -w "$user" ) if [ ! -z "$check_sysuser" ] || [ -e "$USER_DATA" ]; then echo "Error: user $user exists" - log_event "$E_EXISTS" "$EVENT" + log_event "$E_EXISTS" "$ARGUMENTS" exit $E_EXISTS fi } @@ -36,9 +36,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 +50,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 +134,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 @@ -181,8 +185,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 +211,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 84764e4ad..188638290 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 dcc61f8a1..5945b1923 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 49332154d..23f427255 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-web-domain-ftp b/bin/v-add-web-domain-ftp index 6a55155c5..8d888093a 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 5f27399af..42dd269e0 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-stats-user b/bin/v-add-web-domain-stats-user index 007c013da..ab23f209b 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-users b/bin/v-backup-users index 3473ad70c..874739286 100755 --- a/bin/v-backup-users +++ b/bin/v-backup-users @@ -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 c38ad7e9e..7a30a2585 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 abe8e06b9..fc0662935 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 166528f81..274f7aad6 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 @@ -120,6 +120,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 1272f00ad..b911747c9 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 332dfc103..752a79327 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 da75bca81..ec11acc95 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 a066c6be7..47e01f426 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 3a8670f76..553bcfc9d 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 e8ee90c6c..db68c94c7 100755 --- a/bin/v-change-dns-domain-tpl +++ b/bin/v-change-dns-domain-tpl @@ -29,7 +29,7 @@ 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" @@ -98,6 +98,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 120d7e0db..0e85391fd 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 1569ae9c5..9f5dfb082 100755 --- a/bin/v-change-dns-record +++ b/bin/v-change-dns-record @@ -30,7 +30,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 +67,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 +109,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 42ab1d74e..4c321b0f5 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 1943473e4..66ab4ca35 100755 --- a/bin/v-change-domain-owner +++ b/bin/v-change-domain-owner @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'DOMAIN USER [IP]' -validate_format 'domain' 'user' +is_format_valid 'domain' 'user' is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" if [ ! -z "$ip" ]; then @@ -36,7 +36,7 @@ fi owner=$(v-search-domain-owner $domain) if [ -z "$owner" ]; then echo "Error: domain $domain doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi if [ "$owner" = "$user" ]; then @@ -168,6 +168,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 806f093bb..d2502bce7 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-mail-account-password b/bin/v-change-mail-account-password index 3109ea212..80d0713b6 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" @@ -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 3055da72e..0d4f8d533 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 97909fd66..25e0caaa9 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 a335d63bc..421e1408b 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 65a0c8dfd..0974e1aa2 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 b0e45b774..6bdc90e88 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 0af44ee3c..31b626342 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 d977f39ff..bf1e8bae1 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 425efb6ec..8e77805c1 100755 --- a/bin/v-change-sys-ip-name +++ b/bin/v-change-sys-ip-name @@ -24,9 +24,9 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'IP IP_NAME' -validate_format 'ip' +is_format_valid 'ip' if [ ! -z "$ip_name" ]; then - validate_format 'ip_name' + is_format_valid 'ip_name' fi is_ip_valid @@ -45,6 +45,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 a76e8878c..3af6e7168 100755 --- a/bin/v-change-sys-ip-nat +++ b/bin/v-change-sys-ip-nat @@ -25,9 +25,9 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'IP NAT_IP [RESTART]' -validate_format 'ip' +is_format_valid 'ip' if [ ! -z "$nat_ip" ]; then - validate_format 'nat_ip' + is_format_valid 'nat_ip' fi is_ip_valid @@ -82,6 +82,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 3fbfc43ee..952b6ca12 100755 --- a/bin/v-change-sys-ip-owner +++ b/bin/v-change-sys-ip-owner @@ -24,7 +24,7 @@ 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 @@ -77,6 +77,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 907c9e964..64c9513f5 100755 --- a/bin/v-change-sys-ip-status +++ b/bin/v-change-sys-ip-status @@ -24,11 +24,11 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'IP IP_STATUS' -validate_format 'ip' 'ip_status' +is_format_valid 'ip' 'ip_status' is_ip_valid if [ "$ip_status" = "$(get_ip_value '$STATUS')" ]; then echo "Error: status $ip_status is already set" - log_event "$E_EXISTS" "$EVENT" + log_event "$E_EXISTS" "$ARGUMENTS" exit $E_EXISTS fi @@ -37,7 +37,7 @@ 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" + log_event "$E_INUSE" "$ARGUMENTS" exit $E_INUSE fi @@ -56,6 +56,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 5b79b0f4a..6f27a9020 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 d168d13a2..bfd4e5bc8 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 4228e5aab..bbbb2d168 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 dceda7d2f..38084ccc3 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 41223181d..2776b4cb5 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 02f06ff0b..0e28766cf 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 80dd20464..7f8feee31 100755 --- a/bin/v-change-user-package +++ b/bin/v-change-user-package @@ -41,62 +41,57 @@ is_package_avalable() { 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" + log_event "$E_LIMIT" "$ARGUMENTS" exit $E_LIMIT 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" + log_event "$E_LIMIT" "$ARGUMENTS" exit $E_LIMIT 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" + log_event "$E_LIMIT" "$ARGUMENTS" exit $E_LIMIT 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" + log_event "$E_LIMIT" "$ARGUMENTS" exit $E_LIMIT 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" + log_event "$E_LIMIT" "$ARGUMENTS" exit $E_LIMIT 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" + log_event "$E_LIMIT" "$ARGUMENTS" exit $E_LIMIT 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" + log_event "$E_LIMIT" "$ARGUMENTS" exit $E_LIMIT 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 +154,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 +192,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 af194361d..196239bc3 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 @@ -48,6 +48,6 @@ 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 721c84755..6a079c0ad 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 a67bfc3d8..7ba774fbb 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" @@ -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-ftp-password b/bin/v-change-web-domain-ftp-password index 900c6fa30..1eabe0ef6 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 71da7d853..6ac0b7df2 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 3483838c1..91ed166d4 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-check-user-password b/bin/v-check-user-password index 1eecc3dd3..73a44be62 100755 --- a/bin/v-check-user-password +++ b/bin/v-check-user-password @@ -24,7 +24,7 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# check_args '2' "$#" 'USER PASSWORD' -validate_format 'user' +is_format_valid 'user' # Checking user if [ ! -d "$VESTA/data/users/$user" ] && [ "$user" != 'root' ]; then diff --git a/bin/v-deactivate-vesta-license b/bin/v-deactivate-vesta-license index 13a400aba..ad8dc44be 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 21e272218..d5d447565 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 d41e0141d..77668e17f 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 65c219a73..45fd88cab 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 0b27db2bb..33c8c5661 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 ec38facfe..051bc7649 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 e67eda7f1..33ed53f14 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 a5e8a91f0..4a52be10f 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 6edf5fb9f..d771bba35 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 b12d62961..5281a10a9 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 785e3d5b8..f74b4e146 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 22f039841..6f1958c6b 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 6cd93dff9..74cc49f4a 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 f838b9a0a..1c713d013 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 a1fff5ea8..f53478464 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" @@ -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-delete-firewall-ban b/bin/v-delete-firewall-ban index 8bae0e2ce..52f3403d8 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 917682b94..7e510d80f 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 d37e8a182..8f646644b 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 6ae7bfec6..a16829a63 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 87a1213c3..470fa859d 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 2f2ef486c..67e79d897 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 a77b3d7e9..ff289e353 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 b437b7e30..dbc9a727a 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 a57e459d9..4833e656e 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 e33b266e1..8ba2cfd01 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 7473c1251..baea45751 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 3791d7adc..549c5523f 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 88b480b0f..e8e57cf49 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 116e48743..e734f8449 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 b92aec229..5200030e3 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 9e4b73680..e65867390 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 eab802ccd..cbc1d4c87 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 86b0ff5de..75b787945 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 17ea16129..3ef1548a4 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 b2a5d27b2..4b8913bfe 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 103b41a90..c48fd65f6 100755 --- a/bin/v-delete-sys-sftp-jail +++ b/bin/v-delete-sys-sftp-jail @@ -84,6 +84,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-backup b/bin/v-delete-user-backup index 00b7e86b5..4a71a40b0 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-favourites b/bin/v-delete-user-favourites index 8efffe083..374fa4308 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 292ce809e..7f8e32241 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 c9e32607c..6b223e0b4 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 8ce2195af..dbd75a861 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 e25121a95..d6f515444 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-ftp b/bin/v-delete-web-domain-ftp index 8368b1799..b53440c4f 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 96c7eed31..84f9767a3 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-stats b/bin/v-delete-web-domain-stats index bd5627a6c..34c35f568 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 6e1008ba0..c00672719 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 dec2156aa..1406abb9f 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-get-dns-domain-value b/bin/v-get-dns-domain-value index d8aa0179e..1786e9007 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 282c81989..556c61ce5 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 da9abf16e..616df282c 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 415a764a4..a832801ac 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 2c8569375..eb6a63d08 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 be66b0a82..4c445e153 100755 --- a/bin/v-insert-dns-domain +++ b/bin/v-insert-dns-domain @@ -27,7 +27,7 @@ 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" @@ -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 12bf1fd42..90205f615 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 9030ba74d..3ce767f8b 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-rebuild-cron-jobs b/bin/v-rebuild-cron-jobs index 0d75000eb..5acc830d0 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 4d50a09da..0b8f4a2d2 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 3e123992f..2aa34f6f4 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 e3303de62..4bb537ab0 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 8e101a947..82b7fa144 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 52385694e..6a2b4d037 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-restore-user b/bin/v-restore-user index a1daaa347..d2a7eae5b 100755 --- a/bin/v-restore-user +++ b/bin/v-restore-user @@ -40,7 +40,7 @@ source $VESTA/conf/vesta.conf is_backup_valid() { if [ ! -e "$BACKUP/$backup" ]; then echo "Error: backup doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi } @@ -52,7 +52,7 @@ is_backup_valid() { args_usage='USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]' check_args '2' "$#" "$args_usage" -validate_format 'user' 'backup' +is_format_valid 'user' 'backup' is_backup_valid is_backup_available @@ -92,7 +92,7 @@ if [ "$disk_usage" -ge "$BACKUP_DISK_LIMIT" ]; then echo "Not enough disk space to run restore" | $send_mail -s "$subj" $email echo "Error: Not enough disk space" sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_DISK" "$EVENT" + log_event "$E_DISK" "$ARGUMENTS" exit $E_DISK fi @@ -107,7 +107,7 @@ while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do echo "LoadAverage $i is above threshold" |$send_mail -s "$subj" $email echo "Error: LA is too high" sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_LA" "$EVENT" + log_event "$E_LA" "$ARGUMENTS" exit $E_LA fi (( ++i)) @@ -118,7 +118,7 @@ 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" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -208,7 +208,7 @@ if [ "$web" != 'no' ]; then echo "Web domain $domain belongs to another user" |\ $send_mail -s "$subj" $email rm -rf $tmpdir - log_event "$E_EXISTS" "$EVENT" + log_event "$E_EXISTS" "$ARGUMENTS" exit $E_EXISTS fi @@ -236,7 +236,7 @@ if [ "$web" != 'no' ]; then echo "Error: no avaiable IP address" echo "No available IP address" |\ $send_mail -s "$subj" $email - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi echo "$IP" > $tmpdir/ip_mapping.$domain @@ -250,7 +250,7 @@ if [ "$web" != 'no' ]; then echo "Error: no avaiable web template" echo "No available web template" |\ $send_mail -s "$subj" $email - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi fi @@ -263,7 +263,7 @@ if [ "$web" != 'no' ]; then echo "Error: no avaiable proxy template" echo "No available proxy tpl" |\ $send_mail -s "$subj" $email - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi fi @@ -467,7 +467,7 @@ if [ "$dns" != 'no' ]; then echo "DNS domain $domain belongs to another user" |\ $send_mail -s "$subj" $email rm -rf $tmpdir - log_event "$E_EXISTS" "$EVENT" + log_event "$E_EXISTS" "$ARGUMENTS" exit $E_EXISTS fi @@ -487,7 +487,7 @@ if [ "$dns" != 'no' ]; then 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" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -507,7 +507,7 @@ if [ "$dns" != 'no' ]; then echo "Error: no avaiable dns template" echo "No available dns template" |\ $send_mail -s "$subj" $email - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi fi @@ -595,7 +595,7 @@ if [ "$mail" != 'no' ]; then echo "Mail domain $domain belongs to another user" |\ $send_mail -s "$subj" $email rm -rf $tmpdir - log_event "$E_EXISTS" "$EVENT" + log_event "$E_EXISTS" "$ARGUMENTS" exit $E_EXISTS fi @@ -844,6 +844,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 404f012ed..dcbcedb61 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 e91f0cac8..031b024e8 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 146a0b4c1..5b88f4959 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 a15bc9ed1..c642b3e63 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 28ca2a1e3..3e25372df 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-suspend-cron-job b/bin/v-suspend-cron-job index 78e75da65..499c07725 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 f53facf48..935347ad6 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 e8348873e..ac736ea17 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 03cdd9de1..daf39adc6 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 d1a7104c3..6c15b014e 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 be32feb5a..ebe45e3ac 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 d561495b2..c38e4336d 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 0a68f8ce3..811965f9f 100755 --- a/bin/v-suspend-dns-record +++ b/bin/v-suspend-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_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -64,6 +64,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 fabbb2dec..6f0175349 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 dffeba716..67f14cecb 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 7ea2bc6a8..ba11c8e0b 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 d8cae620e..a62069cf2 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 93a1328cb..afdc1f3dd 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 61e2dda84..333228ee1 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 c44e65739..f83b61720 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 aba883ac2..6d0490563 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-domains b/bin/v-suspend-web-domains index 0f4c31162..be4803900 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 b2fa0f79a..108ddf90c 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 f7b5e876e..bc4cfc4ea 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 ea58389c6..89892cb76 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 e9e7b80df..928776a56 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 52d153af2..30525c869 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 e7c412849..49a540910 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 083dc3d34..eb27ba2ec 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 963e9676d..2f27a5ae9 100755 --- a/bin/v-unsuspend-dns-record +++ b/bin/v-unsuspend-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_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_object_valid 'user' 'USER' "$user" is_object_valid 'dns' 'DOMAIN' "$domain" @@ -63,6 +63,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 32920c31a..294b485c6 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 f2d27a48e..be6320d41 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 98936101f..0137f8651 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 d78165f6b..5ad6285d3 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 8cf65fa9f..ad9df12e2 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 30d70a9af..6e319c944 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 4e0023658..8e3308bfa 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 cfba10ab3..1d3feecdf 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-domains b/bin/v-unsuspend-web-domains index a07ca86aa..b9f4d1e41 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 77768c1db..5365177a3 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 066dde388..fd2c34748 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 a5f4a14b6..1db87781c 100755 --- a/bin/v-update-dns-templates +++ b/bin/v-update-dns-templates @@ -28,7 +28,7 @@ cd $tmpdir wget http://c.vestacp.com/$VERSION/rhel/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-mail-domain-disk b/bin/v-update-mail-domain-disk index c5bf5ba59..68d58a613 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 58ad8f04d..ca93627f3 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 f995c1af4..b783b177e 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 dc8c561c5..54711f924 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 56842b488..77da8ee4b 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 f8633aa76..77412eaf1 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 c045057f9..0d870e44c 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 542c00cfd..e9c642e4a 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 3eeb16ab6..9c8e3cb7d 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 a03470e9b..a42e4d719 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 ed90e9d90..9a7a4a1d7 100755 --- a/bin/v-update-user-backup-exclusions +++ b/bin/v-update-user-backup-exclusions @@ -20,7 +20,7 @@ source $VESTA/conf/vesta.conf is_file_available() { if [ ! -e "$vfile" ]; then echo "Error: file $vfile doesn't exist" - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi } @@ -30,7 +30,7 @@ is_file_valid() { vcontent=$(cat $vfile) if [[ "$vcontent" =~ $exclude ]]; then echo "Error: invalid characters in the exlusion list" - log_event "$E_INVALID" "$EVENT" + log_event "$E_INVALID" "$ARGUMENTS" exit $E_INVALID fi } @@ -41,7 +41,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 +78,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 index 6dfe32992..4125a6bbb 100755 --- a/bin/v-update-user-backups +++ b/bin/v-update-user-backups @@ -151,7 +151,7 @@ init_ftp_variables() { if [ -z "$HOST" ] || [ -z "$USERNAME" ] || [ -z "$PASSWORD" ] ||\ [ -z "$BPATH" ]; then echo "Error: Parsing error" - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi } @@ -163,7 +163,7 @@ check_ftp_connection(){ rm $ftmpdir" if [ ! -z "$(ftpc "$command")" ] ; then echo "Error: FTP error" - log_event "$E_FTP" "$EVENT" + log_event "$E_FTP" "$ARGUMENTS" exit $E_FTP fi } @@ -176,11 +176,11 @@ check_ftp_connection(){ check_args '1' "$#" 'USER' is_system_enabled "$BACKUP_SYSTEM" 'BACKUP_SYSTEM' -validate_format 'user' +is_format_valid 'user' is_object_valid 'user' 'USER' "$user" la=$(cat /proc/loadavg |cut -f 1 -d ' '|cut -f 1 -d '.') if [ "$la" -ge "$BACKUP_LA_LIMIT" ]; then - log_event "$E_LA" "$EVENT" + log_event "$E_LA" "$ARGUMENTS" exit $E_LA fi @@ -215,7 +215,7 @@ if [ "$type" = 'ftp' ]; then cd $tmpdir if [ ! -z "$(ftpc "get $backup")" ]; then echo "Error: FTP transfer error" - log_event "$E_FTP" "$EVENT" + log_event "$E_FTP" "$ARGUMENTS" exit $E_FTP fi get_backup_info $tmpdir/$backup $type >> $tmp_file @@ -242,7 +242,7 @@ if [ "$type" = 'ftp,local' ] || [ "$type" = 'local,ftp' ]; then cd $tmpdir if [ ! -z "$(ftpc "get $backup")" ]; then echo "Error: FTP transfer error" - log_event "$E_FTP" "$EVENT" + log_event "$E_FTP" "$ARGUMENTS" exit $E_FTP fi get_backup_info $tmpdir/$backup ftp >> $tmp_file @@ -273,6 +273,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-update-user-counters b/bin/v-update-user-counters index 9fc1ac5e3..5fcdd6712 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 a37f9a389..a99eaf379 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 511c8dbf0..fa9e5ce09 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 9de5f28c7..b0f376a2a 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 7dc467443..255981da1 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 @@ -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,6 +123,7 @@ 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 @@ -129,16 +132,18 @@ stats="$VESTA/data/users/admin/overall_stats.log" 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 67dcaa8aa..5317b3f01 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 a89664fb5..b03bb8fc7 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" @@ -44,7 +44,7 @@ get_domain_values 'web' config="$HOMEDIR/$user/conf/web/$STATS.$domain.conf" if [ ! -e "$config" ]; then echo "Error: Parsing error" - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi @@ -146,6 +146,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 d78e9938f..fda546ccb 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 ae538997a..5951f289a 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 1ef2abd83..acd24f16f 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 dfeacf780..ebecf1def 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 270313f69..983174e7a 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 @@ -33,7 +33,7 @@ mysql_connect() { $send_mail -s "$subj" $email fi echo "Error: Connection to $HOST failed" - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi } @@ -52,7 +52,7 @@ mysql_dump() { $send_mail -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 @@ -75,7 +75,7 @@ psql_connect() { $send_mail -s "$subj" $email fi echo "Error: Connection to $HOST failed" - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi } @@ -93,7 +93,7 @@ psql_dump() { $send_mail -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 @@ -345,7 +345,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/main.sh b/func/main.sh index 94f64e294..d55faac86 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,47 +97,52 @@ 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 );; + WEB_DOMAINS) used=$(wc -l $USER_DATA/web.conf |cut -f1 -d \ );; + WEB_ALIASES) used=$(echo $aliases |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 \ );; + 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 \ );; + MAIL_USER) 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 \ );; esac - limit=$(grep "^$1=" $USER_DATA/user.conf | cut -f 2 -d \' ) + 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 + 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='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' + PW_LENGHT='10' pw_matrix=${1-$PW_MATRIX} pw_lenght=${2-$PW_LENGHT} while [ ${n:=1} -le $pw_lenght ]; do @@ -146,24 +152,20 @@ gen_password() { 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 + check_result $E_INVALID "$2 type is invalid" fi } @@ -172,9 +174,7 @@ 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_FORBIDEN "permission denied" fi } @@ -182,9 +182,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 +191,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 +206,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 +234,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 +256,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 +266,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 +369,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,13 +443,12 @@ 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 fi @@ -532,423 +457,77 @@ sync_cron_jobs() { 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 +# User format validator +is_user_format_valid() { + if ! [[ "$1" =~ ^[a-zA-Z0-9][-|\.|_|a-zA-Z0-9]{0,28}[a-zA-Z0-9]$ ]]; then + check_result $E_INVALID "invalid user format :: $1" fi } -# Password -validate_format_password() { - if [ "${#1}" -lt '6' ]; then - echo "Error: password is too short" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID +# Domain format validator +is_domain_format_valid() { + exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]" + if [[ "$1" =~ $exclude ]]; then + check_result $E_INVALID "invalid domain format :: $1" 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)) +# 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 +} - 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 +# IP format validator +is_ip_format_valid() { + ip_regex='([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])' + if ! [[ $1 =~ ^$ip_regex\.$ip_regex\.$ip_regex\.$ip_regex$ ]]; then + check_result $E_INVALID "invalid IP format :: $1" 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 - 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 - fi - fi -} - -# Domain -validate_format_domain() { - exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]" - if [[ "$1" =~ $exclude ]] || [[ "$1" =~ "^[0-9]+$" ]]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - 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 - fi -} - -# Database -validate_format_database() { - exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|/|\|\"|'|;|%|\`| ]" - if [[ "$1" =~ $exclude ]] || [ 65 -le ${#1} ]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# Database user -validate_format_dbuser() { - exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|/|\|\"|'|;|%|\`| ]" - if [[ "$1" =~ $exclude ]] || [ 17 -le ${#1} ]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# DNS type -validate_format_dns_type() { - 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 - 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 - fi -} - -# Minute / Hour / Day / Month / Day of Week -validate_format_mhdmw() { - limit=60 - check_format='' - if [ "$2" = 'day' ]; then - limit=31 - fi - if [ "$2" = 'month' ]; then - limit=12 - fi - if [ "$2" = 'wday' ]; then - limit=7 - fi - if [ "$1" = '*' ]; then - check_format='ok' - fi - if [[ "$1" =~ ^[\*]+[/]+[0-9] ]]; then - if [ "$(echo $1 |cut -f 2 -d /)" -lt $limit ]; then - check_format='ok' - fi - fi - if [[ "$1" =~ ^[0-9][-|,|0-9]{0,28}[0-9]$ ]]; then - check_format='ok' - crn_values=${1//,/ } - crn_values=${crn_values//-/ } - for crn_vl in $crn_values; do - if [ "$crn_vl" -gt $limit ]; then - check_format='invalid' - fi - done - fi - if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -lt $limit ]; then - check_format='ok' - fi - if [ "$check_format" != 'ok' ]; then - echo "Error: $2 $1 is not valid" - log_event "$E_INVALID" "$EVENT" - exit $E_INVALID - fi -} - -# proxy extention or DNS record -validate_format_common() { - exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]" +# Proxy extention format validator +is_extention_format_valid() { + 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 + check_result $E_INVALID "invalid proxy extention 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 - 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 +# 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 } # 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 + aliases) is_alias_format_valid "$arg" ;; + domain) is_domain_format_valid "$arg" ;; + proxy_ext) is_extention_format_valid "$arg" ;; + ip) is_ip_format_valid "$arg" ;; + user) is_user_format_valid "$arg" ;; + 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/remote.sh b/func/remote.sh index f680ce0d3..ba93f4483 100644 --- a/func/remote.sh +++ b/func/remote.sh @@ -111,7 +111,7 @@ remote_dns_health_check() { # Deleting tmp file rm -f $tmpfile - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" # Suspending remote host dconf="../../conf/dns-cluster" From c8d45ed139ad2f0ef60f50df173d9bd6f8d1c505 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 17:02:29 +0300 Subject: [PATCH 090/229] ip functions refactoring --- func/ip.sh | 148 +++++++++++++++++++++++++---------------------------- 1 file changed, 71 insertions(+), 77 deletions(-) diff --git a/func/ip.sh b/func/ip.sh index 9fb0a28aa..e3d84c630 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,7 @@ 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 + check_result $E_EXISTS "$key is not empty = $value" fi } @@ -94,8 +53,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 +70,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 +102,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 +126,28 @@ 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 / + nat=$(grep -H "^NAT='$1'" $VESTA/data/ips/*) + if [ ! -z "$nat" ]; then + echo "$nat" |cut -f 1 -d : |cut -f 7 -d / else get_user_ip 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 +194,55 @@ 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='$owner'" $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" +} + +# 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() { + if [ ! -z $1 ]; then + if [ -e "$VESTA/data/ips/$1" ]; then + ip_data=$(cat $VESTA/data/ips/$1) + local_ip="$1" + else + nat=$(grep -H "^NAT='$1'" $VESTA/data/ips/*) + check_result $? "IP $1 doesn't exist" $E_NOTEXIST + nat=$(echo "$nat" |cut -f1 -d: |cut -f7 -d/) + ip_data=$(cat $VESTA/data/ips/$nat) + local_ip=$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 + else + get_user_ip + fi +} From 73b63016d40fba6f527cedef3a5045df430675a0 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 17:04:18 +0300 Subject: [PATCH 091/229] sftp chroot hotfixes --- bin/v-add-user-sftp-jail | 6 +++--- bin/v-delete-user | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bin/v-add-user-sftp-jail b/bin/v-add-user-sftp-jail index de2990386..ed96509d9 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-delete-user b/bin/v-delete-user index d811fe0cd..68c374b58 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 @@ -89,6 +89,11 @@ fi 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 @@ -122,6 +127,6 @@ fi # Logging log_history "deleted system user $user" '' 'admin' -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit From 872cd3ac453d0ec67df0e6971e693fba9a9bf679 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 17:05:41 +0300 Subject: [PATCH 092/229] web function refactoring --- bin/v-add-web-domain | 221 +++----- bin/v-add-web-domain-alias | 49 +- bin/v-add-web-domain-proxy | 43 +- bin/v-add-web-domain-ssl | 54 +- bin/v-add-web-domain-stats | 8 +- bin/v-change-web-domain-ip | 39 +- bin/v-change-web-domain-proxy-tpl | 35 +- bin/v-change-web-domain-sslcert | 4 +- bin/v-change-web-domain-sslhome | 14 +- bin/v-change-web-domain-stats | 10 +- bin/v-change-web-domain-tpl | 41 +- bin/v-delete-web-domain | 134 ++--- bin/v-delete-web-domain-alias | 52 +- bin/v-delete-web-domain-proxy | 37 +- bin/v-delete-web-domain-ssl | 30 +- bin/v-rebuild-web-domains | 139 +----- bin/v-suspend-web-domain | 39 +- bin/v-unsuspend-web-domain | 38 +- func/domain.sh | 804 +++++++++++++++--------------- func/rebuild.sh | 192 +++---- 20 files changed, 744 insertions(+), 1239 deletions(-) diff --git a/bin/v-add-web-domain b/bin/v-add-web-domain index ebe5f0b58..ab0a5ffa6 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,76 +54,24 @@ 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] [ALIASES] [PROXY_EXTENTIONS] [RESTART]' +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 -fi +is_package_full 'WEB_DOMAINS' 'WEB_ALIASES' +is_domain_new 'web' "$domain,$aliases" +is_ip_valid "$ip" #----------------------------------------------------------# # 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 +81,49 @@ 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 "$BACKEND_SYSTEM" ]; then + $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 aliases +if [ "$aliases" != 'none' ]; then + prepare_web_aliases "www.$domain,$aliases,$(get_ip_alias $domain)" fi -# 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 +132,28 @@ fi #----------------------------------------------------------# # Increasing counters -increase_ip_value "$ip" -increase_user_value "$user" '$U_WEB_DOMAINS' +increase_ip_value "$local_ip" +increase_user_value "$user" '$U_WEB_DOMAINS' "$alias_number" increase_user_value "$user" '$U_WEB_ALIASES' -# 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='$aliases' 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 +162,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 5e1a5e781..ee6b94e34 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,30 @@ 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 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 +83,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 +97,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-proxy b/bin/v-add-web-domain-proxy index 476f0cd40..44c4d8a00 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" "$PROXY.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" "$PROXY.stpl" fi @@ -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 72767e772..fa8de5c68 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 929e27d0a..deec16468 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-change-web-domain-ip b/bin/v-change-web-domain-ip index 22aaca855..8ca71f030 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 #----------------------------------------------------------# @@ -13,7 +13,7 @@ user=$1 domain=$(idn -t --quiet -u "$2" ) domain_idn=$(idn -t --quiet -a "$domain") -ip=$3 +new_domain=$(echo $3 |tr '[:upper:]' '[:lower:]') restart=$4 # Includes @@ -28,7 +28,7 @@ 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" @@ -42,33 +42,22 @@ is_ip_avalable # 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 +# Replacing vhost +replace_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" - replace_web_config + replace_web_config "$WEB_SYSTEM" "$TPL.stpl" fi -# Checking proxy +# Replacing proxy vhost 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 + replace_web_config "$PROXY_SYSTEM" "$PROXY.tpl" + if [ "$SSL" = 'yes' ]; then + replace_web_config "$PROXY_SYSTEM" "$PROXY.stpl" fi fi @@ -97,6 +86,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 be74713d2..60b27017f 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) # 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 376241946..67c1e0eb5 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 52399ef8f..c57646293 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 a341f6427..fcd661ff9 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 6d7d51b7b..f844b7512 100755 --- a/bin/v-change-web-domain-tpl +++ b/bin/v-change-web-domain-tpl @@ -29,7 +29,7 @@ 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" @@ -47,42 +47,17 @@ get_domain_values 'web' 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 +TPL=$template +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 +76,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-delete-web-domain b/bin/v-delete-web-domain index 4daaf5186..a44bc63d0 100755 --- a/bin/v-delete-web-domain +++ b/bin/v-delete-web-domain @@ -14,10 +14,18 @@ # Argument definition user=$1 -domain=$(idn -t --quiet -u "$2" ) -domain_idn=$(idn -t --quiet -a "$domain") +domain=$2 restart=$3 +# Additional argument formatting +if [[ "$domain" =~ [[:upper:]] ]]; then + domain=$(echo "$domain" |tr '[:upper:]' '[:lower:]') +fi +domain_idn="$domain" +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $tmp_alias) +fi + # Includes source $VESTA/func/main.sh source $VESTA/func/domain.sh @@ -30,7 +38,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 +50,40 @@ 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' +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 +101,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 +139,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 9b0ac0d06..8c3cccd8e 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,7 +28,7 @@ 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" @@ -40,7 +38,7 @@ 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" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -49,41 +47,29 @@ fi # Action # #----------------------------------------------------------# -# Defining new alias string +# Preparing domain values for the template substitution 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 +80,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 +95,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-proxy b/bin/v-delete-web-domain-proxy index d86cb4022..558f67f43 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 49943baba..9115b9d9a 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-rebuild-web-domains b/bin/v-rebuild-web-domains index c0fe2a1fc..d3277fb9a 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 $(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 $(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-suspend-web-domain b/bin/v-suspend-web-domain index a7fb6ba0d..387ff759d 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) # 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-unsuspend-web-domain b/bin/v-unsuspend-web-domain index 61071f0fc..c1821fc39 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) # 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/func/domain.sh b/func/domain.sh index 6fdabc08e..586a0bd20 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -1,216 +1,378 @@ +#----------------------------------------------------------# +# 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 + template=$1 + if [ -z "$template" ]; then + template=$(grep WEB_TEMPLATE $USER_DATA/user.conf |cut -f2 -d \') + if [ -z "$template" ]; then + template="default" + fi + fi + tpl="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.tpl" + stpl="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.stpl" + if [ ! -e "$tpl" ] || [ ! -e "$stpl" ]; then + check_result $E_NOTEXIST "$template 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 + proxy=$1 + if [ -z "$proxy" ]; then + proxy=$(grep PROXY_TEMPLATE $USER_DATA/user.conf |cut -f2 -d \') + if [ -z "$proxy" ]; then + proxy="default" + fi + fi + tpl="$WEBTPL/$PROXY_SYSTEM/$proxy.tpl" + stpl="$WEBTPL/$PROXY_SYSTEM/$proxy.stpl" + if [ ! -e "$tpl" ] || [ ! -e "$stpl" ]; then + check_result $E_NOTEXIST "$proxy 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) +is_backend_template_valid() { + if [ ! -e "$WEBTPL/$WEB_BACKEND/$1.tpl" ]; then + check_result $E_NOTEXIST "$backend backend template doesn't exist" 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 +} + +# 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 - 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 + web_user=$(echo "$web" |cut -f 7 -d /) + if [ "$web_user" != "$user" ]; then + check_result $E_EXISTS "Web domain $1 exist" fi fi } -# Backend pool check -is_web_backend_pool_valid(){ +# 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%|$group|g" \ + -e "s|%home%|$HOMEDIR|g" \ + -e "s|%docroot%|$HOMEDIR/$user/web/$domain/public_html|g" \ + -e "s|%sdocroot%|$HOMEDIR/$user/web/$domain/public_html|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 [ "$WEB_SYSTEM" != '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() { + 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\/.*$WEB_SYSTEM.conf/d" /etc/$1/conf.d/vesta.conf + rm -f $HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf + rm -f $HOMEDIR/$user/conf/web/s$WEB_SYSTEM.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 + check_result $E_NOTEXIST "dns template $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 +451,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 +459,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 +481,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 +499,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/rebuild.sh b/func/rebuild.sh index 86641a740..3f41360de 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 @@ -595,7 +529,7 @@ rebuild_mysql_database() { if [ ! -z "$send_mail" ]; then echo "Can't parse MySQL DB config" | $send_mail -s "$subj" $email fi - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi @@ -607,7 +541,7 @@ rebuild_mysql_database() { echo "Database connection to MySQL host $HOST failed" |\ $send_mail -s "$subj" $email fi - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi @@ -638,7 +572,7 @@ rebuild_pgsql_database() { if [ ! -z "$send_mail" ]; then echo "Can't parse PostgreSQL config" | $send_mail -s "$subj" $email fi - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING fi @@ -650,7 +584,7 @@ rebuild_pgsql_database() { echo "Database connection to PostgreSQL host $HOST failed" |\ $send_mail -s "$subj" $email fi - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi @@ -683,7 +617,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 +633,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 From 41eb0d81c4a5b24bf3926880d0074b83acfbf5db Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 17:07:15 +0300 Subject: [PATCH 093/229] LetsEncrypt core API support --- bin/v-add-letsencrypt-domain | 97 ++++++++++++++++++++++ bin/v-add-letsencrypt-user | 111 +++++++++++++++++++++++++ bin/v-check-letsencrypt-domain | 145 +++++++++++++++++++++++++++++++++ bin/v-generate-ssl-cert | 69 ++++++++++------ bin/v-list-letsencrypt-user | 82 +++++++++++++++++++ bin/v-sign-letsencrypt-csr | 112 +++++++++++++++++++++++++ bin/v-update-letsencrypt-ssl | 66 +++++++++++++++ 7 files changed, 655 insertions(+), 27 deletions(-) create mode 100755 bin/v-add-letsencrypt-domain create mode 100755 bin/v-add-letsencrypt-user create mode 100755 bin/v-check-letsencrypt-domain create mode 100755 bin/v-list-letsencrypt-user create mode 100755 bin/v-sign-letsencrypt-csr create mode 100755 bin/v-update-letsencrypt-ssl diff --git a/bin/v-add-letsencrypt-domain b/bin/v-add-letsencrypt-domain new file mode 100755 index 000000000..368511f96 --- /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 [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 000000000..431c2543b --- /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-check-letsencrypt-domain b/bin/v-check-letsencrypt-domain new file mode 100755 index 000000000..c38aea4ae --- /dev/null +++ b/bin/v-check-letsencrypt-domain @@ -0,0 +1,145 @@ +#!/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 +check_domain=$(grep -w "$domain'" $USER_DATA/web.conf) +if [ -z "$check_domain" ]; 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 "$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) +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" |tr ',' '\n' |grep -A 3 http-01 |grep token) +token=$(echo "$token" |cut -f 4 -d \") +uri=$(echo "$answer" |tr ',' '\n' |grep -A 3 http-01 |grep uri) +uri=$(echo "$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 + if [ ! -z "$PROXY_SYSTEM" ]; then + $BIN/v-restart-proxy + check_result $? "Proxy restart failed" >/dev/null + else + $BIN/v-restart-web + check_result $? "Web restart failed" >/dev/null + fi + 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 + +# 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 |tr ',' '\n' |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-generate-ssl-cert b/bin/v-generate-ssl-cert index e96edaa51..4ae895820 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,8 @@ # 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=$(echo $domain |tr '[:upper:]' '[:lower:]') domain_alias=$domain email=$2 country=$3 @@ -20,7 +20,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 +36,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,15 +52,18 @@ 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' #----------------------------------------------------------# @@ -70,31 +75,41 @@ 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/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 \ @@ -124,7 +139,7 @@ case $format in esac # Delete tmp dir -rm -rf $workdir +#rm -rf $workdir #----------------------------------------------------------# @@ -132,6 +147,6 @@ rm -rf $workdir #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-list-letsencrypt-user b/bin/v-list-letsencrypt-user new file mode 100755 index 000000000..cded96001 --- /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-sign-letsencrypt-csr b/bin/v-sign-letsencrypt-csr new file mode 100755 index 000000000..c0d4ecebc --- /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-update-letsencrypt-ssl b/bin/v-update-letsencrypt-ssl new file mode 100755 index 000000000..39052097a --- /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 From 72eddc3319b939de9a53ca990e71e6272518551e Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 17:08:07 +0300 Subject: [PATCH 094/229] web function refactoring --- bin/v-add-web-domain-backend | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/bin/v-add-web-domain-backend b/bin/v-add-web-domain-backend index cc595ce50..301b10d6d 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 From 6168985b9833d9221ece3050aec359a106bd2247 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 17:08:34 +0300 Subject: [PATCH 095/229] web function refactoring --- bin/v-change-web-domain-backend-tpl | 81 ++++++++++++----------------- 1 file changed, 34 insertions(+), 47 deletions(-) diff --git a/bin/v-change-web-domain-backend-tpl b/bin/v-change-web-domain-backend-tpl index 91f6f3c20..186ab136f 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 #----------------------------------------------------------# # 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 From 8b237eb936e6efe1edaf9b3893f6090730c266db Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 17:09:25 +0300 Subject: [PATCH 096/229] web function refactoring --- bin/v-delete-user-backup-exclusions | 4 +-- bin/v-delete-web-domain-backend | 41 ++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/bin/v-delete-user-backup-exclusions b/bin/v-delete-user-backup-exclusions index 875eaa919..0b1a1e330 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-web-domain-backend b/bin/v-delete-web-domain-backend index 4780ae367..92829bc68 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 From 325ca65f32e878e945e83004513acd857da4c7f5 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 9 Jun 2016 17:09:55 +0300 Subject: [PATCH 097/229] web function refactoring --- bin/v-backup-user | 90 +++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 49 deletions(-) diff --git a/bin/v-backup-user b/bin/v-backup-user index 0a335da47..7d294b9b2 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" @@ -69,7 +69,7 @@ while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do echo -e "$mail_text" |$send_mail -s "$subj" $email echo "Error: LA is too high" sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_LA" "$EVENT" + log_event "$E_LA" "$ARGUMENTS" exit $E_LA fi la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.') @@ -81,7 +81,7 @@ 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" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST fi @@ -167,30 +167,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 @@ -514,14 +514,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\.") @@ -548,18 +548,18 @@ local_backup(){ $send_mail -s "$subj" $email echo "Error: Not enough disk space" sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_DISK" "$EVENT" + log_event "$E_DISK" "$ARGUMENTS" exit $E_DISK 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" + msg="$msg\n$(date "+%F %T") Local: $BACKUP/$user.$date.tar" U_BACKUPS=$(ls $BACKUP/ |grep "^$user." |wc -l) update_user_value "$user" '$U_BACKUPS' "$U_BACKUPS" } @@ -586,17 +586,13 @@ ftp_backup() { echo "$ftp_conf_error" |$send_mail -s "$subj" $email echo "Error: $VESTA/conf/ftp.backup.conf doesn't exist" sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST 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' @@ -609,13 +605,13 @@ ftp_backup() { $send_mail -s "$subj" $email echo "Error: Parsing error" sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING 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) @@ -626,7 +622,7 @@ ftp_backup() { $send_mail -s "$subj" $email echo "Error: can't login to ftp ftp://$USERNAME@$HOST" sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_CONNECT" "$EVENT" + log_event "$E_CONNECT" "$ARGUMENTS" exit $E_CONNECT fi @@ -641,7 +637,7 @@ ftp_backup() { $send_mail -s "$subj" $email echo "Error: cant's create ftp folder ftp://$HOST$BPATH" sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_FTP" "$EVENT" + log_event "$E_FTP" "$ARGUMENTS" exit $E_FTP fi @@ -661,13 +657,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 } @@ -737,17 +733,13 @@ sftp_backup() { echo "$sftp_conf_error" |$send_mail -s "$subj" $email echo "Error: $VESTA/conf/sftp.backup.conf doesn't exist" sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_NOTEXIST" "$EVENT" + log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST 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' @@ -760,12 +752,12 @@ sftp_backup() { $send_mail -s "$subj" $email echo "Error: Parsing error" sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$E_PARSING" "$EVENT" + log_event "$E_PARSING" "$ARGUMENTS" exit $E_PARSING 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" # Checking network connection and write permissions sftmpdir="$BPATH/vst.bK76A9SUkt" @@ -781,7 +773,7 @@ sftp_backup() { $send_mail -s "$subj" $email;; esac sed -i "/ $user /d" $VESTA/data/queue/backup.pipe - log_event "$rc" "$EVENT" + log_event "$rc" "$ARGUMENTS" exit "$rc" fi @@ -799,16 +791,16 @@ sftp_backup() { fi # Uploading backup archive - echo -e "$(date "+%F %T") Uploading $user.$DATE.tar ..." + echo -e "$(date "+%F %T") Uploading $user.$date.tar ..." 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 } @@ -851,10 +843,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 +854,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 @@ -881,6 +873,6 @@ if [ "$notify" != 'no' ]; then fi # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit From a61a6e979eac35c08896760a58fbce66627749e0 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 16:31:43 +0300 Subject: [PATCH 098/229] refactoring: log_event(), is_format_valid() --- bin/v-add-cron-job | 5 +- bin/v-add-cron-vesta-autoupdate | 4 +- bin/v-add-dns-domain | 11 +- bin/v-add-dns-record | 4 +- bin/v-add-domain | 6 +- bin/v-add-mail-account | 4 +- bin/v-add-mail-domain | 9 +- bin/v-add-sys-sftp-jail | 3 +- bin/v-add-user | 6 +- bin/v-add-web-domain | 6 +- bin/v-add-web-domain-proxy | 6 +- bin/v-backup-user | 283 ++++------ bin/v-change-database-owner | 1 - bin/v-change-dns-domain-tpl | 27 +- bin/v-change-domain-owner | 16 +- bin/v-change-fs-file-permission | 6 +- bin/v-change-mail-account-password | 2 +- bin/v-change-sys-ip-name | 6 +- bin/v-change-sys-ip-nat | 6 +- bin/v-change-sys-ip-owner | 3 +- bin/v-change-sys-ip-status | 2 +- bin/v-change-user-package | 28 +- bin/v-change-user-password | 2 +- bin/v-change-user-template | 4 +- bin/v-change-web-domain-backend-tpl | 2 +- bin/v-change-web-domain-ip | 14 +- bin/v-change-web-domain-proxy-tpl | 2 +- bin/v-change-web-domain-tpl | 5 +- bin/v-delete-domain | 10 +- bin/v-delete-sys-sftp-jail | 3 +- bin/v-delete-user | 40 +- bin/v-delete-web-domain | 13 +- bin/v-delete-web-domain-alias | 8 +- bin/v-generate-ssl-cert | 15 +- bin/v-list-dns-template | 2 +- bin/v-list-sys-users | 2 +- bin/v-list-user-ips | 6 +- bin/v-restart-cron | 5 +- bin/v-restart-dns | 7 +- bin/v-restart-ftp | 6 +- bin/v-restart-mail | 6 +- bin/v-restart-proxy | 6 +- bin/v-restart-service | 4 +- bin/v-restart-web | 6 +- bin/v-restart-web-backend | 6 +- bin/v-restore-user | 838 +++++++++++----------------- bin/v-suspend-web-domain | 2 +- bin/v-unsuspend-web-domain | 2 +- bin/v-update-dns-templates | 2 +- bin/v-update-user-backup-exclusions | 8 +- bin/v-update-user-backups | 278 --------- bin/v-update-web-domain-stat | 4 +- 52 files changed, 582 insertions(+), 1170 deletions(-) delete mode 100755 bin/v-update-user-backups diff --git a/bin/v-add-cron-job b/bin/v-add-cron-job index 2a1a7c9b2..6b67eab43 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 #----------------------------------------------------------# diff --git a/bin/v-add-cron-vesta-autoupdate b/bin/v-add-cron-vesta-autoupdate index 3ad0ba4ea..8b8d13677 100755 --- a/bin/v-add-cron-vesta-autoupdate +++ b/bin/v-add-cron-vesta-autoupdate @@ -40,8 +40,8 @@ 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='*' diff --git a/bin/v-add-dns-domain b/bin/v-add-dns-domain index df9ab30ae..d1db42e2e 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 @@ -48,7 +53,7 @@ is_object_unsuspended 'user' 'USER' "$user" is_domain_new 'dns' 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') diff --git a/bin/v-add-dns-record b/bin/v-add-dns-record index 1cdb57d79..f522f77dc 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:]') diff --git a/bin/v-add-domain b/bin/v-add-domain index c18c9cb56..0880442f9 100755 --- a/bin/v-add-domain +++ b/bin/v-add-domain @@ -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 $user if [ -z "$ip" ]; then - echo "Error: no avaiable IP address" - log_event "$E_NOTEXIST" "$ARGUMENTS" - exit $E_NOTEXIST + check_result $E_NOTEXIST "no avaiable IP address" fi fi diff --git a/bin/v-add-mail-account b/bin/v-add-mail-account index 77e44dfae..586871a47 100755 --- a/bin/v-add-mail-account +++ b/bin/v-add-mail-account @@ -38,7 +38,7 @@ is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'mail' 'DOMAIN' "$domain" is_object_unsuspended 'mail' 'DOMAIN' "$domain" -is_package_full 'MAIL_USER' +is_package_full 'MAIL_ACCOUNTS' is_mail_new "$account" is_password_valid @@ -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 diff --git a/bin/v-add-mail-domain b/bin/v-add-mail-domain index 68ac1fa1a..62858ef32 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} diff --git a/bin/v-add-sys-sftp-jail b/bin/v-add-sys-sftp-jail index 896fb0506..7953f1518 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 diff --git a/bin/v-add-user b/bin/v-add-user index 27d0da204..66730a3f7 100755 --- a/bin/v-add-user +++ b/bin/v-add-user @@ -24,9 +24,7 @@ source $VESTA/conf/vesta.conf is_user_free() { check_sysuser=$(cut -f 1 -d : /etc/passwd | grep -w "$user" ) if [ ! -z "$check_sysuser" ] || [ -e "$USER_DATA" ]; then - echo "Error: user $user exists" - log_event "$E_EXISTS" "$ARGUMENTS" - exit $E_EXISTS + check_result $E_EXISTS "user $user exists" fi } @@ -155,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' diff --git a/bin/v-add-web-domain b/bin/v-add-web-domain index ab0a5ffa6..6a8cf1983 100755 --- a/bin/v-add-web-domain +++ b/bin/v-add-web-domain @@ -61,7 +61,7 @@ is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_package_full 'WEB_DOMAINS' 'WEB_ALIASES' is_domain_new 'web' "$domain,$aliases" -is_ip_valid "$ip" +is_ip_valid "$ip" "$user" #----------------------------------------------------------# @@ -133,8 +133,8 @@ fi # Increasing counters increase_ip_value "$local_ip" -increase_user_value "$user" '$U_WEB_DOMAINS' "$alias_number" -increase_user_value "$user" '$U_WEB_ALIASES' +increase_user_value "$user" '$U_WEB_DOMAINS' +increase_user_value "$user" '$U_WEB_ALIASES' "$alias_number" # Generating timestamp time_n_date=$(date +'%T %F') diff --git a/bin/v-add-web-domain-proxy b/bin/v-add-web-domain-proxy index 44c4d8a00..373263523 100755 --- a/bin/v-add-web-domain-proxy +++ b/bin/v-add-web-domain-proxy @@ -55,11 +55,11 @@ local_ip=$(get_real_ip $IP) # Preparing domain values for the template substitution PROXY_EXT="$extentions" -add_web_config "$PROXY_SYSTEM" "$PROXY.tpl" +add_web_config "$PROXY_SYSTEM" "$template.tpl" # Adding proxy for ssl if [ "$SSL" = 'yes' ]; then - add_web_config "$PROXY_SYSTEM" "$PROXY.stpl" + add_web_config "$PROXY_SYSTEM" "$template.stpl" fi @@ -68,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 diff --git a/bin/v-backup-user b/bin/v-backup-user index 7d294b9b2..88db71d16 100755 --- a/bin/v-backup-user +++ b/bin/v-backup-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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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 @@ -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,8 +426,8 @@ 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' @@ -484,8 +439,7 @@ if [ "$USER" != '*' ]; then 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 @@ -533,23 +485,20 @@ 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" "$ARGUMENTS" - 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 @@ -558,8 +507,8 @@ local_backup(){ 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,12 +531,12 @@ 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" "$ARGUMENTS" - exit $E_NOTEXIST + check_result "$E_NOTEXIST" "$error" fi # Parse config @@ -600,13 +549,12 @@ 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" "$ARGUMENTS" - exit $E_PARSING + check_result "$E_PARSING" "$error" fi @@ -617,13 +565,12 @@ ftp_backup() { 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" "$ARGUMENTS" - exit $E_CONNECT + check_result "$E_CONNECT" "$error" fi # Check ftp permissions @@ -632,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" "$ARGUMENTS" - exit $E_FTP + check_result "$E_FTP" "$error" fi # Checking retention @@ -648,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 @@ -729,12 +675,12 @@ 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" "$ARGUMENTS" - exit $E_NOTEXIST + check_result "$E_NOTEXIST" "$error" fi # Parse config @@ -747,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" "$ARGUMENTS" - 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" @@ -765,33 +711,32 @@ 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" "$ARGUMENTS" - 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 @@ -804,8 +749,7 @@ sftp_backup() { 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 @@ -831,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 #----------------------------------------------------------# @@ -866,10 +808,11 @@ 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 diff --git a/bin/v-change-database-owner b/bin/v-change-database-owner index 274f7aad6..d84d8eb2d 100755 --- a/bin/v-change-database-owner +++ b/bin/v-change-database-owner @@ -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 ;; diff --git a/bin/v-change-dns-domain-tpl b/bin/v-change-dns-domain-tpl index db68c94c7..b0304a48a 100755 --- a/bin/v-change-dns-domain-tpl +++ b/bin/v-change-dns-domain-tpl @@ -35,7 +35,7 @@ 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" #----------------------------------------------------------# @@ -52,8 +52,31 @@ 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 |\ +echo "$template_data" |\ sed -e "s/%ip%/$ip/g" \ -e "s/%domain_idn%/$domain_idn/g" \ -e "s/%domain%/$domain/g" \ diff --git a/bin/v-change-domain-owner b/bin/v-change-domain-owner index 66ab4ca35..c6be1c89b 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]' +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" "$ARGUMENTS" - exit $E_NOTEXIST + check_result $E_NOTEXIST "domain $domain doesn't exist" fi if [ "$owner" = "$user" ]; then exit diff --git a/bin/v-change-fs-file-permission b/bin/v-change-fs-file-permission index 29e47babb..3e6ae6b54 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 80d0713b6..da6b788c5 100755 --- a/bin/v-change-mail-account-password +++ b/bin/v-change-mail-account-password @@ -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 diff --git a/bin/v-change-sys-ip-name b/bin/v-change-sys-ip-name index 8e77805c1..bf930096a 100755 --- a/bin/v-change-sys-ip-name +++ b/bin/v-change-sys-ip-name @@ -25,10 +25,8 @@ source $VESTA/conf/vesta.conf check_args '2' "$#" 'IP IP_NAME' is_format_valid 'ip' -if [ ! -z "$ip_name" ]; then - is_format_valid 'ip_name' -fi -is_ip_valid +is_format_valid 'ip_name' +is_ip_valid "$ip" #----------------------------------------------------------# diff --git a/bin/v-change-sys-ip-nat b/bin/v-change-sys-ip-nat index 3af6e7168..8f6815558 100755 --- a/bin/v-change-sys-ip-nat +++ b/bin/v-change-sys-ip-nat @@ -26,10 +26,8 @@ source $VESTA/conf/vesta.conf check_args '2' "$#" 'IP NAT_IP [RESTART]' is_format_valid 'ip' -if [ ! -z "$nat_ip" ]; then - is_format_valid 'nat_ip' -fi -is_ip_valid +is_format_valid 'nat_ip' +is_ip_valid "$ip" #----------------------------------------------------------# diff --git a/bin/v-change-sys-ip-owner b/bin/v-change-sys-ip-owner index 952b6ca12..5ea71c348 100755 --- a/bin/v-change-sys-ip-owner +++ b/bin/v-change-sys-ip-owner @@ -27,11 +27,10 @@ check_args '2' "$#" '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 # #----------------------------------------------------------# diff --git a/bin/v-change-sys-ip-status b/bin/v-change-sys-ip-status index 64c9513f5..ef48af7b7 100755 --- a/bin/v-change-sys-ip-status +++ b/bin/v-change-sys-ip-status @@ -25,7 +25,7 @@ source $VESTA/conf/vesta.conf check_args '2' "$#" 'IP IP_STATUS' is_format_valid 'ip' 'ip_status' -is_ip_valid +is_ip_valid "$ip" if [ "$ip_status" = "$(get_ip_value '$STATUS')" ]; then echo "Error: status $ip_status is already set" log_event "$E_EXISTS" "$ARGUMENTS" diff --git a/bin/v-change-user-package b/bin/v-change-user-package index 7f8feee31..bb0b21d88 100755 --- a/bin/v-change-user-package +++ b/bin/v-change-user-package @@ -40,51 +40,37 @@ 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - exit $E_LIMIT + check_result $E_LIMIT "Package doesn't cover BANDWIDTH usage" fi fi } diff --git a/bin/v-change-user-password b/bin/v-change-user-password index 196239bc3..a420502a1 100755 --- a/bin/v-change-user-password +++ b/bin/v-change-user-password @@ -43,7 +43,7 @@ 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 diff --git a/bin/v-change-user-template b/bin/v-change-user-template index 7ba774fbb..5a3295352 100755 --- a/bin/v-change-user-template +++ b/bin/v-change-user-template @@ -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 diff --git a/bin/v-change-web-domain-backend-tpl b/bin/v-change-web-domain-backend-tpl index 186ab136f..40b11df1f 100755 --- a/bin/v-change-web-domain-backend-tpl +++ b/bin/v-change-web-domain-backend-tpl @@ -35,7 +35,7 @@ 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_backend_template_valid $template #----------------------------------------------------------# diff --git a/bin/v-change-web-domain-ip b/bin/v-change-web-domain-ip index 8ca71f030..b3e19432f 100755 --- a/bin/v-change-web-domain-ip +++ b/bin/v-change-web-domain-ip @@ -11,9 +11,8 @@ # Argument definition user=$1 -domain=$(idn -t --quiet -u "$2" ) -domain_idn=$(idn -t --quiet -a "$domain") -new_domain=$(echo $3 |tr '[:upper:]' '[:lower:]') +domain=$2 +ip=$3 restart=$4 # Includes @@ -34,8 +33,7 @@ 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" #----------------------------------------------------------# @@ -46,6 +44,12 @@ is_ip_avalable get_domain_values 'web' old=$(get_real_ip $IP) new=$ip +if [[ "$domain" = *[![:ascii:]]* ]]; then + domain_idn=$(idn -t --quiet -a $domain) +else + domain_idn=$domain +fi + # Replacing vhost replace_web_config "$WEB_SYSTEM" "$TPL.tpl" diff --git a/bin/v-change-web-domain-proxy-tpl b/bin/v-change-web-domain-proxy-tpl index 60b27017f..cb51169b9 100755 --- a/bin/v-change-web-domain-proxy-tpl +++ b/bin/v-change-web-domain-proxy-tpl @@ -48,7 +48,7 @@ is_proxy_template_valid $template # Parsing domain values get_domain_values 'web' -ip=$(get_real_ip $IP) +local_ip=$(get_real_ip $IP) # Delete old vhost del_web_config "$PROXY_SYSTEM" "$PROXY.tpl" diff --git a/bin/v-change-web-domain-tpl b/bin/v-change-web-domain-tpl index f844b7512..3366c313d 100755 --- a/bin/v-change-web-domain-tpl +++ b/bin/v-change-web-domain-tpl @@ -35,7 +35,7 @@ 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,7 +44,7 @@ is_web_template_valid # Parsing domain values get_domain_values 'web' -ip=$(get_real_ip $IP) +local_ip=$(get_real_ip $IP) # Deleting domain del_web_config "$WEB_SYSTEM" "$TPL.tpl" @@ -53,7 +53,6 @@ if [ "$SSL" = 'yes' ]; then fi # Defining variables for new vhost config -TPL=$template prepare_web_domain_values add_web_config "$WEB_SYSTEM" "$TPL.tpl" if [ "$SSL" = 'yes' ]; then diff --git a/bin/v-delete-domain b/bin/v-delete-domain index f53478464..a315d3a87 100755 --- a/bin/v-delete-domain +++ b/bin/v-delete-domain @@ -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" "$ARGUMENTS" - exit $E_NOTEXIST + check_result $E_NOTEXISTS "domain $domain doesn't exist" fi # Restarting services diff --git a/bin/v-delete-sys-sftp-jail b/bin/v-delete-sys-sftp-jail index c48fd65f6..e04a15c06 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 diff --git a/bin/v-delete-user b/bin/v-delete-user index 68c374b58..c452f0a0e 100755 --- a/bin/v-delete-user +++ b/bin/v-delete-user @@ -38,52 +38,37 @@ 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 @@ -96,14 +81,13 @@ 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 diff --git a/bin/v-delete-web-domain b/bin/v-delete-web-domain index a44bc63d0..878ea472c 100755 --- a/bin/v-delete-web-domain +++ b/bin/v-delete-web-domain @@ -17,15 +17,6 @@ user=$1 domain=$2 restart=$3 -# Additional argument formatting -if [[ "$domain" =~ [[:upper:]] ]]; then - domain=$(echo "$domain" |tr '[:upper:]' '[:lower:]') -fi -domain_idn="$domain" -if [[ "$domain" = *[![:ascii:]]* ]]; then - domain_idn=$(idn -t --quiet -a $tmp_alias) -fi - # Includes source $VESTA/func/main.sh source $VESTA/func/domain.sh @@ -57,6 +48,10 @@ fi # 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 diff --git a/bin/v-delete-web-domain-alias b/bin/v-delete-web-domain-alias index 8c3cccd8e..2a2180610 100755 --- a/bin/v-delete-web-domain-alias +++ b/bin/v-delete-web-domain-alias @@ -35,11 +35,8 @@ 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" "$ARGUMENTS" - exit $E_NOTEXIST +if [ -z "$(echo $ALIAS |tr ',' '\n' |grep ^$dom_alias$)" ]; then + check_result $E_NOTEXIST "alias $dom_alias doesn't exist" fi @@ -48,6 +45,7 @@ fi #----------------------------------------------------------# # 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"|\ diff --git a/bin/v-generate-ssl-cert b/bin/v-generate-ssl-cert index 4ae895820..80912d789 100755 --- a/bin/v-generate-ssl-cert +++ b/bin/v-generate-ssl-cert @@ -12,7 +12,6 @@ # Argument definition domain=$1 domain=$(echo $domain |sed -e 's/\.*$//g' -e 's/^\.*//g') -domain=$(echo $domain |tr '[:upper:]' '[:lower:]') domain_alias=$domain email=$2 country=$3 @@ -70,6 +69,15 @@ 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 @@ -79,7 +87,7 @@ 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\ @@ -87,7 +95,7 @@ if [ -z "$aliases" ]; then -batch \ -subj "$subj" \ -key $domain.key \ - -out $domain.csr >/dev/null 2>&1 + -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," @@ -118,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' ) diff --git a/bin/v-list-dns-template b/bin/v-list-dns-template index f82473c21..2697c1750 100755 --- a/bin/v-list-dns-template +++ b/bin/v-list-dns-template @@ -82,7 +82,7 @@ csv_list() { check_args '1' "$#" 'TEMPLATE [FORMAT]' is_format_valid 'template' -is_dns_template_valid +is_dns_template_valid "$template" #----------------------------------------------------------# diff --git a/bin/v-list-sys-users b/bin/v-list-sys-users index 7cbf7f629..cd297338b 100755 --- a/bin/v-list-sys-users +++ b/bin/v-list-sys-users @@ -18,7 +18,7 @@ source $VESTA/func/main.sh # JSON list function json_list() { - objects=$(echo "$users" |wc -l) + objects=$(grep @ /etc/passwd |wc -l) i=1 echo '[' while read user; do diff --git a/bin/v-list-user-ips b/bin/v-list-user-ips index cacae76c1..dad6f6f8c 100755 --- a/bin/v-list-user-ips +++ b/bin/v-list-user-ips @@ -66,7 +66,7 @@ plain_list() { # CSV list function csv_list() { echo "IP,OWNER,STATUS,NAME,NAT" - for IP in $(ls $VESTA/data/ips/); do + for IP in $ips; do source $VESTA/data/ips/$IP echo "$IP,$OWNER,$STATUS,$NAME,$NAT" done @@ -88,10 +88,10 @@ is_object_valid 'user' 'USER' "$user" # Defining fileds to select owner='admin' -owner_ips=$(grep -A 1 "OWNER='$owner'" $VESTA/data/ips/*) +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 "OWNER='$user'" $VESTA/data/ips/*) +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' diff --git a/bin/v-restart-cron b/bin/v-restart-cron index 232e359c2..8fcaf2bec 100755 --- a/bin/v-restart-cron +++ b/bin/v-restart-cron @@ -14,14 +14,13 @@ source $VESTA/func/main.sh source $VESTA/conf/vesta.conf 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 +49,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 9945f32e9..8e84d66ef 100755 --- a/bin/v-restart-dns +++ b/bin/v-restart-dns @@ -19,15 +19,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 +54,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 ab0c78abb..9ab2d7714 100755 --- a/bin/v-restart-ftp +++ b/bin/v-restart-ftp @@ -14,14 +14,13 @@ source $VESTA/func/main.sh source $VESTA/conf/vesta.conf 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 +47,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 fc8f339f9..2784cd3d1 100755 --- a/bin/v-restart-mail +++ b/bin/v-restart-mail @@ -14,14 +14,13 @@ source $VESTA/func/main.sh source $VESTA/conf/vesta.conf 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 +47,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 31fcddc74..79776ce71 100755 --- a/bin/v-restart-proxy +++ b/bin/v-restart-proxy @@ -14,14 +14,13 @@ source $VESTA/func/main.sh source $VESTA/conf/vesta.conf 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 +47,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 d539c1a39..5df3e2559 100755 --- a/bin/v-restart-service +++ b/bin/v-restart-service @@ -30,13 +30,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 78c1e7a57..4b62a8a0b 100755 --- a/bin/v-restart-web +++ b/bin/v-restart-web @@ -14,14 +14,13 @@ source $VESTA/func/main.sh source $VESTA/conf/vesta.conf 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 +61,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 b2e747ef0..54ba8daa5 100755 --- a/bin/v-restart-web-backend +++ b/bin/v-restart-web-backend @@ -14,14 +14,13 @@ source $VESTA/func/main.sh source $VESTA/conf/vesta.conf 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 +47,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 d2a7eae5b..1c5de3652 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" "$ARGUMENTS" - 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 } @@ -53,170 +58,145 @@ is_backup_valid() { args_usage='USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]' check_args '2' "$#" "$args_usage" is_format_valid 'user' 'backup' -is_backup_valid -is_backup_available +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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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 domain_data.tar.gz) + 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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 domain_data.tar.gz) + 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" "$ARGUMENTS" - 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 # diff --git a/bin/v-suspend-web-domain b/bin/v-suspend-web-domain index 387ff759d..c31796046 100755 --- a/bin/v-suspend-web-domain +++ b/bin/v-suspend-web-domain @@ -43,7 +43,7 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain" # Parsing domain values get_domain_values 'web' SUSPENDED='yes' -ip=$(get_real_ip $IP) +local_ip=$(get_real_ip $IP) # Preparing domain values for the template substitution prepare_web_domain_values diff --git a/bin/v-unsuspend-web-domain b/bin/v-unsuspend-web-domain index c1821fc39..3b21248e3 100755 --- a/bin/v-unsuspend-web-domain +++ b/bin/v-unsuspend-web-domain @@ -41,7 +41,7 @@ is_object_suspended 'web' 'DOMAIN' "$domain" # Parsing domain values get_domain_values 'web' SUSPENDED='no' -ip=$(get_real_ip $IP) +local_ip=$(get_real_ip $IP) # Preparing domain values for the template substitution prepare_web_domain_values diff --git a/bin/v-update-dns-templates b/bin/v-update-dns-templates index 1db87781c..31361d001 100755 --- a/bin/v-update-dns-templates +++ b/bin/v-update-dns-templates @@ -25,7 +25,7 @@ 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" "$ARGUMENTS" diff --git a/bin/v-update-user-backup-exclusions b/bin/v-update-user-backup-exclusions index 9a7a4a1d7..c4b913267 100755 --- a/bin/v-update-user-backup-exclusions +++ b/bin/v-update-user-backup-exclusions @@ -19,9 +19,7 @@ source $VESTA/conf/vesta.conf is_file_available() { if [ ! -e "$vfile" ]; then - echo "Error: file $vfile doesn't exist" - log_event "$E_NOTEXIST" "$ARGUMENTS" - exit $E_NOTEXIST + check_result $E_NOTEXIST "file $vfile doesn't exist" fi } @@ -29,9 +27,7 @@ is_file_valid() { exclude="[!$#&;()\]" vcontent=$(cat $vfile) if [[ "$vcontent" =~ $exclude ]]; then - echo "Error: invalid characters in the exlusion list" - log_event "$E_INVALID" "$ARGUMENTS" - exit $E_INVALID + check_result $E_INVALID "invalid characters in the exlusion list" fi } diff --git a/bin/v-update-user-backups b/bin/v-update-user-backups deleted file mode 100755 index 4125a6bbb..000000000 --- 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - -exit diff --git a/bin/v-update-web-domain-stat b/bin/v-update-web-domain-stat index b03bb8fc7..56dfc93af 100755 --- a/bin/v-update-web-domain-stat +++ b/bin/v-update-web-domain-stat @@ -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" "$ARGUMENTS" - exit $E_PARSING + check_result $E_NOTEXISTS "$config doesn't exist" fi # Checking statistics directory From d4f30b570b61f5d7e005cda598fcc1f7c313159e Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 16:32:55 +0300 Subject: [PATCH 099/229] New session.save_path location --- upd/fix_sessions.sh | 64 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 upd/fix_sessions.sh diff --git a/upd/fix_sessions.sh b/upd/fix_sessions.sh new file mode 100755 index 000000000..faad94911 --- /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 From 5d30b67fb115934c8f84cc97833bf04c4d0ed661 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 16:33:24 +0300 Subject: [PATCH 100/229] refactoring: log_event(), is_format_valid() --- func/db.sh | 11 +- func/domain.sh | 45 +++---- func/ip.sh | 27 ++-- func/main.sh | 327 ++++++++++++++++++++++++++++++++++++++++++------ func/rebuild.sh | 24 ++-- func/remote.sh | 2 +- 6 files changed, 344 insertions(+), 92 deletions(-) diff --git a/func/db.sh b/func/db.sh index 983174e7a..c7514eeaf 100644 --- a/func/db.sh +++ b/func/db.sh @@ -30,7 +30,7 @@ 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" "$ARGUMENTS" @@ -49,7 +49,7 @@ 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" "$ARGUMENTS" @@ -72,7 +72,7 @@ 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" "$ARGUMENTS" @@ -90,7 +90,7 @@ 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" "$ARGUMENTS" @@ -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 diff --git a/func/domain.sh b/func/domain.sh index 586a0bd20..eda517a06 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -5,17 +5,10 @@ # Web template check is_web_template_valid() { if [ ! -z "$WEB_SYSTEM" ]; then - template=$1 - if [ -z "$template" ]; then - template=$(grep WEB_TEMPLATE $USER_DATA/user.conf |cut -f2 -d \') - if [ -z "$template" ]; then - template="default" - fi - fi - tpl="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.tpl" - stpl="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.stpl" + 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 "$template web template doesn't exist" + check_result $E_NOTEXIST "$1 web template doesn't exist" fi fi } @@ -23,25 +16,20 @@ is_web_template_valid() { # Proxy template check is_proxy_template_valid() { if [ ! -z "$PROXY_SYSTEM" ]; then - proxy=$1 - if [ -z "$proxy" ]; then - proxy=$(grep PROXY_TEMPLATE $USER_DATA/user.conf |cut -f2 -d \') - if [ -z "$proxy" ]; then - proxy="default" - fi - fi - tpl="$WEBTPL/$PROXY_SYSTEM/$proxy.tpl" - stpl="$WEBTPL/$PROXY_SYSTEM/$proxy.stpl" + tpl="$WEBTPL/$PROXY_SYSTEM/$1.tpl" + stpl="$WEBTPL/$PROXY_SYSTEM/$1.stpl" if [ ! -e "$tpl" ] || [ ! -e "$stpl" ]; then - check_result $E_NOTEXIST "$proxy proxy template doesn't exist" + check_result $E_NOTEXIST "$1 proxy template doesn't exist" fi fi } # Backend template check is_backend_template_valid() { - if [ ! -e "$WEBTPL/$WEB_BACKEND/$1.tpl" ]; then - check_result $E_NOTEXIST "$backend backend template doesn't exist" + 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 } @@ -210,7 +198,7 @@ add_web_config() { -e "s|%proxy_ssl_port%|$PROXY_SSL_PORT|g" \ -e "s/%proxy_extentions%/${PROXY_EXT//,/|}/g" \ -e "s|%user%|$user|g" \ - -e "s|%group%|$group|g" \ + -e "s|%group%|$user|g" \ -e "s|%home%|$HOMEDIR|g" \ -e "s|%docroot%|$HOMEDIR/$user/web/$domain/public_html|g" \ -e "s|%sdocroot%|$HOMEDIR/$user/web/$domain/public_html|g" \ @@ -225,7 +213,7 @@ add_web_config() { chmod 640 $conf if [ -z "$(grep "$conf" /etc/$1/conf.d/vesta.conf)" ]; then - if [ "$WEB_SYSTEM" != 'nginx' ]; then + if [ "$1" != 'nginx' ]; then echo "Include $conf" >> /etc/$1/conf.d/vesta.conf else echo "include $conf;" >> /etc/$1/conf.d/vesta.conf @@ -265,6 +253,10 @@ get_web_config_lines() { # 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 } @@ -355,9 +347,8 @@ is_web_domain_cert_valid() { # DNS template check is_dns_template_valid() { - t="$DNSTPL/$template.tpl" - if [ ! -e $t ]; then - check_result $E_NOTEXIST "dns template $template doesn't exist" + if [ ! -e "$DNSTPL/$1.tpl" ]; then + check_result $E_NOTEXIST "$1 dns template doesn't exist" fi } diff --git a/func/ip.sh b/func/ip.sh index e3d84c630..eb52a9905 100644 --- a/func/ip.sh +++ b/func/ip.sh @@ -33,7 +33,8 @@ is_ip_key_empty() { eval $string eval value="$key" if [ ! -z "$value" ] && [ "$value" != '0' ]; then - check_result $E_EXISTS "$key is not empty = $value" + key="$(echo $key|sed -e "s/\$U_//")" + check_result $E_EXISTS "IP is in use / $key = $value" fi } @@ -133,7 +134,6 @@ get_ip_value() { } - # Get real ip address get_real_ip() { if [ -e "$VESTA/data/ips/$1" ]; then @@ -142,8 +142,6 @@ get_real_ip() { nat=$(grep -H "^NAT='$1'" $VESTA/data/ips/*) if [ ! -z "$nat" ]; then echo "$nat" |cut -f 1 -d : |cut -f 7 -d / - else - get_user_ip fi fi } @@ -222,17 +220,22 @@ get_user_ip() { # Validate ip address is_ip_valid() { - if [ ! -z $1 ]; then - if [ -e "$VESTA/data/ips/$1" ]; then - ip_data=$(cat $VESTA/data/ips/$1) - local_ip="$1" + 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=$(grep -H "^NAT='$1'" $VESTA/data/ips/*) - check_result $? "IP $1 doesn't exist" $E_NOTEXIST nat=$(echo "$nat" |cut -f1 -d: |cut -f7 -d/) - ip_data=$(cat $VESTA/data/ips/$nat) 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 @@ -242,7 +245,5 @@ is_ip_valid() { if [ "$ip_owner" != "$user" ] && [ "$ip_owner" != "$owner" ]; then check_result $E_FORBIDEN "$user user can't use IP $1" fi - else - get_user_ip fi } diff --git a/func/main.sh b/func/main.sh index d55faac86..633875d53 100644 --- a/func/main.sh +++ b/func/main.sh @@ -112,17 +112,18 @@ is_system_enabled() { # User package check is_package_full() { case "$1" in - WEB_DOMAINS) used=$(wc -l $USER_DATA/web.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 |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_USER) 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 \ );; + 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 + 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 + if [ "$limit" != 'unlimited' ] && [[ "$used" -ge "$limit" ]]; then check_result $E_LIMIT "$1 limit is reached :: upgrade user package" fi } @@ -140,14 +141,19 @@ get_user_owner() { } # Random password generator -gen_password() { - PW_MATRIX='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' - PW_LENGHT='10' - 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" } @@ -169,15 +175,6 @@ is_type_valid() { 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 - check_result $E_FORBIDEN "permission denied" - fi -} - # Check user backup settings is_backup_enabled() { BACKUPS=$(grep "^BACKUPS=" $USER_DATA/user.conf | cut -f2 -d \') @@ -450,7 +447,7 @@ sync_cron_jobs() { fi rm -f $crontab if [ "$CRON_REPORTS" = 'yes' ]; then - echo "MAILTO=$CONTACT" > $sys_cron + echo "MAILTO=$CONTACT" > $crontab fi while read line; do eval $line @@ -467,15 +464,16 @@ sync_cron_jobs() { # User format validator is_user_format_valid() { if ! [[ "$1" =~ ^[a-zA-Z0-9][-|\.|_|a-zA-Z0-9]{0,28}[a-zA-Z0-9]$ ]]; then - check_result $E_INVALID "invalid user format :: $1" + check_result $E_INVALID "invalid $2 format :: $1" fi } # Domain format validator is_domain_format_valid() { + object_name=${2-domain} exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]" if [[ "$1" =~ $exclude ]]; then - check_result $E_INVALID "invalid domain format :: $1" + check_result $E_INVALID "invalid $object_name format :: $1" fi } @@ -494,9 +492,10 @@ is_alias_format_valid() { # 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])' if ! [[ $1 =~ ^$ip_regex\.$ip_regex\.$ip_regex\.$ip_regex$ ]]; then - check_result $E_INVALID "invalid IP format :: $1" + check_result $E_INVALID "invalid $object_name format :: $1" fi } @@ -512,7 +511,203 @@ is_extention_format_valid() { is_number_format_valid() { object_name=${2-number} if ! [[ "$1" =~ ^[0-9]+$ ]] ; then - check_result $E_INVALID "invalid $object_name format :: $1" + 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 + check_result $E_INVALID "invalid $2 format :: $1" + fi +} + +# 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 + check_result $E_INVALID "invalid $2 format :: $1" + fi +} + +# 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 + check_result $E_INVALID "invalid dns record type format :: $1" + fi +} + +# 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 +} + +# 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 + limit=31 + fi + if [ "$2" = 'month' ]; then + limit=12 + fi + if [ "$2" = 'wday' ]; then + limit=7 + fi + if [ "$1" = '*' ]; then + check_format='ok' + fi + if [[ "$1" =~ ^[\*]+[/]+[0-9] ]]; then + if [ "$(echo $1 |cut -f 2 -d /)" -lt $limit ]; then + check_format='ok' + fi + fi + if [[ "$1" =~ ^[0-9][-|,|0-9]{0,28}[0-9]$ ]]; then + check_format='ok' + crn_values=${1//,/ } + crn_values=${crn_values//-/ } + for crn_vl in $crn_values; do + if [ "$crn_vl" -gt $limit ]; then + check_format='invalid' + fi + done + fi + if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -lt $limit ]; then + check_format='ok' + fi + if [ "$check_format" != 'ok' ]; then + check_result $E_INVALID "invalid $2 format :: $1" + fi +} + +# Name validator +is_name_format_valid() { + if ! [[ "$1" =~ ^[[:alnum:]][-|\ |\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]; then + check_result $E_INVALID "invalid $2 format :: $1" + fi +} + +# Object validator +is_object_format_valid() { + if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]; then + check_result $E_INVALID "invalid $2 format :: $1" + fi +} + +# Password validator +is_password_format_valid() { + if [ "${#1}" -lt '6' ]; then + check_result $E_INVALID "invalid password format :: $1" fi } @@ -522,11 +717,73 @@ is_format_valid() { eval arg=\$$arg_name if [ ! -z "$arg" ]; then case $arg_name in - aliases) is_alias_format_valid "$arg" ;; - domain) is_domain_format_valid "$arg" ;; - proxy_ext) is_extention_format_valid "$arg" ;; - ip) is_ip_format_valid "$arg" ;; - user) is_user_format_valid "$arg" ;; + 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_domain_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_protocol_format_valid "$arg";; + protocol) is_fw_port_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 done diff --git a/func/rebuild.sh b/func/rebuild.sh index 3f41360de..72cd7002d 100644 --- a/func/rebuild.sh +++ b/func/rebuild.sh @@ -406,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 @@ -526,8 +530,8 @@ 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" "$ARGUMENTS" exit $E_PARSING @@ -537,9 +541,9 @@ 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" "$ARGUMENTS" exit $E_CONNECT @@ -569,8 +573,8 @@ 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" "$ARGUMENTS" exit $E_PARSING @@ -580,9 +584,9 @@ 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" "$ARGUMENTS" exit $E_CONNECT diff --git a/func/remote.sh b/func/remote.sh index ba93f4483..1f2d49d35 100644 --- a/func/remote.sh +++ b/func/remote.sh @@ -106,7 +106,7 @@ 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 From ffec2e7e2d23e96b58f09ebff23b6cbcf71e6b9c Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 16:35:51 +0300 Subject: [PATCH 101/229] refactoring update web templates --- web/js/templates.js | 48 ++- web/templates/admin/add_cron.html | 371 ++++++++++++++++- web/templates/admin/add_firewall_banlist.html | 4 +- web/templates/admin/add_package.html | 20 +- .../admin/edit_backup_exclusions.html | 20 - web/templates/admin/edit_cron.html | 385 +++++++++++++++++- web/templates/admin/edit_package.html | 22 +- web/templates/admin/list_backup_detail.html | 8 +- .../admin/list_backup_exclusions.html | 6 - web/templates/admin/list_dns_rec.html | 2 +- web/templates/admin/list_firewall.html | 6 +- web/templates/admin/list_mail.html | 2 +- web/templates/admin/list_mail_acc.html | 2 +- web/templates/admin/list_stats.html | 4 - web/templates/admin/list_user.html | 15 +- web/templates/file_manager/tab_menu.php | 2 + web/templates/footer.html | 13 +- web/templates/user/list_dns_rec.html | 2 +- web/templates/user/list_mail_acc.html | 2 +- web/templates/user/list_user.html | 9 + 20 files changed, 841 insertions(+), 102 deletions(-) diff --git a/web/js/templates.js b/web/js/templates.js index d600ddc6d..3c7f252c5 100644 --- a/web/js/templates.js +++ b/web/js/templates.js @@ -94,7 +94,6 @@ App.Templates.html = {
'], popup_rename: ['
\
'+App.Constants.FM_RENAME+': "~!:FILENAME~!"
\ - \
\
\ \ @@ -109,6 +108,53 @@ App.Templates.html = {
\
'], + popup_chmod: ['
\ +
'+App.Constants.FM_CHMOD+': "~!:FILENAME~!"
\ +
\ +
\ +
    \ +
  • \ +
  • \ +
  • \ +
    \ +
  • \ +
  • \ +
  • \ +
    \ +
  • \ +
  • \ +
  • \ +
\ +
\ +
\ +

'+App.Constants.FM_CANCEL+'

\ +

'+App.Constants.FM_OK+'

\ +
\ +
'], + popup_bulk_chmod: ['
\ +
'+App.Constants.FM_CHMOD+' (~!:NUMBER_OF_ITEMS~!)
\ +
\ +
\ +
    \ +
  • \ +
  • \ +
  • \ +
    \ +
  • \ +
  • \ +
  • \ +
    \ +
  • \ +
  • \ +
  • \ +
\ +
\ +
\ +

'+App.Constants.FM_CANCEL+'

\ +

'+App.Constants.FM_OK+'

\ +
\ +
'], + popup_pack: ['
\
'+App.Constants.FM_PACK+' "~!:FILENAME~!"
\
\ diff --git a/web/templates/admin/add_cron.html b/web/templates/admin/add_cron.html index 1de9aba3f..047e1226b 100644 --- a/web/templates/admin/add_cron.html +++ b/web/templates/admin/add_cron.html @@ -29,6 +29,328 @@ $back = "location.href='".$back."'"; } ?> + +
+
+
    +
  • +
  • +
  • +
  • +
  • +
+
+ + + + + +

: + +

+

+ +

+ +
+ + +
+
+ + + +

: + +

+ +

: + +

+ +

+ +

+
+
+ + +
+
+ + +

: + +

+ +

: + + + : + +

+

+ +

+
+
+ + +
+
+ + + +

: + +

+ +

: + + + : + +

+ +

+ +

+
+
+ + +
+
+ + +

: + +

+ +

: + + + : + + + : + +

+ +

+ +

+
+
+
+
+
@@ -41,6 +363,16 @@ + + + + + + - - - @@ -95,4 +95,4 @@
+ +
+ > +
@@ -48,7 +380,7 @@
- - -
- > + \ No newline at end of file diff --git a/web/templates/admin/add_firewall_banlist.html b/web/templates/admin/add_firewall_banlist.html index ddea27dbe..9c09d8da6 100644 --- a/web/templates/admin/add_firewall_banlist.html +++ b/web/templates/admin/add_firewall_banlist.html @@ -72,7 +72,7 @@
- () + ()
-
+
\ No newline at end of file diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html index 16dbf5290..ec4e675c3 100644 --- a/web/templates/admin/add_package.html +++ b/web/templates/admin/add_package.html @@ -302,20 +302,20 @@ + delete + delete - '.__('delete').' + delete '; @@ -323,7 +323,7 @@ echo ' - '.__('delete').' + delete '; @@ -331,7 +331,7 @@ echo ' - '.__('delete').' + delete '; @@ -339,7 +339,7 @@ echo ' - '.__('delete').' + delete '; @@ -347,7 +347,7 @@ echo ' - '.__('delete').' + delete '; @@ -355,13 +355,13 @@ echo ' - '.__('delete').' + delete '; ?> > - + Add one more Name Server @@ -410,4 +410,4 @@ }) }); - + \ No newline at end of file diff --git a/web/templates/admin/edit_backup_exclusions.html b/web/templates/admin/edit_backup_exclusions.html index 2a991c9b2..4dd5995c9 100644 --- a/web/templates/admin/edit_backup_exclusions.html +++ b/web/templates/admin/edit_backup_exclusions.html @@ -55,16 +55,6 @@ - - - - - - - - - - @@ -85,16 +75,6 @@ - - - - - - - - - - diff --git a/web/templates/admin/edit_cron.html b/web/templates/admin/edit_cron.html index 4a6d60368..8f28d6036 100644 --- a/web/templates/admin/edit_cron.html +++ b/web/templates/admin/edit_cron.html @@ -29,6 +29,326 @@ $back = "location.href='".$back."'"; } ?> + +
+
+
    +
  • +
  • +
  • +
  • +
  • +
+
+ + + + + +

: + +

+

+ +

+ +
+ + +
+
+ + + +

: + +

+ +

: + +

+ +

+ +

+
+
+ + +
+
+ + +

: + +

+ +

: + + + : + +

+

+ +

+
+
+ +
+
+ + + +

: + +

+ +

: + + : + +

+ +

+ +

+
+
+ + +
+
+ + +

: + +

+ +

: + + + : + + + : + +

+

+ +

+
+
+
+
+ +
@@ -47,6 +367,18 @@ + + + + + + + + - - - - +
+ +
+ > +
@@ -54,7 +386,7 @@
- - -
- > + diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html index bbdcba301..6082af056 100644 --- a/web/templates/admin/edit_package.html +++ b/web/templates/admin/edit_package.html @@ -42,7 +42,7 @@
@@ -305,13 +305,13 @@ + delete + delete @@ -319,7 +319,7 @@ echo ' - '.__('delete').' + delete '; @@ -327,7 +327,7 @@ echo ' - '.__('delete').' + delete '; @@ -335,7 +335,7 @@ echo ' - '.__('delete').' + delete '; @@ -343,7 +343,7 @@ echo ' - '.__('delete').' + delete '; @@ -351,7 +351,7 @@ echo ' - '.__('delete').' + delete '; @@ -359,14 +359,14 @@ echo ' - '.__('delete').' + delete '; ?> > - + Add one more Name Server @@ -416,4 +416,4 @@ }) }); - + \ No newline at end of file diff --git a/web/templates/admin/list_backup_detail.html b/web/templates/admin/list_backup_detail.html index c54292394..7b27bc51a 100644 --- a/web/templates/admin/list_backup_detail.html +++ b/web/templates/admin/list_backup_detail.html @@ -16,11 +16,11 @@ - +
- @@ -52,6 +52,7 @@ $web = explode(',',$data[$backup]['WEB']); foreach ($web as $key) { if (!empty($key)) { + ++$i; ?>
@@ -335,7 +336,6 @@ -
@@ -397,4 +397,4 @@
-
+
\ No newline at end of file diff --git a/web/templates/admin/list_backup_exclusions.html b/web/templates/admin/list_backup_exclusions.html index 8671a5e40..d9de37639 100644 --- a/web/templates/admin/list_backup_exclusions.html +++ b/web/templates/admin/list_backup_exclusions.html @@ -49,8 +49,6 @@
-
@@ -73,10 +71,6 @@
- -
diff --git a/web/templates/admin/list_dns_rec.html b/web/templates/admin/list_dns_rec.html index 69f15a5f5..244c1d4a8 100644 --- a/web/templates/admin/list_dns_rec.html +++ b/web/templates/admin/list_dns_rec.html @@ -99,7 +99,7 @@ v_unit_id="" v_section="dns_rec">
-
+
diff --git a/web/templates/admin/list_firewall.html b/web/templates/admin/list_firewall.html index f6da8b789..2c4b365e7 100644 --- a/web/templates/admin/list_firewall.html +++ b/web/templates/admin/list_firewall.html @@ -87,7 +87,7 @@ sort-ip="" sort-comment=" shortcut-s" key-action="js"> - + @@ -97,9 +97,9 @@ sort-ip="" sort-comment=" - +  Del diff --git a/web/templates/admin/list_mail.html b/web/templates/admin/list_mail.html index 4ef6899b6..61f127287 100644 --- a/web/templates/admin/list_mail.html +++ b/web/templates/admin/list_mail.html @@ -78,7 +78,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'; diff --git a/web/templates/admin/list_mail_acc.html b/web/templates/admin/list_mail_acc.html index 10babc2c4..07b0529cb 100644 --- a/web/templates/admin/list_mail_acc.html +++ b/web/templates/admin/list_mail_acc.html @@ -36,7 +36,7 @@
- diff --git a/web/templates/admin/list_stats.html b/web/templates/admin/list_stats.html index c5a8ad23b..46bd11a3d 100644 --- a/web/templates/admin/list_stats.html +++ b/web/templates/admin/list_stats.html @@ -74,9 +74,6 @@
-
- -
@@ -85,7 +82,6 @@
-
diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html index d84afb4dc..d12ef7c8f 100644 --- a/web/templates/admin/list_user.html +++ b/web/templates/admin/list_user.html @@ -108,7 +108,16 @@ sort-bandwidth="" sort-disk=" @@ -153,12 +162,10 @@ sort-bandwidth="" sort-disk=" -
- +
-
diff --git a/web/templates/file_manager/tab_menu.php b/web/templates/file_manager/tab_menu.php index d6819663f..3a4f0a826 100644 --- a/web/templates/file_manager/tab_menu.php +++ b/web/templates/file_manager/tab_menu.php @@ -12,6 +12,8 @@
+
+
diff --git a/web/templates/footer.html b/web/templates/footer.html index 4e25e91ef..cd22658da 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -4,6 +4,13 @@ lastScrollTop = 0; $(document).ready(function() { + 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'); + } hover_menu(); $(window).scroll(function(){hover_menu()}); @@ -587,7 +594,7 @@
    -
  • n
  • +
  • a
  • Ctrl + Enter
  • Ctrl + Backspace
  • @@ -606,6 +613,10 @@
  • Enter
  • + +
  • +
  • +
diff --git a/web/templates/user/list_dns_rec.html b/web/templates/user/list_dns_rec.html index ad23266ea..fe91f49f8 100644 --- a/web/templates/user/list_dns_rec.html +++ b/web/templates/user/list_dns_rec.html @@ -97,7 +97,7 @@
-
+
diff --git a/web/templates/user/list_mail_acc.html b/web/templates/user/list_mail_acc.html index 5d1956d90..0af018cfd 100644 --- a/web/templates/user/list_mail_acc.html +++ b/web/templates/user/list_mail_acc.html @@ -36,7 +36,7 @@
- diff --git a/web/templates/user/list_user.html b/web/templates/user/list_user.html index 0242ac830..d0dda28c6 100644 --- a/web/templates/user/list_user.html +++ b/web/templates/user/list_user.html @@ -106,6 +106,15 @@ sort-disk="" sort-star=" Date: Fri, 24 Jun 2016 16:36:59 +0300 Subject: [PATCH 102/229] FileManager bugfixes + file permission module --- web/css/file_manager.css | 8 + web/edit/file/index.php | 2 +- web/file_manager/files.php | 360 +---------------------------------- web/file_manager/fm_api.php | 24 ++- web/file_manager/fm_core.php | 141 +++++++------- web/js/file_manager.js | 268 +++++++++++++++++++++++--- 6 files changed, 339 insertions(+), 464 deletions(-) diff --git a/web/css/file_manager.css b/web/css/file_manager.css index f6c364710..6e7454e0c 100644 --- a/web/css/file_manager.css +++ b/web/css/file_manager.css @@ -309,6 +309,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b .confirm-box { background-color: #333; width: 480px; font-family: arial; margin-left: 50px; border-radius: 3px; box-shadow: 0 2px 11px 0 rgba(0, 0, 0, 0.5); } /*.confirm-box.replace { height: 230px; }*/ .confirm-box .message { color: #EBE697; font-size: 16px; padding: 25px; margin-bottom: 60px; display: inline-block; } +.confirm-box .results, .confirm-box .warning { color: #FF9500; font-size: 16px; padding: 25px; } .confirm-box .warning .title, .confirm-box .message .title { color: #48B1B7; } @@ -346,6 +347,13 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b .confirm-box.rename.warning .controls.replace { display: inline-block; } .confirm-box.rename.warning .message { padding-bottom: 0; } +.confirm-box.chmod .message { margin-bottom: 0; } +.confirm-box.chmod .warning { padding: 10px 25px; } +.confirm-box.chmod ul { padding: 10px 25px; } +.confirm-box.chmod ul:last-of-type { margin-bottom: 38px; } +.confirm-box.chmod li { list-style-type: none; } + + /*.confirm-box.archive { height: 468px; }*/ .confirm-box.archive .message { margin-bottom: 38px; } .confirm-box.archive.warning .controls, diff --git a/web/edit/file/index.php b/web/edit/file/index.php index 6f7474c94..d6ae8dcee 100644 --- a/web/edit/file/index.php +++ b/web/edit/file/index.php @@ -74,7 +74,7 @@ if (($_SESSION['user'] == 'admin') && (!empty($_SESSION['look']))) { - + diff --git a/web/file_manager/files.php b/web/file_manager/files.php index c11cd917e..cdc73ee80 100644 --- a/web/file_manager/files.php +++ b/web/file_manager/files.php @@ -1,359 +1 @@ -'; -//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 f4629794f..009b65f80 100644 --- a/web/file_manager/fm_api.php +++ b/web/file_manager/fm_api.php @@ -29,18 +29,19 @@ 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)); break; + case 'rename_directory': $dir = $_REQUEST['dir']; $item = $_REQUEST['item']; @@ -48,27 +49,30 @@ switch ($_REQUEST['action']) { print json_encode($fm->renameDirectory($dir, $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 +80,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 +88,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,6 +96,7 @@ 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']; @@ -97,10 +104,19 @@ switch ($_REQUEST['action']) { $item = $_REQUEST['item']; print json_encode($fm->packItem($item, $dir, $target_dir, $filename)); 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 724368989..62cb304b1 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,17 @@ class FileManager { ); } } - + function packItem($item, $dir, $target_dir, $filename) { $item = $this->formatFullPath($item); $dst_item = $this->formatFullPath($target_dir); - + $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); $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -205,18 +174,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 +198,7 @@ class FileManager { } $error = self::check_return_code($return_var, $output); - + if (empty($error)) { return array( 'result' => true @@ -244,7 +211,7 @@ class FileManager { ); } } - + function unpackItem($item, $dir, $target_dir, $filename) { $item = $this->formatFullPath($item); $dst_item = $this->formatFullPath($target_dir); @@ -252,7 +219,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 +232,15 @@ 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(); 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,6 +253,7 @@ class FileManager { ); } } + function renameDirectory($dir, $item, $target_name) { $item = $this->formatFullPath($dir . $item); $dst_item = $this->formatFullPath($dir . $target_name); @@ -298,11 +264,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 +280,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 +300,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 +338,7 @@ class FileManager { 'listing' => $listing ); } - + public function open_file($dir = '') { $listing = $this->getDirectoryListing($dir); @@ -360,14 +347,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 +363,7 @@ class FileManager { 'name' => $info[$this->info_positions['NAME']] ); } - + return $data; } diff --git a/web/js/file_manager.js b/web/js/file_manager.js index c551b21c2..cbf6ca6c1 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) { @@ -751,19 +751,20 @@ 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 box = FM['TAB_' + tab]; + var tab = FM.getTabLetter(FM.CURRENT_TAB); +// FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box, function(){}, true); + FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box, function(){}, false); } - 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() { @@ -816,14 +817,13 @@ 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; @@ -841,21 +841,21 @@ FM.bulkCopyDo = function() { );*/ 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); @@ -864,7 +864,7 @@ FM.bulkCopyDo = function() { //FM.showError('copy-items', reply.message); bulkStatuses.push(reply.message); } - + FM.checkBulkStatus(bulkStatuses, acc); }); }); @@ -888,7 +888,7 @@ FM.bulkCopy = function() { numberOfItems++; } }); - + var tab = FM.getTabLetter(FM.CURRENT_TAB); var opposite_tab = 'A'; if (tab == 'A') { @@ -905,7 +905,6 @@ FM.bulkCopy = function() { //popup_bulk_copy FM.popupOpen(tpl.finalize()); - } } @@ -1191,6 +1190,7 @@ FM.selectItem = function(item, box) { } } + FM.isItemPseudo = function(item) { if (item.name == '.' || item.name == '..') { return true; @@ -1199,7 +1199,7 @@ FM.isItemPseudo = function(item) { } FM.itemIsArchieve = function(item) { - + if ($.inArray(item.filetype, FM.SUPPORTED_ARCHIEVES) != -1) { return true; } @@ -1385,7 +1385,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 +1398,228 @@ FM.renameItems = function() { FM.popupOpen(tpl.finalize()); } +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.popupClose(); +// FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box); + } +} + + +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; } From 027290225b9a5b841142579cd2921462dc73959d Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 16:37:41 +0300 Subject: [PATCH 103/229] relative path support --- web/inc/main.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/web/inc/main.php b/web/inc/main.php index b3453dce3..51e3afbf2 100644 --- a/web/inc/main.php +++ b/web/inc/main.php @@ -1,7 +1,11 @@ 0 ) { header("Location: /error/"); @@ -89,7 +88,7 @@ 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; @@ -107,9 +106,9 @@ function top_panel($user, $TAB) { $panel = json_decode(implode('', $output), true); 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'); } } From 07b93358e8d985bafc2502ab14a7e18c4cab0bba Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 16:38:08 +0300 Subject: [PATCH 104/229] notify option ssupport --- web/inc/mail-wrapper.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/inc/mail-wrapper.php b/web/inc/mail-wrapper.php index a8c48a09e..4281aaad1 100755 --- a/web/inc/mail-wrapper.php +++ b/web/inc/mail-wrapper.php @@ -2,14 +2,19 @@ Date: Fri, 24 Jun 2016 16:38:32 +0300 Subject: [PATCH 105/229] css style update --- web/css/styles.min.css | 157 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 147 insertions(+), 10 deletions(-) diff --git a/web/css/styles.min.css b/web/css/styles.min.css index 3dae45c82..caa548128 100644 --- a/web/css/styles.min.css +++ b/web/css/styles.min.css @@ -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; @@ -1591,13 +1594,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; @@ -2090,11 +2097,11 @@ 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; } .units.compact .l-icon-star { @@ -2111,7 +2118,7 @@ div.l-content > div.l-separator:nth-of-type(4) { } .l-unit:hover .l-icon-star { - display: inline-block; + visibility: visible; } @@ -2140,7 +2147,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 +2383,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 +2427,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 +2688,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; @@ -2987,6 +3011,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 +3037,6 @@ form#vstobjects.suspended { } .shortcuts .close:hover { background-color: #000; - } .shortcuts .close:active { background-color: #55c9c0; @@ -3131,3 +3155,116 @@ 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; +} +.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; + } +} \ No newline at end of file From dfb4ca421a955c95ceea7262399811c50262dc5a Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 16:40:13 +0300 Subject: [PATCH 106/229] cron helper language update --- web/inc/i18n/ar.php | 45 +- web/inc/i18n/bs.php | 44 +- web/inc/i18n/cn.php | 1193 ++++++++++++++++++++++--------------------- web/inc/i18n/cz.php | 44 +- web/inc/i18n/da.php | 44 +- web/inc/i18n/de.php | 44 +- web/inc/i18n/el.php | 44 +- web/inc/i18n/en.php | 52 +- web/inc/i18n/es.php | 45 +- web/inc/i18n/fi.php | 47 +- web/inc/i18n/fr.php | 44 +- web/inc/i18n/hu.php | 44 +- web/inc/i18n/id.php | 44 +- web/inc/i18n/it.php | 44 +- web/inc/i18n/ja.php | 44 +- web/inc/i18n/nl.php | 44 +- web/inc/i18n/no.php | 44 +- web/inc/i18n/pl.php | 43 +- web/inc/i18n/pt.php | 44 +- web/inc/i18n/ro.php | 635 ++++++++++++----------- web/inc/i18n/ru.php | 48 +- web/inc/i18n/se.php | 44 +- web/inc/i18n/tr.php | 44 +- web/inc/i18n/tw.php | 47 +- web/inc/i18n/ua.php | 254 +++++---- web/inc/i18n/vi.php | 44 +- 26 files changed, 2087 insertions(+), 1026 deletions(-) diff --git a/web/inc/i18n/ar.php b/web/inc/i18n/ar.php index ca9fbb1da..39ef8a165 100644 --- a/web/inc/i18n/ar.php +++ b/web/inc/i18n/ar.php @@ -515,6 +515,7 @@ $LANG['ar'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -533,6 +534,7 @@ $LANG['ar'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -547,7 +549,15 @@ $LANG['ar'] = 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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', 'Cancel saving form' => 'Cancel saving form', @@ -563,6 +573,8 @@ $LANG['ar'] = 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', @@ -599,6 +611,35 @@ $LANG['ar'] = 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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/bs.php b/web/inc/i18n/bs.php index 10c4c94db..0a2f054c3 100644 --- a/web/inc/i18n/bs.php +++ b/web/inc/i18n/bs.php @@ -509,6 +509,7 @@ $LANG['bs'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -527,6 +528,7 @@ $LANG['bs'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -541,6 +543,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -557,6 +568,8 @@ $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', @@ -593,6 +606,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/cn.php b/web/inc/i18n/cn.php index aa9a55c4d..29d948e85 100644 --- a/web/inc/i18n/cn.php +++ b/web/inc/i18n/cn.php @@ -1,634 +1,645 @@ '预设方案', - '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' => '添加域名', + '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' => '否', - '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' => 'Web模板', - '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' => 'DNS服务器', - '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 Extensions' => '代理扩展名', - 'Proxy Extentions' => '代理扩展名', - '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' => '独立', + 'yes' => '是', + 'no' => '否', + 'none' => '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' => 'Web模板', + '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' => 'Name Servers', + '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' => 'Web统计', + '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' => '平均负载', - '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' => '内存使用', + 'HTTPD Usage' => 'apache使用', + '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' => '处理器', + 'Memory' => '内存', + 'Uptime' => '在线时间', + 'core package' => '核心方案', + 'php interpreter' => 'php 解释器', + 'internal web server' => '内网网页服务器', + 'Version' => '版本', + 'Release' => '发布', + 'Architecture' => 'Architecture', + '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' => '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.日志', '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服务器', + '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地址', + '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 对象', + '%s objects' => '%s 对象', + 'no exclusions' => '不排除', + '1 rule' => '1規則', + '%s rules' => '%s 規則', + 'There are 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' => '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' => '已经有一个恢复正在执行,请等待恢复完成后再操作', + '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' => '規則已成功創建', + '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' => "输入域名,每行一个。要排除所有域名请使用 *。要排除特定目录使用以下格式: 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' => "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 管理系统 ', + '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' => '', + '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', + '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', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', + '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', + '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' => '创建目录', + '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', + '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', + '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', + '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' => '下载', - '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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' -); +); \ No newline at end of file diff --git a/web/inc/i18n/cz.php b/web/inc/i18n/cz.php index a8a8b078d..cca1f5a9c 100644 --- a/web/inc/i18n/cz.php +++ b/web/inc/i18n/cz.php @@ -515,6 +515,7 @@ $LANG['cz'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -533,6 +534,7 @@ $LANG['cz'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -547,6 +549,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -563,6 +574,8 @@ $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', @@ -599,6 +612,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/da.php b/web/inc/i18n/da.php index 575448436..b7c6e6945 100644 --- a/web/inc/i18n/da.php +++ b/web/inc/i18n/da.php @@ -516,6 +516,7 @@ $LANG['da'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -534,6 +535,7 @@ $LANG['da'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -548,6 +550,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -564,6 +575,8 @@ $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', @@ -600,6 +613,35 @@ $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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); diff --git a/web/inc/i18n/de.php b/web/inc/i18n/de.php index f86b23f9d..73dbbcbb3 100644 --- a/web/inc/i18n/de.php +++ b/web/inc/i18n/de.php @@ -513,6 +513,7 @@ $LANG['de'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -531,6 +532,7 @@ $LANG['de'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -545,6 +547,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -561,6 +572,8 @@ $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', @@ -597,6 +610,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/el.php b/web/inc/i18n/el.php index 068cc5595..50c3fd967 100644 --- a/web/inc/i18n/el.php +++ b/web/inc/i18n/el.php @@ -515,6 +515,7 @@ $LANG['el'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -533,6 +534,7 @@ $LANG['el'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -547,6 +549,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -563,6 +574,8 @@ $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', @@ -599,6 +612,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/en.php b/web/inc/i18n/en.php index a421ef410..7e448ceec 100644 --- a/web/inc/i18n/en.php +++ b/web/inc/i18n/en.php @@ -159,7 +159,7 @@ $LANG['en'] = array( 'SSL Domains' => 'SSL Domains', 'Web Aliases' => 'Web Aliases', 'per domain' => 'per domain', - 'DNS domains' => 'DNS Domains', + 'DNS Domains' => 'DNS Domains', 'DNS Domains' => 'DNS Domains', 'DNS records' => 'DNS records' , 'Name Servers' => 'Name Servers', @@ -219,7 +219,6 @@ $LANG['en'] = array( 'Bandwidth Usage eth0' => 'Bandwidth Usage eth0', 'FTP Usage' => 'FTP Usage', 'SSH Usage' => 'SSH Usage', - 'Exim Usage' => 'Exim Usage', 'reverse proxy' => 'reverse proxy', 'web server' => 'web server', 'dns server' => 'dns server', @@ -516,6 +515,7 @@ $LANG['en'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -534,6 +534,7 @@ $LANG['en'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -548,7 +549,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -565,6 +574,8 @@ $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', @@ -590,7 +601,7 @@ $LANG['en'] = array( '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', + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager', 'Licence Key' => 'Licence Key', 'Enter License Key' => 'Enter License Key', @@ -601,6 +612,35 @@ $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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' + +); \ No newline at end of file diff --git a/web/inc/i18n/es.php b/web/inc/i18n/es.php index f15425a88..95971e3f9 100644 --- a/web/inc/i18n/es.php +++ b/web/inc/i18n/es.php @@ -515,6 +515,7 @@ $LANG['es'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -533,6 +534,7 @@ $LANG['es'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -547,6 +549,16 @@ $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', + 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -563,6 +575,8 @@ $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', @@ -599,6 +613,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/fi.php b/web/inc/i18n/fi.php index 75259aed5..15592e776 100644 --- a/web/inc/i18n/fi.php +++ b/web/inc/i18n/fi.php @@ -518,6 +518,7 @@ $LANG['fi'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -536,6 +537,7 @@ $LANG['fi'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -550,6 +552,18 @@ $LANG['fi'] = array( 'already exists' => 'already exists', 'Create file' => 'Create file', 'Create directory' => 'Create directory', + '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' => 'Add New object', 'Save Form' => 'Save Form', @@ -566,6 +580,8 @@ $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', @@ -602,6 +618,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/fr.php b/web/inc/i18n/fr.php index 7772ba06e..3e236017c 100644 --- a/web/inc/i18n/fr.php +++ b/web/inc/i18n/fr.php @@ -516,6 +516,7 @@ $LANG['fr'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -534,6 +535,7 @@ $LANG['fr'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -548,6 +550,15 @@ $LANG['fr'] = 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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -564,6 +575,8 @@ $LANG['fr'] = 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', @@ -600,6 +613,35 @@ $LANG['fr'] = 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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/hu.php b/web/inc/i18n/hu.php index 7da0338ba..8cb4a1e7e 100644 --- a/web/inc/i18n/hu.php +++ b/web/inc/i18n/hu.php @@ -523,6 +523,7 @@ $LANG['hu'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -541,6 +542,7 @@ $LANG['hu'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -555,6 +557,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -571,6 +582,8 @@ $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', @@ -607,6 +620,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/id.php b/web/inc/i18n/id.php index 0a0d935a6..ff851dad1 100644 --- a/web/inc/i18n/id.php +++ b/web/inc/i18n/id.php @@ -517,6 +517,7 @@ $LANG['id'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -535,6 +536,7 @@ $LANG['id'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -549,6 +551,15 @@ $LANG['id'] = 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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -565,6 +576,8 @@ $LANG['id'] = 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', @@ -601,6 +614,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/it.php b/web/inc/i18n/it.php index 46fc8981f..9b5da7ed9 100644 --- a/web/inc/i18n/it.php +++ b/web/inc/i18n/it.php @@ -515,6 +515,7 @@ $LANG['it'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -533,6 +534,7 @@ $LANG['it'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -547,6 +549,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -563,6 +574,8 @@ $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', @@ -599,6 +612,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/ja.php b/web/inc/i18n/ja.php index 7f664cb15..84c00aa4b 100644 --- a/web/inc/i18n/ja.php +++ b/web/inc/i18n/ja.php @@ -514,6 +514,7 @@ $LANG['ja'] = array( 'NEW DIR' => '新規ディレクトリ', 'DELETE' => '削除', 'RENAME' => '名前の変更', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'コピー', 'ARCHIVE' => 'アーカイブ', 'EXTRACT' => '展開', @@ -532,6 +533,7 @@ $LANG['ja'] = array( 'Copy' => 'コピー', 'Cancel' => 'キャンセル', 'Rename' => '名前を変更', + 'Change Rights' => 'Change Rights', 'Delete' => '削除', 'Extract' => '展開', 'Create' => '作成', @@ -546,6 +548,15 @@ $LANG['ja'] = array( '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', 'Add New object' => '新しい項目を追加する', 'Save Form' => '変更を保存する', @@ -562,6 +573,8 @@ $LANG['ja'] = array( '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' => 'ファイルの作成', @@ -598,6 +611,35 @@ $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' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); diff --git a/web/inc/i18n/nl.php b/web/inc/i18n/nl.php index 96e6ad576..15e484227 100644 --- a/web/inc/i18n/nl.php +++ b/web/inc/i18n/nl.php @@ -515,6 +515,7 @@ $LANG['nl'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -533,6 +534,7 @@ $LANG['nl'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -547,6 +549,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -563,6 +574,8 @@ $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', @@ -599,6 +612,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/no.php b/web/inc/i18n/no.php index a3c8a92e2..f8bab47ca 100644 --- a/web/inc/i18n/no.php +++ b/web/inc/i18n/no.php @@ -515,6 +515,7 @@ $LANG['no'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -533,6 +534,7 @@ $LANG['no'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -547,6 +549,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -563,6 +574,8 @@ $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', @@ -599,6 +612,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/pl.php b/web/inc/i18n/pl.php index 19483d664..b9d9775e5 100644 --- a/web/inc/i18n/pl.php +++ b/web/inc/i18n/pl.php @@ -513,6 +513,7 @@ $LANG['pl'] = array( 'NEW DIR' => 'NOWY FOLDER', 'DELETE' => 'USUŃ', 'RENAME' => 'ZMIEŃ NAZWĘ', + 'Change Rights' => 'Change Rights', 'COPY' => 'KOPIUJ', 'ARCHIVE' => 'ARCHIWIZUJ', 'EXTRACT' => 'ROZPAKUJ', @@ -545,6 +546,15 @@ $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', 'Add New object' => 'Dodaj nowy objekt', 'Save Form' => 'Zapisz formularz', @@ -561,6 +571,8 @@ $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', @@ -597,6 +609,35 @@ $LANG['pl'] = 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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); diff --git a/web/inc/i18n/pt.php b/web/inc/i18n/pt.php index c9b6f5c64..55e5c924f 100644 --- a/web/inc/i18n/pt.php +++ b/web/inc/i18n/pt.php @@ -514,6 +514,7 @@ $LANG['pt'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -532,6 +533,7 @@ $LANG['pt'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -546,6 +548,15 @@ $LANG['pt'] = 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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -562,6 +573,8 @@ $LANG['pt'] = 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', @@ -598,6 +611,35 @@ $LANG['pt'] = 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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); diff --git a/web/inc/i18n/ro.php b/web/inc/i18n/ro.php index a5fe034b3..9e37de9d6 100644 --- a/web/inc/i18n/ro.php +++ b/web/inc/i18n/ro.php @@ -3,49 +3,49 @@ * 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', + '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', @@ -56,89 +56,89 @@ $LANG['ro'] = array( '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', + '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ă notificarile', - 'turn off notifications' => 'dezactivează notificarile', + 'enable autoupdate' => 'activa autoupdate', + 'disable autoupdate' => 'deactiva autoupdate', + 'turn on notifications' => 'activa notificarea', + 'turn off notifications' => 'deactiva notificarea', - '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 Database' => 'Editare baze de date', + 'Adding Cron Job' => 'Adăugare sarcina cron', + 'Editing Cron Job' => 'Editare sarcina cron', + '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 +146,57 @@ $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 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', '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', + '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', + 'Forward to' => 'Forward', + 'Do not store forwarded mail' => 'A nu se salva mesajele redirecționate', 'database' => 'baza de date', 'User' => 'Utilizator', 'Host' => 'Host', - 'Charset' => 'Set de caractere', + 'Charset' => 'Setul de caractere', 'Min' => 'Min', 'Hour' => 'Oră', 'Day' => 'Zi', @@ -204,45 +204,41 @@ $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', + 'HTTPD Usage' => 'HTTPD', + 'NGINX Usage' => 'Proxy', + 'MySQL Usage on localhost' => 'MySQL', + 'PostgreSQL Usage on localhost' => 'PostgreSQL', + 'Bandwidth Usage eth0' => 'Utilizare rețelei eth0', + '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', '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', @@ -251,279 +247,280 @@ $LANG['ro'] = array( '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', - 'Prefix will be automaticaly added to database name and database user' => 'Prefixul %s va fi adăugat automat la numele bazei de date si la utilizator', + 'Prefix will be automaticaly added to database name and database user' => 'Prefix %s va fi adăugat automat la numele bazei de date si utilizatorul', 'Database' => 'Baza de date', 'Type' => 'Tip', 'Minute' => 'Minut', 'Command' => 'Comandă', - 'Package Name' => 'Nume Pachet', - 'Netmask' => 'Masca rețea', + 'Package Name' => 'Denumire pachetului', + 'Netmask' => 'Masca de 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', - 'IP address' => 'Adresa IP', - 'netmask' => 'masca rețea', - 'interface' => 'interfață', + 'ip address' => 'IP adresa', + 'IP address' => 'IP adresa', + 'netmask' => 'masca de rețea', + 'interface' => 'interfața', 'assigned user' => 'utilizator asignat', 'ns1' => 'ns1', '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', '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', + 'Add one more Name Server' => 'Add one more Name Server', - 'unlimited' => 'nelimitat', + '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 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.', + '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?', - 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să ștergi contul de e-mail %s?', - 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să suspenzi contul de e-mail %s?', - 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să activezi contul de e-mail %s?', - 'DELETE_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să ștergi contul de e-mail %s?', - 'SUSPEND_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să suspenzi baza de date %s?', - 'UNSUSPEND_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să activezi baza de date %s?', - 'DELETE_CRON_CONFIRMATION' => 'Ești sigur că dorești să ștergi această sarcina?', - 'SUSPEND_CRON_CONFIRMATION' => 'Ești sigur că dorești să suspenzi această sarcina?', - 'UNSUSPEND_CRON_CONFIRMATION' => 'Ești sigur că dorești să activezi această sarcina?', - 'DELETE_BACKUP_CONFIRMATION' => 'Ești sigur că dorești să ștergi backup-ul %s?', - 'DELETE_EXCLUSION_CONFIRMATION' => 'Ești sigur că dorești să ștergi excluderea %s?', - 'DELETE_PACKAGE_CONFIRMATION' => 'Ești sigur că dorești să ștergi pachetul %s', - 'DELETE_IP_CONFIRMATION' => 'Ești sigur că dorești să ștergi IP-ul %s?', - 'DELETE_RULE_CONFIRMATION' => 'Ești sigur că dorești să ștergi regula #%s?', - 'SUSPEND_RULE_CONFIRMATION' => 'Ești sigur că dorești să suspenzi regula #%s?', - 'UNSUSPEND_RULE_CONFIRMATION' => 'Ești sigur că dorești să activezi regula #%s?', - 'LEAVE_PAGE_CONFIRMATION' => 'Părăsești pagina?', + 'SUSPEND_RECORD_CONFIRMATION' => 'Ești sigur că dorești să suspendezi înregistrea %s?', + 'UNSUSPEND_RECORD_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi înregistrea %s?', + 'DELETE_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?', + 'SUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să suspendezi %s?', + 'UNSUSPEND_MAIL_ACCOUNT_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi %s?', + 'DELETE_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?', + 'SUSPEND_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să suspendezi %s?', + 'UNSUSPEND_DATABASE_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi %s?', + 'DELETE_CRON_CONFIRMATION' => 'Ești sigur că dorești să ștergi sarcina?', + 'SUSPEND_CRON_CONFIRMATION' => 'Ești sigur că dorești să suspendezi sarcina?', + 'UNSUSPEND_CRON_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi sarcina?', + 'DELETE_BACKUP_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?', + 'DELETE_EXCLUSION_CONFIRMATION' => 'Ești sigur că dorești să ștergi excludere %s?', + 'DELETE_PACKAGE_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s', + 'DELETE_IP_CONFIRMATION' => 'Ești sigur că dorești să șterge IP %s?', + 'DELETE_RULE_CONFIRMATION' => 'Ești sigur că dorești să ștergi regulă #%s?', + 'SUSPEND_RULE_CONFIRMATION' => 'Ești sigur că dorești să suspendezi regulă #%s?', + 'UNSUSPEND_RULE_CONFIRMATION' => 'Ești sigur că dorești să unsuspendezi regulă #%s?', + 'LEAVE_PAGE_CONFIRMATION' => 'Leave Page?', '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ă', - 'BACKUP_SCHEDULED' => 'Sarcina a fost adăugata la coadă. Vei primi o notificare prin e-mail atunci când backup-ul va fi gata pentru descărcare.', - 'BACKUP_EXISTS' => 'Un backup este în progres. Te rog să aștepți finalizarea acestuia.', - 'RESTORE_SCHEDULED' => 'Sarcina a fost adăugata la coadă. Veți 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.', + 'IP address is in use' => 'IP adresa este utilizat', + 'BACKUP_SCHEDULED' => 'Sarcina a fost adăugata la coadă. Veți primi o notificare la e-mail atunci cand backupul va fi complet.', + 'BACKUP_EXISTS' => 'Backup este în progres, vă rugăm să așteptați.', + 'RESTORE_SCHEDULED' => 'Sarcina a fost adăugata la coadă. Veți primi o notificare la e-mail atunci cand backupul va fi restaurat.', + 'RESTORE_EXISTS' => 'Restabilirea este în progres, vă rugăm să așteptați.', - '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 baza de date', - '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", + 'Database Credentials' => 'Datele de autentificare bazei de date', + 'DATABASE_READY' => "Baza de date dvs. este gata.\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_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', + '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', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', + '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', @@ -538,6 +535,7 @@ $LANG['ro'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -552,6 +550,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -568,6 +575,8 @@ $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', @@ -604,5 +613,35 @@ $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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' + +); \ No newline at end of file diff --git a/web/inc/i18n/ru.php b/web/inc/i18n/ru.php index 4e26d8e46..3229acee7 100644 --- a/web/inc/i18n/ru.php +++ b/web/inc/i18n/ru.php @@ -92,8 +92,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' => 'Редактирование аккаунта', @@ -516,6 +516,7 @@ $LANG['ru'] = array( 'NEW DIR' => 'ПАПКА', 'DELETE' => 'УДАЛИТЬ', 'RENAME' => 'ПЕРЕИМЕНОВАТЬ', + 'RIGHTS' => 'ПРАВА', 'COPY' => 'КОПИЯ', 'ARCHIVE' => 'АРХИВ', 'EXTRACT' => 'РАСПАКОВАТЬ', @@ -534,6 +535,7 @@ $LANG['ru'] = array( 'Copy' => 'Скопировать', 'Cancel' => 'Отмена', 'Rename' => 'Переименовать', + 'Change Rights' => 'Сменить права', 'Delete' => 'Удалить', 'Extract' => 'Распаковать', 'Create' => 'Создать', @@ -548,6 +550,15 @@ $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' => 'запуск/поиск для остальных', 'Add New object' => 'Перейти к Форме Добавления', 'Save Form' => 'Сохрнанить Форму', @@ -564,6 +575,8 @@ $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' => 'Создать Файл', @@ -600,6 +613,35 @@ $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.' => 'Это коммерческий модуль, чтобы включить его, вам необходимо приобрести лицензию.', + + 'Minutes' => 'по минутам', + 'Hourly' => 'по часам', + 'Daily' => 'по дням', + 'Weekly' => 'по дням недели', + 'Monthly' => 'по месяцам', + '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' => 'каждые', + 'Hour' => 'Часы', + 'Minute' => 'Минуты' ); \ No newline at end of file diff --git a/web/inc/i18n/se.php b/web/inc/i18n/se.php index 70b85165b..3851df96c 100644 --- a/web/inc/i18n/se.php +++ b/web/inc/i18n/se.php @@ -512,6 +512,7 @@ $LANG['se'] = array( 'NEW DIR' => 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -530,6 +531,7 @@ $LANG['se'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -544,6 +546,15 @@ $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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -560,6 +571,8 @@ $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', @@ -596,6 +609,35 @@ $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.', + + 'Minutes' => 'Minutes', + 'Hourly' => 'Hourly', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/tr.php b/web/inc/i18n/tr.php index 51529c21b..18810a75d 100644 --- a/web/inc/i18n/tr.php +++ b/web/inc/i18n/tr.php @@ -514,6 +514,7 @@ $LANG['tr'] = array( 'NEW DIR' => 'YENİ KLASÖR', 'DELETE' => 'SİL', 'RENAME' => 'YENİDEN ADLANDIR', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'KOPYALA', 'ARCHIVE' => 'ARŞİVLE', 'EXTRACT' => 'ÇIKART', @@ -532,6 +533,7 @@ $LANG['tr'] = array( 'Copy' => 'Kopyala', 'Cancel' => 'Vazgeç', 'Rename' => 'Yeniden Adlandır', + 'Change Rights' => 'Change Rights', 'Delete' => 'Sil', 'Extract' => 'Çıkart', 'Create' => 'Oluştur', @@ -546,6 +548,15 @@ $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', 'Add New object' => 'Yeni Nesne Ekle', 'Save Form' => 'Formu Kaydet', @@ -562,6 +573,8 @@ $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', @@ -598,6 +611,35 @@ $LANG['tr'] = 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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index d4ae4cff0..da161024b 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -460,6 +460,9 @@ $LANG['tw'] = array( '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', ); + + + 'NEW DIR', 'DELETE' => 'DELETE', 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'COPY', 'ARCHIVE' => 'ARCHIVE', 'EXTRACT' => 'EXTRACT', @@ -993,6 +997,7 @@ $LANG['tw'] = array( 'Copy' => 'Copy', 'Cancel' => 'Cancel', 'Rename' => 'Rename', + 'Change Rights' => 'Change Rights', 'Delete' => 'Delete', 'Extract' => 'Extract', 'Create' => 'Create', @@ -1007,6 +1012,15 @@ $LANG['tw'] = 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', 'Add New object' => 'Add New object', 'Save Form' => 'Save Form', @@ -1023,6 +1037,8 @@ $LANG['tw'] = 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', @@ -1059,6 +1075,35 @@ $LANG['tw'] = 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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); \ No newline at end of file diff --git a/web/inc/i18n/ua.php b/web/inc/i18n/ua.php index 876e9647f..34e579d90 100644 --- a/web/inc/i18n/ua.php +++ b/web/inc/i18n/ua.php @@ -320,8 +320,8 @@ $LANG['ua'] = array( 'netmask' => 'маска підмережі', 'interface' => 'інтерфейс', 'assigned user' => 'призначений користувач', - 'ns1' => 'сервер імен №1', - 'ns2' => 'сервер імен №2', + 'ns1' => 'сервер імен #1', + 'ns2' => 'сервер імен #2', 'user' => 'користувач', 'email' => 'пошта', 'first name' => 'Ім\'я', @@ -349,7 +349,7 @@ $LANG['ua'] = array( 'Banlist' => 'Чорний список', 'ranges are acceptable' => 'дозволені діапазони', 'CIDR format is supported' => 'формат CIDR підтримується', - 'Add one more Name Server' => 'Додати ще один сервер імен', + 'Add one more Name Server' => 'Add one more Name Server', 'unlimited' => 'безлімітний', '1 account' => ' 1 акаунт', @@ -424,7 +424,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', @@ -486,120 +486,162 @@ $LANG['ua'] = array( 'Nov' => 'Лист', 'Dec' => 'Груд', - 'Configuring Server' => 'Налаштування серверу', + 'Configuring Server' => 'Налаштування Серверу', 'Hostname' => 'Ім\'я хоста', 'Time Zone' => 'Часовий Пояс', 'Default Language' => 'Мова за замовчуванням', - 'FileSystem Disk Quota' => 'Дискова квота файлової системи', + 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Плагіни Vesta Control Panel', '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', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'RIGHTS' => 'RIGHTS', + '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', + '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' => 'Створити теку', + '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', + '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' => 'Перейти до активного пункту меню', + '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' => 'Обрати всі файл', + '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' => - 'скорочення запозичені у чудового GNU файлового менеджера Midnight Commander', + '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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' + +); \ No newline at end of file diff --git a/web/inc/i18n/vi.php b/web/inc/i18n/vi.php index 5b04a74bf..d960386ec 100644 --- a/web/inc/i18n/vi.php +++ b/web/inc/i18n/vi.php @@ -510,6 +510,7 @@ $LANG['vi'] = array( 'NEW DIR' => 'Thêm thư mục mới', 'DELETE' => 'Xóa', 'RENAME' => 'Đổi tên', + 'RIGHTS' => 'RIGHTS', 'COPY' => 'Sao chép', 'ARCHIVE' => 'Nén', 'EXTRACT' => 'Giải nén', @@ -528,6 +529,7 @@ $LANG['vi'] = array( 'Copy' => 'Sao chép', 'Cancel' => 'Hủy', 'Rename' => 'Đổi tên', + 'Change Rights' => 'Change Rights', 'Delete' => 'Xóa', 'Extract' => 'Giải nén', 'Create' => 'Tạo mới', @@ -542,6 +544,15 @@ $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', 'Add New object' => 'Thêm đối tượng mới', 'Save Form' => 'Lưu form', @@ -558,6 +569,8 @@ $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', @@ -593,6 +606,35 @@ $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', + 'Daily' => 'Daily', + 'Weekly' => 'Weekly', + 'Monthly' => 'Monthly', + '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', + 'Hour' => 'Hour', + 'Minute' => 'Minute' ); From 35f7b8a86940b5085484b55ccb3200fc523eae81 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 17:36:23 +0300 Subject: [PATCH 107/229] no session_start() --- web/list/user/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/list/user/index.php b/web/list/user/index.php index f360fe036..129a78c4a 100644 --- a/web/list/user/index.php +++ b/web/list/user/index.php @@ -1,5 +1,6 @@ Date: Fri, 24 Jun 2016 17:36:46 +0300 Subject: [PATCH 108/229] file permission --- web/js/i18n.js.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/js/i18n.js.php b/web/js/i18n.js.php index 34f52f188..3200a356f 100644 --- a/web/js/i18n.js.php +++ b/web/js/i18n.js.php @@ -26,6 +26,7 @@ App.Constants.FM_CLOSE = ''; App.Constants.FM_COPY = ''; 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 = ''; @@ -49,4 +50,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 = ''; From 3bd2d0a6549748a5fe5edfcdac811ccd1ac38f4c Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 17:37:06 +0300 Subject: [PATCH 109/229] css styling --- web/js/app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/js/app.js b/web/js/app.js index ae8883c34..5f53fa6b1 100644 --- a/web/js/app.js +++ b/web/js/app.js @@ -1007,17 +1007,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){ From b62aba465b3fb40e813b6cd76b1e4ec7ef13ef22 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 17:38:08 +0300 Subject: [PATCH 110/229] array syntax fix --- web/inc/i18n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/inc/i18n.php b/web/inc/i18n.php index 1dab4cae4..10f16fc75 100644 --- a/web/inc/i18n.php +++ b/web/inc/i18n.php @@ -69,7 +69,7 @@ function detect_user_language($fallback='en') { // Sort Accept-Language by `q` value $accept_langs = explode(',', preg_replace('/\s/', '', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']))); - $accept_langs_sorted = []; + $accept_langs_sorted = array() ; foreach ($accept_langs as $lang) { $div = explode(';q=', $lang, 2); if (count($div) < 2) { From 2a59a0986fcc88ab10f781d674c481955826fe4c Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 17:38:23 +0300 Subject: [PATCH 111/229] flat icon update --- web/images/flat_icons.png | Bin 12464 -> 13365 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/web/images/flat_icons.png b/web/images/flat_icons.png index b226a00a80cd15dd3d739b548a4603a43b3794f1..c645adf153be460958598b1a8d32f91a46614111 100644 GIT binary patch literal 13365 zcma*O2Q*yK+b({LUZRB2qKoJyi0DL#AUcE53DJoby+kJ=m=L{0?`8B(MD!L!H$;!# z`#t%6>-*pJt#$wF-ffPV*{AG%-t+GFdEPRS>Z%G4@TlF`mO+gPx@~|15(l`!A@*9MHPAMWh_cUN@5+g zj2-}B02Jk3XnW4?F8FvpnoNIwu%A3O6vL|o!3{F}NXipL9z7q3XcJ0uG?-;k&9?U# znE2`#IpLRJx@gIsXZelHdM2Kn^^E~dUC&IlL40CQE`_P`3$HB1W7W?#48##t?_S|_ zUiile3T)hV$1~5xmkqp1{JX#5b@Q9<(*_Owr<2KjYe95k5)w<2INbE#P40F@#5n|k z_<;g{^F07#_Pn>3P|rN+$4}7B9l}O!XT)w{CWpKupDgA zr4GRyJ!)&fi+E}FH&M#EH58xjOgo|WO~@|4V9=4<->`)m_rIv zC44;4>5b(Or=8GJq&P0@S+|#ikb!>nm!xFBhceo^<{UL`ZEfmG`p`5Ot$<-3LPaKG z+j1Z=8HQPhL?V>f7v5?2(J_Yj45x|sT<|e739xV35AL5&r;x#cWjse-i>t?Zr3;_{ zBa=F@9w)L--wrp%{W`2fK zkyu*(N0QG1T@s!f(9Ju_)HyD|Z9OtWh$pRJaG8iV#hv_&AqC(R`T9m(SV`6$!zlip zL=}b_?%18m&r-JR3$gLE2ERwv_EU#W@O=#FDrs!=a_7&6(ism84V7FvgOk=9AA5D+ z3YYIr;-v`agq%|1Au>8G(|?c&_BVR!w{uP56@tjqUVB^CC-k#{{Z+6eyEs1=jLL&Sp$4m3LVf?@-k|h~Oo}ooT>Lg(9m^v>^;%HAvjaTMT>0N_1yxE^ z*VzVeR(F31mQi;oN&bysqq0fnAd?{|qPe=dI)JTKHPmTjotS1HIU;wHSTsXJ!eJH` z%#vGwW1FfM%s=XRtRwC;IGY}a4W{QbGv)8niFuS_thdwS0&ATPq$HNUJ!^PGWj}tr zqzofDfBBb*Z~bg_nZPIKWk5jt%)P73q|!la8Dq8?B^FQ9Cexpdjaa?*`g#hdmcy5W zI#!^LqT*SUU*6&bnNc!x{Mp-c987&q)Y#a_JVk^7xj5)1ve=e&o~tjgC`h<=@_W!p zp;AHb(9LpOK-lQ_yZXtiUy*rpP8$;tl3;wR5Lhu1iOj005wN(jpbWF~w03uMlOx~; zehv-wjOQs^5F(e)dQ)KT4~WXtBrh@WDR@3MR8QLWq=~qOaUEa!UTl7g9rTWivo4}n zGms}PRMIVcsIfBcp>38Q2J`XpdAY!dn#c$<`!_`P(`ap~2TONs{bAv-`N^sU$@RL( z2!5dkZ*OmLc0z77NcNhFrS;6NhZBE5g$=c+sA$%XXf9&4+VwFtTux4(-q6U%$T*tC zy(V6>zd^POtCwh7rHI)Q_=YJz51sxNgll%Ad*oK3ZjO``GS)j%iJ`vv#uiSv0^wFKgvS2{WuzLJ|w zF`2aK^v6PJsv8mLfXw8OL;b>;TZ;F1YTwLtkeNB9|y|oqDc&j04ysR=n$jW4V78>y+5IKyt@P5gU z7Yh?ggq&YpZzKWEfuY`Ydp zVeC1^_pw^NmN|s7)UzuoG@rP;;9)3n<&6CpVdgoPL7n~Jq4!4md!^>4CUMl{)WN<* zvXBGy(b3V%J!ct2-l`_6O8fO}^zm?trpHl&B+y~7|9+*b5mR=Gs?B~KNkij!*RYxM z=q|hg6W^}@bml^$2EP^!bL zHOrcrm!%-^I4^o_$m5rJ0QrW=Gv-y=;kx44(s+JE^cCt6p^2X!!k=a~-nASL&so&Z zwW20r7uQC`#e}%Sdf;`pRHjcGMZIq<|E;aQI{!5Lo!(!*bIT)RiLL&~2Px&%n#|y| zexVbItLN-^m*v}(A8_>UpA#h$g5V*PubNKnAYjaHDbKIv(tUdnE_K7IGI1wCjAQC~ z3dJj1Sy{1GU`%n*7+}nc>lMh|#;Yjr3LrAEs-OE71}mL}c}`AFPjBGT#_;CRl*)wb znpTCtL`%4V1Ic%*(YUSFfySprI%yqVJmug8oczMkf1;TGE>z8($LV*I7p5Wjz+8h?G-}ua`M+Nvbx$@or~K$j`k%J4B&0ryB`sw z@tRYR!cXTe9EYA;c}Ys3rX^^S%NN(lNEwt(6$UZp*+bOncJxuede` zT4V-5(MGXr<;%^zKAmrL_2OV*>c3mYn`!Ynw#^*Tb*!1`rzPw?NZkn`26;r;T-=`j zKhlw5MhT)=0e@+j4~Q}aA~Z2litI+HPADDx8%CId2I9z*vkV92UV?DBKIrE>aWykD z`=#|-k)3mWD78MA=owRrdZ+xil8Or6zkmPUC@_AH4G)LqqRW3MPUJSI>nW9_5p}a> z58MqiYv|&vxVgEp#xC*H(JA{1YQqvQ6BE|-o6`-cd#{Xq8)%prqNI2`N9P_ki_ zB>C@j#kwD?c;y_zWTNDCuQJfomb54Nccz9FyW=g8hT&X@ME*h!SnqpdiiGvtQOQ45 z^>=@_{F(T3%QSmB86n!(_lE>!I)Fdkaxaj$KU33-=)Ee}{cI62uY<=W6>4^WINUCr z=rsRxgG7l}`H7qPKgI=W4tvxJo{1x6m@dxPoAoti^IA~ynv8P#xpTRQ47ZGm&(+=K zvOi@R3W)thc23@e4KAI+hehD+Ijy($BSk8yrn%KbK4*X50T-fyV!$A_Gf$upKnoDE z)a>>ehoCDBPeU2^0K_G+Fa^2tTodwZKzN9Si4k4~Bk{okX zQBlcW+OLS$gyAx#eJgt;YS21lRifI%0%H>Ky*RLCw`@dIb7|h^A{Lj~lZtsk3^wk0 z{)x_qB!;~)<`DzeJ%sTHQ|{e?qz(F?-Y^8OqHOc|e#ODFJU*m7;0SSk9*Ey%rG15V zL*0=-K0f{pH>_IaM72>-rqKYPkj7!TxIdMpZr^)goyt*uLc5kBO)AvzkDoDx6k;w% z9jmFd2fp!)FkgOsGVFQBY{4KoG7|3}pFWOVe(rfyj`sxU<=z#sel@kycIjHJ}G z?F>$~uMQ3hXOScfW09QCpTX6~W8sATLW|N+9@s-W&@ z-Kod5s?8&5{I>q~W=Qz#p&u-mI{OtNktZxQb**+LcYZPv`$|7~vIltmPLKAIJVz!% zN*io#ZSjV1%GAH0caY9oX%ckvm8pf9c@9!nJYV#*2*u6D1mtgTZ|U~7x2kMNKejjL z+(X&g0)(<|Cp<&QNjP~D#BUC|c_C~9UN!#(sdAY@5a-l+*7K{=o#!kyLEjW&$>b%KF$zJ<6JG6Vgn*Wv43|#gYrO8QW`DID;m5+FBKDI@-~2Gy zN~v9s=2o_3<_Al@$3x+OcJcx*V~8C;tpnT6bW8Zf;v@Tq%5|BkMZ0n}KIeN4bM1Fm zJ0nA3_n+9}-TY!on8raH)$$NzCTwhMl!j9?Gm#))ZMiubIJ6hrTRytJg~rKn&PakQ z$iKZE(vc`v!ksztoC#?)_%-Om2Z&zTRHtQ-Gyu{yVXvb%uW#|fP`g$OMRsTV0XQ;< z*wgPq3s}B(l6*=0dGw13=JAt{=`lO@7UV!bZP%c z^n$6sVfpCNmxnQI_!S6DsNYoYs?0I&-FR}{?ShugDa^xN$aXNL}PBzE7-001IZ_`ujZ80UpdgaEaUR^QFlje_GjRV>kf-z64N@^O1oqM4Z{)F48UQlk7+SHg z;bB#Q>x98;tMbZiyI-T!D!J15juW96`LKkl5=>z!qMx-uEBtEq%cWYlp-5-Ha4K$K~o;VBa+%C7*=`zG~^AN|>mY8DrGF zw+fST_Ccq&mqS=~_KZgHA_q%>2`K#D_wMp%t={Kv#lOb}wOAf%Bw{6*Q7*>B#2~^F z!4IDI`HhV;b4yG6N*YNmk$0e}b=u$A2_}YwnVDW(2lr``YRW1}ezE!1@;AK_qR z6?3>5sp&sDy!*7^cy61r4nD5@a|NYjXJejCSxo$tyUb|=M899`{yTY- z%>8#7LduuynNwv3(`l)xbAOzLO>1Vt=BMW79!=LVg?>a-v&S8ylarBo(hy?1{BuXP zw>0~9REniKi+?1@;rNir2N9be;8O}~OVMd8(jR~IT2ifL3m6Y{FD~{#m$rES{=J?x zTJhCKj6M9jsb5f>n?HNgCii_QS6A)rx3$x4tJ-oB^dIC9@1PXGpY`=AQ5wSco46t; zApzIBRROuyXMbnDin?$AEczHU@a_BVUi1FqyAg?VZO*6_Z8A*BOrn&0)LW@*{nr8e z&cf=3hT@M;KD?N11KC$d#iKgwu^fqtwkz8NV)Iwej;0KpdRjh#{HepSK2-=dmgZF3 zb`bfisrS{&TT{vnMfQRh8rqaUOlSOJit|MqQiwP7>G@mI53K`Q?w{uz;_`%dYZ&S2 z=}k^fu7QI`<#gvAwj#Ogro7O*#5>}>c&5S>t5~qC?3o}F|)W2 zq~LZbFp0kbp~Mi){ty{_=>!m&AH}A>=IDoY^WlY<8S;>=r5_w9<+-JMTeqmaBiq?Z ztv(E3j%qN;FUbaZ*8J4uq|WYtd==uWavQizHdMP7yixAHlbyTk{QwS-1z-D0VnBjA z{pIl^#=tQaKy#~`^3?eHY}aRqk3g3VDPxkov`WDJihY2$?P8^1s7395RlS>ob|pt| zdOFYTBCtp(OX8xqsO)HhMQXYGa|Azs1CZ6!bX5yF zE)2IuD{R}$iFVxBlWYW8ngSYwva)jC%-mwbyKfL_$62JJORkL!wl2tM%uGy7jMUWB zl9%?w^KF6|pSJWpYIfA10?A z{M(nxY*GYTOk^SovCVN9=lfK3W7a2iP11|l`fIXXDZ@C*)jzMTug8$XpdLM?Ylew_uz~**d9ZIfPaL&tE=l(&}2EA(qxnSj^>pd$kx}rK=@pm6x=NV z{R{TI@1Un17Ltglrj-U`fRm9lQJE39*XOzr&kjCEf!8_Hv#xq_7TN=5D3>;K$1K(*50A(C6eLANU;1I|qt{ z&++XdNa9T%WDS~Ekv$;dW(-kK(icnSAy)+P_8n;p)8S_=KK7__M0r$L#Q$t;P|r)W zluD2N#ap@+@fY?SBi9OY>*~T7f>%cHVaUncVl~esOG~M4A5T zpWmK{>mjX)u-R*Rd=!0vh*NO4pg-5@Ohc)O7S2yRU@ed>x;hbCnwG(~Cw{j`Vol4> zk1?e1140M9`;!>uthP2<8Ex5qTQ2?hD=m%5X$lBV3^eB>^n*p{Eb=5W!kS;l@Teo@ z)8}eD;$h1B9PsGqo;fYo$e3VkWiv{5Ano0qr5IVBcpmh35PD}-RHGAmc9Z8}Zd)2I zCl3==QnC)r=mgJhklPc`aI`(G4Y5WS9tvlVKoQXh#Wb+!cb2ckw6F4e4@TimW>5;o}7dvn6rFT)YFa~qxf|x zwB%2xfpWs^k0A6%W_#hP(I4hs*Wq!65;OO55O>&77-2Me9!6B$CmRReSl50a))Drs zbbGkBq{42T8S&%AY`*-TI|GwoVjkD$9IfVC-;$o3)T8gyKLcG&rQ@TQrF*+Ovf<^u z)oUJrykctwGT{Da)zPK;#h8LMZ>(WR>*) zpO=U-OiPI>F#!UT51OHS3mzt(dH~hA0|f@i=+W> zKEPEzcXWFT-?TqRMS3qS`}s*75WXMH=n<;CcfXETbt3gpge}Kh&ic~V^RNqF1EexP zlU5|@hb7$D5_d&|=N98lt;-_F;1|p2ZUo{e1)g*$G&_i9v=%7S0BH6S! z%e6yc)taPm(s~mOh_a53Z*wjN^mt?SZIVgMn!sC-)l|aEhyiamPSun3ZzB~93OaG$ ziYwXhT)4<3A(3pZ!O_{z4rK<+sygUlUT^`nYa+5aG2it1IXOjV*H^XI4` zRxO;+43Kl$7mEJ6mslx90rIOPt3!jPs851G^rvSB75_i@LT#Md&6I@v~|Ayk* zYX%h+r7Y{oPfSdmg+JBRoV;fIejYM;1(yNUDVdBTgUo3Ob9r(3{IINnM`Xl!ZuY_Z z_puOJtt{*-ET`**so$!-^`5BYukSrxgs@t)3dKp*E;g9=Qnk+*mA&d=CwP#J_jWDw zo@Nf~=r|}@fO(xNk!vPyQ}6Ql*zS1NdwwdAJ_^G2`9PUAjA}B8xOTOwMmdX4rops| zCOCh~_kvUdG1`PKEg2{_?|8m${Y4kf!Be%lF@)(=CmKD8HkpDynSsq#)!s_>3>hd2 z?!nFcWTa=mRD%ok=z)Y+VsWPBg8U_Z!@>|**eE4cF^mU=Wp_Ox`yGm>TzOWw&%Um|4V(9mxBi@_q8MQkU z91VdlFHI82^x%Tvf#zc}xO<Y#fqX`YL}GZ;P`MRv5KX%g$ln1!-1~`=*!mQYm~)#%}pl7oHZD z-B`~0nGGg1Y!WLvr;CHD5)@!zB|cQ<2NWKNfLiGq$jPm;l+jB|Zn!>E8xhrFAE}y~ z<%VH%31Ms75o+&{NfYe$&+A|6@l8`Tj>o_B`oKCxo4xCrxg&h{h1bZIWV@owoPp9l z3X`x0V&|FpvI1#a<+hb)Wo)B&Ke(nA!2d04zH(-cI|{GFHb_UqR2SM_Z~Jr2qnVz*?(bn0Vb&`fMnSqyZMSp%@l&dvP1g`r75t9To6%bTO*Hykl8%29 zaT)vgGdqvX(p*DDmgDN#M&H~0sn9##Cd6=HIU~b^i#$RTV;*N10{toQ9MsDA;;QO4 zWPNUB$$-V~sfat}XfB}&^{8nFHtua&jY29NS9gy51K&*&jcQbA5IUsVs%u1AvP>mH~}=hBoQ*FAjb*Sw*fd&~l1^rWQoXc#xe@o+M=2=Z}pPrO1wJ_i!W zS_|X7Sx%5Cz$dq>?Xk71FX51T@gjHBHXJdjPNvHtiw{6DTT4-^JLT!y1FqVf#Vnp3 zVVJNN{J)xr6Ny^sK2tc4elV zgMPaf+35dC-2U@zQ?QefA%zA^I=yjq1vAqf`ft-iYlcOmV*^0qW|;!EaJ14#Z8u<6 zBs7O@IN-WIKwwwEsolHcvAKal%Wmawf{pj>zxW+9E9@K`zFeR0(|e9a2Zi5uh2lSb zzh@|ktv;n8jPZuN(Q3%C(drY;osO>h!6I)^{JZU`ChO;vVW`Wq`gWtQF?E9ND~1xK3aInuPVLply~4a|7rn5E(Zlhex{|-;4t11WI=&k1Q?W?w}|YNC+qv`bBG~_H#;$zxUM@sJ{8BT@aK3$Dt3L{3h6ugLD$$1b0S~Gz-x0fTa+EUJeo9x z|8c(%IU!med}~9B{;CS6q9vZh4_;~dVs=(^>Di52Qc=6$EUG(Pp+(Sdr>x%ju!n-k zc!-;qH&%@GX#-m*A2S4Kn zW0G5YJP(O$XGztx-xzu>xRE;dKsy%Rqob>(Af80!5a4o~I@>x+0(xBJgDKCVT|>bk zc#-53kV5Kr(s$AkI(;cUI^7u!T6EUc{zKB4FF7D@l1ojP!%zD-6D7U38p7Ihqye5u z+tbaCUms^`l$5Y!N@}4E>(tBd+gHDFe@atjZSrZx22~voA0N$B6tGSS10!hqhK7R& zIe&f3gp40V_oE;B>nz`_O zcMLjA?jVAKfIyIk#M;`rsF z%J}J0?wsD=64~V1oP~tMcD#TG&=gT$k(+2B!QI|KH z=fom?#-j#TXxtQ)C;8%)z;fe8Mgm(QsqMrh_zc&pF3`TAh;eWiI19^Ka$`jJ|p zZ}QVE=I_S;_}KhTO|$|FCcyQ5{5$q&8SN3PTE=%!M@62!Ds6ZYAquQjm2u387#2kC z&gr7*eF;6^;H|DKBUv9#7jq%{@=#L=hw)|FN}oBZJG1(v(MtSL(zEE<6){cqy6FC3 zE!H&&9TTaul2sOE;Zs>KN2{5VlJG1fB7)7uiz!bT2Sw{Z+t&N#S#6awtGgJ9#!>c) zqPsO(!}E)D@EF%%Fsm4^Dan&}g3&I}0`>?5bCSVP4t)PUgC@{(cG<^JP7a|%3I6}S z%*6E1q14a>4c4EXigun>;|egKOyt$X8l`v{JLI?La+0-B;=z*aK zLVj5RMnwc=dWT%8a-_esdSm*~9UMmUzN2n@2XFo)NTFX41X5`#fmv|EhdoeZ&3+$E zTDXOd0Z@R~C#SnOcQ43LPT$t@CdS$XR;pckCzV(*F`1-5=k=z5cqQMuUYXr)y4=Vo zn#$q!+$VF9Jxk6B|K+Y!+V!--xR=Ra-+RBtnmo*oEt@YTZwIB9_7>*;g=e01vf}vO z9cOO10+zI@(D>wvFXgdFw=*|Xi1Y%lNj!^XiF>8!ufX-xPgLr z$Nl(hR5Wj!=RwxTmKO27YQ&cx?#1eo)tgUo5U~x&NQ4S;A?X)vCpDkUZ6`m1h=bfG zdAeMFCz^ZwhsSp4OQ{Cv?!fR6!XM0F%86C)E%x{K2Ry4OGilX*SXKl?+dXX@2z8P96J_*T$gzGd zwNGq@o`@=&KDzqPyLUu^0YmF`zbd0&Qp-A}5D^&4xlEPnr#;CnMRaO~b{F$8MgiJy zU=;FC(tsnv`nhxs)|{5w*R+T7TkeV7Pr@L7Z3xEX@V8mByK%Sr+8BW!?>#>w( zgE}o#pa&1E_1yl2`a+(lk{Tupng-n4yJ4~YWiXTfnN>B-G*APELLJONH8V6E+or)2 z6SgM85OmLnlbNSzg&AVc&(Q(hq7wSy#96t4Qkz#I!e_B*D>|bXHVQc!FpylVsP`1ht;nQh>?b-FIBD zBNMB~vml|W@f&GG*>Cv6mp1UyQyLuqt_qe`5gf-r%l>m3tpDK~M$%^~~D z^3`)z)#ZxD#(VW$m#QWvEM3Spfaq6H6)W~U z){EOiYt*y5x8W5PN$+mn8-vrei3(Q!QB{Xs0yFAa;2|?yiV*f#x;#;OmBq8{tewl* zQs=Z}Y)kpFj5vqwhm=i{W)o;tnpqa>7L96)wJ{*InmQJa%9~9-cL{2aC}UZDay~jn zxf##;I3tQbk%sA?3i$W>Eq11FiKQ<)6WhJVF96OcW-tPke1JaA7qx=J4LB?5thLD^ z81Taxlxc)3Ni>@j-gqe}B#65g)0DuTy|JC9_dY()rk^o`i)a==*nS*iouy97}TQl=w(87W|c?4YiP)_lQ+p$=tapbWiJ(&u~ir{37NukU3hK1ki{XvyZ|^nSZ~C?lvyHTNQ?4`!&2 zctVNA$&;fW)}6w9q1Q$_DX;~m#HteNJd@*EE|b+U&vj2KfZhRq_%>$?lTg8 zNk^fPsB4&PImtn{`|O49aq5zNc~Mbh?TQk|Yo6a#-!2zY9itp9yG@-nrf}|^oqt#N zqRC0rUjyP=^--nq7zZ*xfdU{{K5>GMxa{pbR0cHQ_L5;izxqA)|!*H6@- z8SvBSPk@ls@6Vqu83d|UsB5@khJt8aoRbdPv5kcLQCuVgeGy4qs9QxjQn~`XnvJ{| zv7))i|AQ0q|J(H>uJ&oUF4cfib_rW*EgcETm~)LePG0}AcNIpwU8(wih=bd^&BzEg zC<^Lo-Sg16DvX?0{Hr|O!qNImU=KCW+ze51C~G^~mqL~X-7@Epg-)LWwqc=DjsWY* zf*xPm9UH^IiKXj-sr$WzA;2w%NHTK|Q~hZM>T}<%&!0GjGvF(C$j>;< zGqjG`TDy&coU&@Q*>m8l!vvD1y=NR7$gml{oDa5vgz9!>L)lwaaJd6@r89`Nb%4MD za}DvoCT~Eb=Z4CZVmT+~u$>ohAU`nb*iIlPf#Lq0{r1dkdD8EZrg{`P!l0i~h-Ug{%q2#`PGY^th3XEikJZe=bd&>A2|RnC zp0wo9Mv$m^K5eKTjUMq2TvTlN0G6idHH9zTkuFx%;cuL(Zn$k7|ExEy_ZA(?)F!ezVcB_bN(K#&cBc~*0W0tu9y) zmm{{{;!3*D4wi3)oZqS~U@h<+%=aaUP=33fJ-}R8SUB)*)vL3o8kRUW6Q-|Qd(nW)DRvqHuyQ*%nm>~e{dTs)#{e@?obXkPSgVV7 z{keB5yMywB)QwTrs~p{)LEbi!9Opo={*1sn6K3FEm4 zSylVKoRVuSUQ5B7F*^{%kfRu`6{;^M-H_1eSA8BEq4!QBMaRVZ{K=aG)I{>46j*u* zl9B&*MtTa{+U`2tY9~iW4;U2E*!;mH(393+Y$7t+WwXog!TQlOg zEFt?p$d6#-!SY8gmzyugLXa?@3m2PLp(NeApW z65^1kh=M2Z)3=^so@Ctc{zcz(l3u`royEdq`y@Xy+AgA7;o(%Yh?-%NmOUyscm`{`Jp^{NG(q8$jgI zjLQ5|fVbP=g@ZQ!(k6G2H` zNijUt-lugTqESNmFPZ}A^;+}KG`hacE-t16$~9z4?AQ9gJg`F6=MjcBdQsL&;H!HK z)LJjM%7R)$&E3)hL}^mNySq5eeF(V0Wt5xacU|zv?A7_fTJ^VPT>9EC20L`truR%f z+eHORZbs*Tb3Q*(hR%nMg_V)&0hHJ+?$n_o` z{kP(c4wHjDj?brO55dCkZn)gv|NND=ciuxajZ%uO(@K`sjTh&_y{9zCP ND9WqKmCKlZ_+LCJ>AnB} literal 12464 zcmaKT1yoeg*Y5>H8fIt-5m0I<0TCn}22l{{ZjkQok{SU)q@=qW>28z`Y3Xi>q2pcu z@2&OT`_{L<%iQ74Id}Hi=bU}_`Th1j^I86b6ag+3E&u=o@7^L50RXKOJSnjsf+Y`3 zh>yX44-I9c5WxMvzx3w3Xs`sw?yZI+0N|1QJJEo|WJ<6Q%juo0B-SDx1_YCTjYk~^ z0Gw3UGYgYkdGL0-VrFbU&ZV6-W-!%( zKUZs|ikWaoBTkXUGDxOBu1bJuuE#(tS!swh+xWS8?T9sNABMHR!0Qb9<+vq2dI-FH zrHGUFj6T3_eC!zai0-V55 zexn!Aq$oXnh1zvpuai?*78Nu)FDsC-76p<}6OX=%B0Q|uz?8y_gd=y)YaZA?UcV zx7r_u#1*aUh>c?&EM$tCGWjuKqUoM6!%UCx=I1wdadC;0VNL2tQt8E4V>OP4WEx){ zuji`xOGQ2|iBfD(%Ks(;$3Fj4@927D{03p7=rE(sO=)74!#eJ4G$FgvSh zyz#yHVkJx^*ubqLBT8A4azSkBcua;%v5Zsm@&uGtx=Pf z0c8G@084NfiqL*1G)*`Bbr>H5MH#uI1wuGXR5jtq_l516^nrOle*6&b9C0v(Y}f=- zK*>JZJqlhP>Rhie&5)^12sC#x13$m3>7xo7=MJyx*!>yBSj3A{vi0|s!`e@amOsd! z_;K2N#CNHx#(Sq^D{|`Dk0lbud`&bXpJRrs*SqPqKApkMtE{fBW|}y34{FVOQ7qR` zYSjJ5s7}Azz4GO=oy87jV_1JU0332;Q%dJ&8`q%L5@i4BIX`f%u z;-5NKrRAD)B+wW?GHpsp%&i90f5p>6jTxAeaDyP7Y$5IKubW&h)TR4bl&&h&-C?80 zmg5EROo`pU%bgeHy=itPjop;b_xD)u6krYb!2>Bdc?<>XkA+-{aW@VlANV!=t^ABU zZdq}V44GW+3^Aa5(}!0PHuAk+&YySZ3zbjn;@-VriN&)fTT68_%3yyyt|mxMP7dP+ z9VKO3QCUl(Q|!#ljE1g`j>wK0Hhw3i0{uA(Ww6lX&cez0__;3&X@}=wbG$NLNB_dt zu-Fd=E!)O{VtmaG`P38~#gs0-167=Fosh5*67S5ALM(EV0c4B546*tf;;xO|HT3&EPJznw%CZbvJ1yjmry11UnT(^cY6{LUAB z7mJA=ZO2^|RH@+j=V}MBL36lFrN}lc%`UxKnmpi{FFmP({lO-xdf0W1NgHnze)j~c z_DxjGi*EcI4*t5U>uV7WLJm2qjP*eivzdJtTc*ee2%^iCI8b*FPckcq)R=f9UQ7kNqrFFS-X$P!qY@a%p#hvm!8o%ki5m!pz zZD1wSM{rXje0{|NArLs?t~I%oG$0^gYkOOeBr(bd0$mSCrb)J+v#u3!-%N3J!J%hU zQIUKC@hjcE7|jTJ$JM#*6d?dSQJnwdbuuWIJDcacJ4tJ9V{-t=GY5);qPZ!%BJW_o zy3|P7)yn}%NqbmLRcqbc`1lFj>FXP;@9!p-zGuAR=3Y`D&EY3bRFvj@dE((vG4yNb zg|HG96jq8)GG=H`K}ObYQyZD@Fh)>f=T|qrA3b4V9eNPmx%`&xsVHtqrd#_+i_h(q z_oMJ}yeMhrhS^a*j-2(U`42K!`o1TrsHmXcoYNnVFD|AzU1xbUw%m`~vPUkUHQJJvNVKQqqvnb62py@3BvDe<8N`sTG4@u9f zv9Th(R#DKW}sXMonw<{cC#&rdM z6UeG*6#Ucbpym3YXw11;XPi&XDV7BPVTd(h60a#C8yg!jM-MEgc=%(qcJZOldE?>; z-~J*z17cWI_STF;z5L0j0y0G$mMyypenT|67A)yCD z$f^wMuyRHPnL1BKY`+B_&=jeAZly^_mHyJ(aDt@CgBKcLiExX>*uoBiS4VvX-?1N{ zV?PWq3X1Cm*Q|s`#0s|!Z^o;xopr>xUdabR@{5bZsWlb*$Q$Pm_#4GiQc~7$Z*O%P zN`***)Ye?G$D~Oq0k6Z_NXolai>WsFN(Q0Nr2$oWaX;6lh2rN5C z$2e$Nt&`R3=<25aB~?=FyK+C-u-=sUf@D&*8{PT`Av`@i?i8?(Zl^~=UDMyHj~}o1 zzf774xxGH;!YCi)##eJ%2c1#kmOfcoVIj(KV_^A?fx*yDR@L{SlWxO2QPr06O-f;5 zslY@5g?M8o%YK5Y#^M2rTY)C*ZF0qUX%?=CVIm4*ju&?0&wYfZyr-)z)u4WIXaZ>ZzOu4k%;QHF zj-*H*kzePLb_*P>=VaW%#g8@ev=s#&AV_2cs#MV~==}~c)GI8fIF)pFh3=3H5~O8{ z`j_MjfyId2^{fpeQHCS+Q@{?KWD` zqccz2qW*6Oo;%qhjmL$CKrX3JX;AqMZy*a91g~TG-ODFp+}U0qsAlJVeKpcyVHw64 zb|QXrXxfl!$!?;hO@M#$_iq|$-WY2`{XP_N-#&UB0B2dgA0{%t@p_VNUEC^chqOeO zonErAwk{!tS7F%YT*!}eJ$Xc%N%@MTnK!mqveYYi5O;4vO|O~B3$@ZmdNpxiCy+?a zsqL0n9|?U|ntnio}@2Eag3 zErg#=(RK?wE-NTF%4^t5yZxohO4^?i3Q2p|r2$9c0$;y|&>M4QyZGMw-5*hx`K4K+ z8*2^K%G!d^`2_$j&q05UgqMxKo1AP6PJvLkAebD$rcZ`r4{r=6mHp~*qZP1QLZe4W zv1O1QsChqu{B60r+EvjWbj-RtZljlY&}u4v5c4%LMp4?FCOE_TVE6D|l3xP0$F*#+ ziwlSm$n9eOWqTuene<~5i^s##a zM72Q~gFZv=<48&!EC%zNI;Q>{Cyp{pDrkc&f!CU3-X87Gb&+fme>Inn^lyvLj z;c{UrHTBDmi^l#N-$3FEW{laFJ&aXIb^C<1b}TwCa`BR1VJJR+e%+|oX^CicvIo(P z6&3bIOn3rLTk`dbhlf0j@>!oInnBd{MSI;50q4Uo%=&qt5QxApWyhft`5r5G3tFoa zVYr#4C5-3+dTy{potS9jyl%p;s9-EY8aF^ZdghiGUdJ>(8eHi(IQQ0iQ9nL^fnQ8- z?%l`Dp%m6yU(|%!FjwIH7nW3Q@5mz2g|2?CRvJ8Vc5w}jnFMnY5fK5e3+`0kyG!M` z6bC!Zfc7i5j97D!OAP6As}t!vHcY5Kflxv<$MfW*G&CL+tL`S4XUJnWH#ZB|uOJj} zaYL3L{z(1(qR~|hpx^27FiJAPXla3b*TScv1r7u$S*4fU^Bb;0*-KqxHB!Z<_QR#F zS8rRP>ma*Y{6YoQ_GzW#ocf7@*WcH-2yw9?%t|0l4@+!7m?uY4c zPlNMru&kK-@zckidliWO53ssV?MukRsvtQ1`y_trt|rwYvJZJAN_ih>pZk6iFXH8` z<36QrdM*jayV!EA`%|_q^A&l_S%>cLCxcwpdI~N|_IuM6F>xd~RcMkR` z9A*fXYAJHZ+HlcG@57a_hl=mHW7P2eQwMPL!$4Eu-aezIrk2dOu|=#BYggpSN;6k| zvocZ(jkHGxL8XAp9;Jte$H1N()AgXX!o*a5#*0KZe{$ViJaa3}!LEp`w##SY6_}JG z4pXIj+KfsmddjvWm$M%jgj^3|3Wokoav1z#5!v&su98+WVZ@m>gorM9G0k@|={Fz8 z{svqudkmGa8`OP=t;?m--vr^8c(W&?e=g8~2 zl~qwrL%T1pRa9(QNIw-8jyQ{0T4!HTf&gWLZ;%Z8!TZC=7@qwl+#t9vt1&GwE`bMd z)-9p`csbiVleN3s;{8{D@zb|&-zj0yc7!T73wZ!sbX}dGgkeR zoSMH;zD)~#R;8YQdSl&u4puYaaVRCx60O>UxAyk-@twU7peI0=`0r9K!~Z2UxoxqDN6tTd+)$zO-H71 z7TT_|%07l)r?qqSR?T53|?zhtFa!g9rYXrimY<+r@bl+-&zC=wiQDs74x(rXgme~0P3d}aY#YB% z;K6ihoUf{oUh^tKozqE|*oHs#!40-gjd5Tjl?*aSW^FVrvZx6t!edQE(GSl(iahJR z_GP3>TXGPf;aFc^mjxgE50VP$EV!TA^~aJ3NrF@_PNmJ$kdrpGFLCH+8DsxZ32w^w z8~2~7HJ2@5t4c34*yG4$$2AS_)UfHFf zsPV7w{FYet4$b-~x2TM~r&job;!z{8UTC`9SXfwy)8|Hlob;!y?D!aNN%?=mKMAM1 zAW`vVAjO@)L`MV33h%8nDI_b1+%E!*4#k>;PswmKpH_n8_pO?X0~+-5 zT~(P`_{cFo=+l$U(+(OBTO4$zL=tlecGW;9sQ`_DYU(BpswVyV<(vhsmioFN`=Rht zl6K#~mgv0L`nWnOMH@k`321UQ{p}#oo@b5+kq;~I5rk%Zo->1kgSbGw{py=vQMov@ z+W)W&$VzEJd|utI4@t~T!TCJRW(u}HZB_H?2b@9MeSgIHwjcDy;A@m@S{>v=R(h>I zw_i*mrxuz$i}++M;}sh+VWn^NCDBW=v!5E69XT)|x|VqIjy>G$?8-$c@fm8a#`vs% zkMya&4J;~43TRK)8s{^0Y7K(lB9O64IY1{ESBBl`~*P#2X{NSrLuil2D70^;<+lj~bo zv&6G?d6u;pMZ>Gp?M^u8TQNpTS)^rNg{7WS`%aD-=stN0tpONj72n63N8@6m54z2hqW`>7q zcQcK(4;3eS=w2+he|y#_@b;2pLS`02yb`R=JTiJT++)0%=pa6ck&l6}{!}jvyaGl! z3u}$fW8^?O2Fb)x1tB{W1z!NkD57n3EeEhJg+X!fLv404~#5N+`ouk5%#BblAKRmIp z>@}yNH7be3jo)0yx*R?hRP_h?7Jcbj8ZIQKEz6q2MIQcjZuQrFBHPdZEc)ywE zzOgLMtxmy%pBKZ!#*A4Uie5DMkjzg4C;j&;zXkc{R}$n~!DxUEdHU-1u(u7yKMxX` zOau1acR$fBV?vCwBjy>k|4M!5A*BE=O%wCyX)@0GYs)F5@qOyhYbc5l4uiD)pu48D z071;9f-t1*=Jq;Tqm;L4Z_qq=^2HGx@31LgT*CI^NXAsMTXD;6KoC>S`Mj4FwzuH@ zB?0Rz{zG(>X0qrzR_Jf%EwD!=RFmu?p{S~oTKCuWzcGk>Z1f&3~KX%gTe1$14{ z?llr>+!3`ZGVS>HX^Ye4pQsaxVa&K1f;93A;O{<0#6Gfi&uJmtay3X|Ka|Ygw6toD zKAw|SH;4d#X(a%Qgv0X(s}b1&#Ty(BK;Zr+3;^gb{6sw8Xw{gv=X@Dup68Y~K`rwt zrG8>-IGSOVTV}4=<=(1&hH_)btfTwwI2IZR(>2TK@*(G5 zj_HwZ;MrGG>>v6yPDmqU-N}2K7Q!^#V|y(YIo=-G6CQF1RS;FvE)9pnei`TeOo+8Z z>bfx9%kf_spNaMugpptDU{WmAf`gXj?fq2|Zb5bB1Zz3jQ?}yJ{4AQqSD63-(%FQ2 zd7&tn1qeAg_+{m{tS(@Vs(2wRi*0w=H1VJVI`>7Nys7hJOXidrjfT@4 zR3x3R+7vz`7%Nls828Rc1rT`$)2Dd2JnT2!=&(|SJ+&L=T6Etm&}%s%v@jifg#`%r zMz&%Bp%7QnIV&{{4)U#rh5POxyfjU1)iZY$BwA$oF6R;Z#Yx$j#Cntu*#5kA_eXUtJ-Pw*^ zpOz2d2MoHDjW`P^qu3;nC9T^#J2$dwQ>#(eFF1aJJtA0jY1FZ)_56Kam~6$Ctg5@F zU=4QGyUY8vuii10 z&+7uwy6Y=4%0zS#KDUh)y=o@cS1mbV!#zzJ#`X*0s57T4r=14Nnlw~c3P-4Na>ody zz)tmUndlcsdKKyS=ZrR~84Vtu4Mt?_9M)Xh2d-KYuUT-@#Ti(fDNU61;8l^meVqOu zu$Mn|JK!hgo~+9uaNxV-Kn`GI-#DK{tfDJeP}lX1j*b;p;jCUvm_KQle?~0+&gWdQ zV+8#bSd-_??_yBlJ;$UxO@>F)K~-wUgUbOtN{zJt^^Ngv>>D9WSv?3hNnW3VjeWVV zpMuKU(K3W<*`}CKX;_=6Z3J%XLbuXJkf*?s|VL zk|AT=rO_7q-dp0rcB)QA8z?^&9z9)o?P={=W{3N{3TI#h{i_G};K(;omN#$c?JEx) z@A-F+^z>N$US(jjpv!0b`(?Zit%4UZMq9uP(=)RR%-ZxU2_B|&jL`f2jYM>>-a~zN zGcti6rWh`sH*9uWr_#9|1}L@rFfKs`9{Rc_zy_J%B9VFN=pxXhe!R-)n5VTvONhnJ zFH~H^pkCZ9&mIv--Ol;SRx?u??`x&#zjn$8G|SjRr*iYlaq#xwl2L~KR9v)g@Jccm zadu@N6+e@SxX6v0pjM@355+AiZvzJ~qk~f!J3-M5O>r_w#~KR#5})jY=6+^6mzwNe zqp0?=_L5x{Y!ge_5~{pQDvp2HSI;X`v88Q#BP~PaY@Vv_8h9}5b9Q>f<-KeeChu!Q zCIJR5+3i@!)w8boJaQ%?jQctHPoz7q@;JSZJGYIUg9i_Ou&@;uVya5|>pa?7P0*(; z8tdzcP55laqawjsJ9qnbph~Lel^;V<(1;t~)fE?Y;RjUP_)AI$3r*}`^1#x|j1cs% zZ?HFq*dk_iuxB!7M>$f6gkXwb!sPE5 zOO$@HMzocwueBc6&gmq*Bvb3c^qs4*?N*y*3k@sbkaQ7ZSG^v2OmByzew5RO@O>_9m5k>ZOhU$c%<4DzHo!K6w@=XKz8MWrf;A z8?o77l3~c)>a%Q;2t)q2N4_`?A)4$*5K9xGt5XQwmeekM%48Yxy`A!Xu`gsR=Gn+* zqh;&nT|SM!NvkK&cQ^$iLYB0jFDzZqFXpDV-Jr%FmLXq1-|;VWwWOv>1F31~D(;hd@dlKs zwmv6G>-AvhVX97R2Itzr1{V$!apcNg+KfmZ zqh*ME&BV>%BEm*>CDON2MBGw#`Wb**HR+>*`9fD z%)#`pmD6ob_v4SWswFE4OCU^*wXU@Oh4D2%01`_l8>0i+f)IGV43|lBDRT$VodLEi zCfC=Q66|v|1~(5aKboQWjZLYsKAEkSqAMA0{M&Hnu~gabH)o6W5bM%{F|&h^bEc+> zMtmH(N)-Yxepka`9qPV1x3W&c}S2}(P-;P#e_uN{sC-9Z@2eb<(c1Ha} zn>2nD76!w2f3q&}rlI+uU@f!ApQNiUcEM)T(X$5a68@@b6QW;S2D#|9-^unrH`;h_ z7Df(FdpVr&(sH88T-;k^WPxyR`Z=k#q@-6hRKWmCEpc>ZO-U7KxpQ8U^F=?~$5?Q~ z5b%gumPF((w?Fz=TF9npeZ*IXZ_N!ieyaHD4=L3VOe+bzKi@}w zvA=hWKFnGMrf?ZlwKb;D(mCrjp2;neNLtO+;IHvnW#-xNg|a!vz%d7Hozu>csc=BPFIzw0tssq*X+2-z9f zSn$DjLpvxGG;XkFGm|J8nb?ED3|`-N!YD!tH&*}%14E+lGOFK7P4nN~JTID#Gw6g_ zVF??@jkj{>D?8KMDvm+6m*_b@sQYr^grXL!`3BT;`Yu#f6EFt`S3R>HS>N8*id}y9 z`&P$6xqt6?mu9<01^-C+IQg}S4`IWrh2MhXfh6d(V%{HA*Nd660#z^WJWfP!S*IfH zeMP1S7*4`>XO`C|pAku<+jQl~X77Cx4>6l=q~G-3Y1%e;GL)1Uqg%0;5mw)q&6!Vd zE9$`Z8%^J*<+P}zgkvx+*p@B4pd&E< zfqa^t4(Vli)-ieQT#DLaUR{AI?U4k659br?GdE-1`~mebN7LiuEk++Ca=>sILaO}M z{Z0L~P3@ewX^SoY(|;MD(xpOK?pr93bo{Jp#hNO)N+o^+V86>)Y#XuuSAWdiUo?{V zo1W~PY{OI^nh?IY%I1|+=gut$D|s6$i6ALl*#YF^PyZ07-t0u5uD|Y%b9A|5wQ3njIr6Xx7;s#l*ny1Ku6IKk`lS&Y}1( z)%~vh{=zL!AaegBMfP4>r7?9+j+~Io@2-TMZq!uTMxoaC8k>2KACL}$wnr!ibG=5F z{Vyi9&ResVwsD28ia9cN_wnd_Z{CQKAhJ|7YXKHayRaCCXh=s=TKfy0Dj=O0&WHBX z+fL+a>j!uEtibsNplpYd-rJM1Jp~LATY9bsIScN*8&eB4e}Ak#x+&dy@<-5c(dp{aM|vm3701yi(BJ+{>HA!ON>S;O1qDuN zSr2Wat+&Iorz21YfgMLO-MJd;qUZQoI@k&cYZ6|H(&w|)mM`;WC$)-HCy?^_I)xTv z);Kz@TwXUvgW8t)ZRkCWf%&wD{J6WgKaYxj94Ys!xLf&%V59xs7r8Q(Bh=H6Wep?; z1jc<{Q@t_91ydp)3JSGdkz*f0144>;Cer74BI43S=by=?7Izk^Tpw5O646`?{~S#A z{%dAtHr)d5I=E8q$j`{2F9}0(&Q=&*XIPe%$UO@u-=A*BizCi?2TFSX!ZnVAw5*nQR)0 zj#j5!G?BI0-p;sqdqQGw8;M1aP&-b;%jU}3e612~BeT^IX~_wup~rYkh60~EjsF^@ zY{sQxTobOhkSQz-ks|>8b3E2Bx;5@?u>zaq7nWUB8>_u1xxP_@pZ)SU8&Fac9(z**R8&+vcZO9XsM4S3^`|7v zqJ=$~HW+Q0v_ft>+-#I^?6MdKC4u4|kt#}UOk@(S(j;a&F|gpa`h}My%QnevWrWvS zcCO`iplfRmJ|&_ZRv_Pr*EYXOs|mFBN^Ue*hF{l)E7^TPWuC4VaugH_a|ht^HvxYV z0!DW9yI-`go#b{z7x|3grwa}TTMbYod?uUvZe6jGi38D{vB@$XaKBI{MSlG7Mq6ia zGaAVxY{SN$9Qo=X{DAqt#IOFxkBNv$CP6(39$v}POsh#R1OicE!UUBjSiby*^K?o* z<7ti;LV9~;gaoR<-vQemk!EW8M!=!#R_-TUbt%pZxbB^{EXb>!7l_a65V0@z-a!@O zI(97p>*pEOByEiaoa{6oYO(2Ukc1pS(zp6Po`9nAPp|`(uZzB}5P!b|OnI@?<*&oH zb6|3Z6L1WKNGkTd2Gl{%&|y`ja-CsI;U~y13&Yi94*-@DcC>%K_|7EnmP4y~)B%ef zL3hJk!+EWO3DmKZcX!@(*ShS_Qqgx=0GlkK4z@LL7>(i!epxMorDWpPd);7iS;%2< z=T6jnFoDoPU;R${(uFOfdx_0XPpg#@;I?kSaD>TlJASC(rMpfzyk*SH)*;YWx~P3* zgJ!37;X20d^%!@!8sDKJK6cypm?si&qpSZXOOJ zn|k1=F^GS2rY1G~fEkuA^U8yJ z=C7e0Svtw#)sa*0NN$JTZ6=;7b=n(-zEJ*f@6)Bmw+?#okd@$yh{vRGx8B*Q?f_og zkuUex=x+s2V+&xSFR8gi&PB0;kW2&*)zCaH7Im?>oe;~zKF8!(fk-AY8zVM-;Y4ot zWnNP&j1i8Urks+Jees%E+%!QWYQKZ@Zijxo*86reQ4Bnr;gFnW7ouI*+MQJuH|{VBKKI%_bMl=-g|UVS*NDr zcW9p}Z~?nlzqN4EZ_8Y7jmWO05G1r*mON0pi{g z5}hu*a~@aQc~VuVK3Ewb{*MYYq*!u*o2}k$I`WEs@f7vp)zq#vvN;k|*RBD=q=%h1 zjPy>LeSz7z*;&=i!jePpL(ii6ha}JIm{MS-+QG!Tq+YwRhmPEox`=4pmt^GWJpH8V zq6%Y}8a#{JFD}a=Hx`>RP>{ zxR(0->=}>pv2|0yO50}CYA{%O$(*{WAASI0hV#B+X0=_b$zu~*RE;Zk*H%Eg7SSngF>mn4PGM^!CEG}S-725oQj@Y z2iiO595qqR{bpTT)j7p1{+?D8T0q!Od=QlAu>d2#qf&{V8hi7sU~H3PKQk+jdF@Xi&((`-8N-TSgEy#~5)?EVe-1y)K+u z&Lcq}{C}`2I0lG!J9~RgVrtg=bG3&)5dsQ3b&+9A&CQ@{3_sOKb}ccmaf?YCrV1Gh#f4~t1#*c9lBk$U(zb8UO-^v=&x~g$!7ZrK z7M7rt>x%&h*y8^^WI2TevixZ7SKSBwmLpO)zlf{Vaw(sG=1QFgz1%3Gw{sb<@25QA z=l{BdSp51DJ@Um%R|Dy0zo13&D^;;B&GSLm2-zA6TbvQJ{BxcMDCG5J!O0{?j9H=mJ0v4o=tq zQ}mB*AS*)`*Ya?7k9z6!IC8Ay9M0l)OB-z@nD#|Zg^C}3b@F_v^O?Xa?%$lJWSDDW z0k*_Hu9Q`*hpU?XMW4>6KD+e$XCZtE!e`S)>xG3LK;0XhlG#|8+5vA?^B^q?7iW9^ zzJ}i{by=6Fs1T@7=4eMhUOG=w1{sO2{hW~*$a8>djN#ukTa&{ZA{CL6pkNzIY=b&}Yg5OC9xUR!}mn;ter>AP@W<(S7s@>okOU*b75$sYRLsA)NGqFi<3|ZZKNBL0k6- z0}oMI?+Y~K%sAuAl)c5R(&n>S#(Jx=F(9?YmspVVG2?!tjho>QrAAyt1 zayv=q06`+jDE>3Vm7lJ`LH(C>QU>ZGi^T2eD8QYF;1n3zMb!_-fi&^{BbcH3|Bg|C b3tRJ$r|xAcX*A$(3xIc$9}uN*{ZIc32hX>& From 26867cfbe6c16e69f990fbdb9d72044dc8e15095 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 17:40:50 +0300 Subject: [PATCH 112/229] nameservers separated by comma --- web/edit/user/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/edit/user/index.php b/web/edit/user/index.php index c0ea9cd5c..2fbd526a5 100644 --- a/web/edit/user/index.php +++ b/web/edit/user/index.php @@ -38,7 +38,7 @@ $v_fname = $data[$v_username]['FNAME']; $v_lname = $data[$v_username]['LNAME']; $v_shell = $data[$v_username]['SHELL']; $v_ns = $data[$v_username]['NS']; -$nameservers = explode(", ", $v_ns); +$nameservers = explode(",", $v_ns); $v_ns1 = $nameservers[0]; $v_ns2 = $nameservers[1]; $v_ns3 = $nameservers[2]; From 3525b4620523aef7c18571fcc9d8a871f514b1a3 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 17:43:54 +0300 Subject: [PATCH 113/229] FileManager css update --- web/css/file_manager.css | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/css/file_manager.css b/web/css/file_manager.css index 6e7454e0c..26accccad 100644 --- a/web/css/file_manager.css +++ b/web/css/file_manager.css @@ -42,6 +42,7 @@ body { margin: 0; padding: 0; } .menu div.button.small.mkdir { background: url("/images/flat_icons.png") no-repeat scroll -176px -123px; } .menu div.button.small.del { background: url("/images/flat_icons.png") no-repeat scroll -176px -149px; } .menu div.button.small.rename { background: url("/images/flat_icons.png") no-repeat scroll -180px -180px; width: 12px; } +.menu div.button.small.rights { background: url("/images/flat_icons.png") no-repeat scroll -237px -97px; } .menu div.button.small.copy { background: url("/images/flat_icons.png") no-repeat scroll -177px -210px; } .menu div.button.small.download { background: url("/images/flat_icons.png") no-repeat scroll -176px -243px; } .menu div.button.small.extract { background: url("/images/flat_icons.png") no-repeat scroll -232px -35px; } @@ -52,15 +53,13 @@ body { margin: 0; padding: 0; } .menu div.button.small.mkdir:hover { background-position: -203px -123px; } .menu div.button.small.del:hover { background-position: -203px -149px; } .menu div.button.small.rename:hover { background-position: -207px -180px; } +.menu div.button.small.rights:hover { background-position: -237px -122px; } .menu div.button.small.copy:hover { background-position: -204px -210px; } .menu div.button.small.download:hover { background-position: -204px -243px; } .menu div.button.small.extract:hover { background: url("/images/flat_icons.png") no-repeat scroll -255px -35px; } .menu div.button.small.archive:hover { background: url("/images/flat_icons.png") no-repeat scroll -201px -35px; } - - - .menu div.button.disabled:hover, .menu div.button { cursor: pointer; transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; box-shadow: none; color: #999; } .window.active .menu div.button:hover, @@ -554,14 +553,14 @@ input[type="checkbox"] { .listing li .filename-holder { max-width: 30%; } } -@media (max-width: 1210px) { +@media (max-width: 1270px) { .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: 1220px) { .menu div.button { display: none; } .menu div.button.medium, .menu div.button.small { display: inline-block; } From f9d02fce8870bbd365e2dd52459e45ef856fa69a Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 18:02:48 +0300 Subject: [PATCH 114/229] list-database-hosts refactoring --- web/add/db/index.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/web/add/db/index.php b/web/add/db/index.php index c206eb13c..c64ca42e8 100644 --- a/web/add/db/index.php +++ b/web/add/db/index.php @@ -121,13 +121,11 @@ $db_types = split(",",$_SESSION['DB_SYSTEM']); // List available database servers $db_hosts = array(); -foreach ($db_types as $db_type ) { - exec (VESTA_CMD."v-list-database-hosts ".$db_type." 'json'", $output, $return_var); - $db_hosts_tmp = json_decode(implode('', $output), true); - $db_hosts = array_merge($db_hosts, $db_hosts_tmp); - unset($db_hosts_tmp); - unset($output); -} +exec (VESTA_CMD."v-list-database-hosts 'json'", $output, $return_var); +$db_hosts_tmp = json_decode(implode('', $output), true); +$db_hosts = array_merge($db_hosts, $db_hosts_tmp); +unset($db_hosts_tmp); +unset($output); // Display body include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_db.html'); From ebc53f6129b6a8db5cebd21ff6a246a3b09c5aab Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 18:03:54 +0300 Subject: [PATCH 115/229] swapped format validators --- func/main.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/func/main.sh b/func/main.sh index 633875d53..df59f0083 100644 --- a/func/main.sh +++ b/func/main.sh @@ -769,8 +769,8 @@ is_format_valid() { 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_protocol_format_valid "$arg";; - protocol) is_fw_port_format_valid "$arg" ;; + 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';; From b67632d5784ace2ec5add0c334d687af35b5aa36 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 18:04:16 +0300 Subject: [PATCH 116/229] check_result() refactoring --- bin/v-change-sys-ip-status | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/v-change-sys-ip-status b/bin/v-change-sys-ip-status index ef48af7b7..7f834065f 100755 --- a/bin/v-change-sys-ip-status +++ b/bin/v-change-sys-ip-status @@ -27,18 +27,13 @@ check_args '2' "$#" 'IP IP_STATUS' 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" "$ARGUMENTS" - 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" "$ARGUMENTS" - exit $E_INUSE + check_result "$E_INUSE" "ip $ip is used" fi From d8e6411e948874c02b54be4f6918d5d3e5cdc602 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 18:04:35 +0300 Subject: [PATCH 117/229] fallback for missing backend template --- bin/v-add-web-domain | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/v-add-web-domain b/bin/v-add-web-domain index 6a8cf1983..a3e0253e6 100755 --- a/bin/v-add-web-domain +++ b/bin/v-add-web-domain @@ -103,6 +103,9 @@ chmod 551 $HOMEDIR/$user/web/$domain/stats $HOMEDIR/$user/web/$domain/logs # Addding PHP-FPM backend if [ ! -z "$BACKEND_SYSTEM" ]; then + if [ -z "$BACKEND_TEMPLATE" ]; then + update_user_value "$user" '$BACKEND_TEMPLATE' "default" + fi $BIN/v-add-web-domain-backend "$user" "$domain" $BACKEND_TEMPLATE check_result $? "Backend error" >/dev/null fi From 5babb1c55fbd264a1da0d3b13592a2ebcd258f51 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 24 Jun 2016 18:05:55 +0300 Subject: [PATCH 118/229] fix argument shift --- web/add/dns/index.php | 16 +++++++-------- web/api/index.php | 48 ++++++++++++++++++++++++++++--------------- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/web/add/dns/index.php b/web/add/dns/index.php index 629e2ec57..bd890c875 100644 --- a/web/add/dns/index.php +++ b/web/add/dns/index.php @@ -35,14 +35,14 @@ if (!empty($_POST['ok'])) { $v_domain = escapeshellarg($v_domain); $v_domain = strtolower($v_domain); $v_ip = escapeshellarg($_POST['v_ip']); - if (!empty($_POST['v_ns1'])) $v_ns1 = escapeshellarg($_POST['v_ns1']); - if (!empty($_POST['v_ns2'])) $v_ns2 = escapeshellarg($_POST['v_ns2']); - if (!empty($_POST['v_ns3'])) $v_ns3 = escapeshellarg($_POST['v_ns3']); - if (!empty($_POST['v_ns4'])) $v_ns4 = escapeshellarg($_POST['v_ns4']); - if (!empty($_POST['v_ns5'])) $v_ns5 = escapeshellarg($_POST['v_ns5']); - if (!empty($_POST['v_ns6'])) $v_ns6 = escapeshellarg($_POST['v_ns6']); - if (!empty($_POST['v_ns7'])) $v_ns7 = escapeshellarg($_POST['v_ns7']); - if (!empty($_POST['v_ns8'])) $v_ns8 = escapeshellarg($_POST['v_ns8']); + $v_ns1 = escapeshellarg($_POST['v_ns1']); + $v_ns2 = escapeshellarg($_POST['v_ns2']); + $v_ns3 = escapeshellarg($_POST['v_ns3']); + $v_ns4 = escapeshellarg($_POST['v_ns4']); + $v_ns5 = escapeshellarg($_POST['v_ns5']); + $v_ns6 = escapeshellarg($_POST['v_ns6']); + $v_ns7 = escapeshellarg($_POST['v_ns7']); + $v_ns8 = escapeshellarg($_POST['v_ns8']); // Add dns domain if (empty($_SESSION['error_msg'])) { diff --git a/web/api/index.php b/web/api/index.php index 32886446d..97f082594 100644 --- a/web/api/index.php +++ b/web/api/index.php @@ -31,25 +31,39 @@ if (isset($_POST['user']) || isset($_POST['hash'])) { echo 'Error: authentication failed'; exit; } - - // Prepare for iteration - $args = []; - $i = 0; - - // Loop through args until there isn't another. - while (true) - { - $i++; - if (!empty($_POST['arg' . $i])) - { - $args[] = $_POST['arg' . $i]; - continue; - } - break; - } + + // Prepare arguments + if (isset($_POST['cmd'])) $cmd = escapeshellarg($_POST['cmd']); + if (isset($_POST['arg1'])) $arg1 = escapeshellarg($_POST['arg1']); + if (isset($_POST['arg2'])) $arg2 = escapeshellarg($_POST['arg2']); + if (isset($_POST['arg3'])) $arg3 = escapeshellarg($_POST['arg3']); + if (isset($_POST['arg4'])) $arg4 = escapeshellarg($_POST['arg4']); + if (isset($_POST['arg5'])) $arg5 = escapeshellarg($_POST['arg5']); + if (isset($_POST['arg6'])) $arg6 = escapeshellarg($_POST['arg6']); + if (isset($_POST['arg7'])) $arg7 = escapeshellarg($_POST['arg7']); + if (isset($_POST['arg8'])) $arg8 = escapeshellarg($_POST['arg8']); + if (isset($_POST['arg9'])) $arg9 = escapeshellarg($_POST['arg9']); // Build query - $cmdquery = VESTA_CMD . $cmd . " " . implode(" ", $args); + $cmdquery = VESTA_CMD.$cmd." "; + if(!empty($arg1)){ + $cmdquery = $cmdquery.$arg1." "; } + if(!empty($arg2)){ + $cmdquery = $cmdquery.$arg2." "; } + if(!empty($arg3)){ + $cmdquery = $cmdquery.$arg3." "; } + if(!empty($arg4)){ + $cmdquery = $cmdquery.$arg4." "; } + if(!empty($arg5)){ + $cmdquery = $cmdquery.$arg5." "; } + if(!empty($arg6)){ + $cmdquery = $cmdquery.$arg6." "; } + if(!empty($arg7)){ + $cmdquery = $cmdquery.$arg7." "; } + if(!empty($arg8)){ + $cmdquery = $cmdquery.$arg8." "; } + if(!empty($arg9)){ + $cmdquery = $cmdquery.$arg9; } // Check command if ($cmd == "'v-make-tmp-file'") { From 516b54fe3fbd08239ddccff51873cf4e4390d6f3 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Sat, 25 Jun 2016 11:07:45 +0300 Subject: [PATCH 119/229] is_domain_new fix --- bin/v-add-dns-domain | 2 +- bin/v-add-mail-domain | 2 +- bin/v-add-web-domain | 19 +++++++++++++++---- bin/v-insert-dns-domain | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/bin/v-add-dns-domain b/bin/v-add-dns-domain index d1db42e2e..09d5b5712 100755 --- a/bin/v-add-dns-domain +++ b/bin/v-add-dns-domain @@ -50,7 +50,7 @@ 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 $template diff --git a/bin/v-add-mail-domain b/bin/v-add-mail-domain index 62858ef32..eedc02d92 100755 --- a/bin/v-add-mail-domain +++ b/bin/v-add-mail-domain @@ -47,7 +47,7 @@ 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' diff --git a/bin/v-add-web-domain b/bin/v-add-web-domain index a3e0253e6..fb24bdd1a 100755 --- a/bin/v-add-web-domain +++ b/bin/v-add-web-domain @@ -55,13 +55,17 @@ source $VESTA/conf/vesta.conf #----------------------------------------------------------# is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM' -check_args '2' "$#" 'USER DOMAIN [IP] [ALIASES] [PROXY_EXTENTIONS] [RESTART]' +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_package_full 'WEB_DOMAINS' 'WEB_ALIASES' is_domain_new 'web' "$domain,$aliases" -is_ip_valid "$ip" "$user" +if [ ! -z "$ip" ]; then + is_ip_valid "$ip" "$user" +else + get_user_ip +fi #----------------------------------------------------------# @@ -102,12 +106,19 @@ chmod 751 $HOMEDIR/$user/web/$domain $HOMEDIR/$user/web/$domain/* chmod 551 $HOMEDIR/$user/web/$domain/stats $HOMEDIR/$user/web/$domain/logs # Addding PHP-FPM backend -if [ ! -z "$BACKEND_SYSTEM" ]; then +if [ ! -z "$WEB_BACKEND" ]; then if [ -z "$BACKEND_TEMPLATE" ]; then - update_user_value "$user" '$BACKEND_TEMPLATE' "default" + 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 + prepare_web_backend fi # Preparing domain aliases diff --git a/bin/v-insert-dns-domain b/bin/v-insert-dns-domain index 4c445e153..0a83c2058 100755 --- a/bin/v-insert-dns-domain +++ b/bin/v-insert-dns-domain @@ -34,7 +34,7 @@ is_object_unsuspended 'user' 'USER' "$user" eval $data domain="$DOMAIN" if [ "$flush" = 'no' ]; then - is_domain_new 'dns' + is_domain_new 'dns' $domain fi From d30f9d10006608ae1b133fd0613c44c555938b92 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Sat, 25 Jun 2016 11:08:19 +0300 Subject: [PATCH 120/229] get user ip fix --- bin/v-add-domain | 2 +- func/ip.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/v-add-domain b/bin/v-add-domain index 0880442f9..3816c8115 100755 --- a/bin/v-add-domain +++ b/bin/v-add-domain @@ -39,7 +39,7 @@ is_object_unsuspended 'user' 'USER' "$user" # Get ip if it wasn't defined if [ -z "$ip" ]; then - get_user_ip $user + get_user_ip if [ -z "$ip" ]; then check_result $E_NOTEXIST "no avaiable IP address" fi diff --git a/func/ip.sh b/func/ip.sh index eb52a9905..978906826 100644 --- a/func/ip.sh +++ b/func/ip.sh @@ -197,12 +197,12 @@ get_broadcast() { 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='$owner'" $VESTA/data/ips/* |grep shared) + 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" + echo -e "$dedicated\n$shared" |sed "/^$/d" } # Get user ip From e83c5c0043b0ed2174984dc399e20e29e3071816 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Sat, 25 Jun 2016 11:09:29 +0300 Subject: [PATCH 121/229] domain validation fix --- func/main.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/func/main.sh b/func/main.sh index df59f0083..df4ff94a0 100644 --- a/func/main.sh +++ b/func/main.sh @@ -463,16 +463,24 @@ sync_cron_jobs() { # User format validator is_user_format_valid() { - if ! [[ "$1" =~ ^[a-zA-Z0-9][-|\.|_|a-zA-Z0-9]{0,28}[a-zA-Z0-9]$ ]]; then - check_result $E_INVALID "invalid $2 format :: $1" + if [ ${#1} -eq 1 ]; then + if ! [[ "$1" =~ ^^[[:alnum:]]$ ]]; then + echo "invalid $2 format :: $1" + fi + else + if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]] + then + echo "invalid $2 format :: $1" + fi fi } # Domain format validator is_domain_format_valid() { object_name=${2-domain} - exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]" - if [[ "$1" =~ $exclude ]]; then + mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)' + mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}' + if ! [[ "$1" =~ ^${mask1}${mask2}$ ]]; then check_result $E_INVALID "invalid $object_name format :: $1" fi } From 095a9f14eebf55de6986376756f33c050f5b8fe4 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Sat, 25 Jun 2016 11:09:44 +0300 Subject: [PATCH 122/229] backup validation fix --- bin/v-update-user-backup-exclusions | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/v-update-user-backup-exclusions b/bin/v-update-user-backup-exclusions index c4b913267..eefad8c31 100755 --- a/bin/v-update-user-backup-exclusions +++ b/bin/v-update-user-backup-exclusions @@ -24,9 +24,8 @@ is_file_available() { } is_file_valid() { - exclude="[!$#&;()\]" - vcontent=$(cat $vfile) - if [[ "$vcontent" =~ $exclude ]]; then + exclude="[!|#|$|^|&|(|)|{|}|<|>|?|\|\"|;|%|\`]" + if [[ "$(cat $vfile)" =~ $exclude ]]; then check_result $E_INVALID "invalid characters in the exlusion list" fi } From c23924e987e31a358816f053494943d40967a19c Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 26 Jun 2016 20:58:20 +0900 Subject: [PATCH 123/229] Remove redundant quotes in .html files --- web/templates/admin/add_ip.html | 8 ++++---- web/templates/admin/list_backup.html | 2 +- web/templates/admin/list_cron.html | 2 +- web/templates/admin/list_db.html | 2 +- web/templates/admin/list_dns.html | 2 +- web/templates/admin/list_dns_rec.html | 2 +- web/templates/admin/list_firewall.html | 2 +- web/templates/admin/list_ip.html | 12 ++++++------ web/templates/admin/list_mail.html | 2 +- web/templates/admin/list_mail_acc.html | 2 +- web/templates/admin/list_packages.html | 2 +- web/templates/admin/list_search.html | 6 +++--- web/templates/admin/list_services.html | 2 +- web/templates/admin/list_user.html | 4 ++-- web/templates/admin/list_web.html | 2 +- web/templates/user/list_cron.html | 2 +- web/templates/user/list_db.html | 2 +- web/templates/user/list_dns.html | 2 +- web/templates/user/list_dns_rec.html | 2 +- web/templates/user/list_mail.html | 2 +- web/templates/user/list_mail_acc.html | 2 +- web/templates/user/list_search.html | 4 ++-- web/templates/user/list_user.html | 4 ++-- web/templates/user/list_web.html | 2 +- 24 files changed, 37 insertions(+), 37 deletions(-) diff --git a/web/templates/admin/add_ip.html b/web/templates/admin/add_ip.html index 82eb13ab2..43b37d5d2 100644 --- a/web/templates/admin/add_ip.html +++ b/web/templates/admin/add_ip.html @@ -54,7 +54,7 @@
@@ -86,7 +86,7 @@ if ((!empty($v_interface)) && ( $value == $v_interface )) echo ' selected'; echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -131,7 +131,7 @@ @@ -156,4 +156,4 @@
- +
- () + ()
-
\ No newline at end of file +
diff --git a/web/templates/admin/list_backup.html b/web/templates/admin/list_backup.html index 7fd908397..365a816f4 100644 --- a/web/templates/admin/list_backup.html +++ b/web/templates/admin/list_backup.html @@ -100,7 +100,7 @@
-
+
diff --git a/web/templates/admin/list_cron.html b/web/templates/admin/list_cron.html index f9ec05812..c05aa8ed4 100644 --- a/web/templates/admin/list_cron.html +++ b/web/templates/admin/list_cron.html @@ -124,7 +124,7 @@ sort-star="
-
+
diff --git a/web/templates/admin/list_db.html b/web/templates/admin/list_db.html index 7fc51d7ec..4e5e5140a 100644 --- a/web/templates/admin/list_db.html +++ b/web/templates/admin/list_db.html @@ -152,7 +152,7 @@ sort-user="" sort-server="" so
-
+
diff --git a/web/templates/admin/list_dns.html b/web/templates/admin/list_dns.html index 78ae51118..7f25b0d3c 100644 --- a/web/templates/admin/list_dns.html +++ b/web/templates/admin/list_dns.html @@ -114,7 +114,7 @@ sort-expire="" sort-records="
-
+
diff --git a/web/templates/admin/list_dns_rec.html b/web/templates/admin/list_dns_rec.html index 244c1d4a8..e4b55877b 100644 --- a/web/templates/admin/list_dns_rec.html +++ b/web/templates/admin/list_dns_rec.html @@ -98,7 +98,7 @@ v_unit_id="" v_section="dns_rec">
-
+
diff --git a/web/templates/admin/list_firewall.html b/web/templates/admin/list_firewall.html index 2c4b365e7..73990d58d 100644 --- a/web/templates/admin/list_firewall.html +++ b/web/templates/admin/list_firewall.html @@ -113,7 +113,7 @@ sort-ip="" sort-comment=" \ No newline at end of file +
diff --git a/web/templates/admin/list_services.html b/web/templates/admin/list_services.html index aad7961ae..aa85671c7 100644 --- a/web/templates/admin/list_services.html +++ b/web/templates/admin/list_services.html @@ -65,7 +65,7 @@
-
+
diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html index d12ef7c8f..ae0651af8 100644 --- a/web/templates/admin/list_user.html +++ b/web/templates/admin/list_user.html @@ -95,7 +95,7 @@ sort-bandwidth="" sort-disk=" -
 L
+
 L
@@ -162,7 +162,7 @@ sort-bandwidth="" sort-disk="
-
+
diff --git a/web/templates/admin/list_web.html b/web/templates/admin/list_web.html index 9415aa2ed..7f610b1a6 100644 --- a/web/templates/admin/list_web.html +++ b/web/templates/admin/list_web.html @@ -169,7 +169,7 @@ sort-name="" sort-bandwidth="" sort-dis
-
+
diff --git a/web/templates/user/list_cron.html b/web/templates/user/list_cron.html index e3a73e227..757725ad3 100644 --- a/web/templates/user/list_cron.html +++ b/web/templates/user/list_cron.html @@ -111,7 +111,7 @@ sort-date="" sort-nam
-
+
diff --git a/web/templates/user/list_db.html b/web/templates/user/list_db.html index c03e83b24..2a80f7abc 100644 --- a/web/templates/user/list_db.html +++ b/web/templates/user/list_db.html @@ -141,7 +141,7 @@ sort-user="" sort-server="" so
-
+
diff --git a/web/templates/user/list_dns.html b/web/templates/user/list_dns.html index 616313ab8..ce5c12a5c 100644 --- a/web/templates/user/list_dns.html +++ b/web/templates/user/list_dns.html @@ -103,7 +103,7 @@ sort-expire="" sort-records=" -
+
diff --git a/web/templates/user/list_dns_rec.html b/web/templates/user/list_dns_rec.html index fe91f49f8..2cf428a4b 100644 --- a/web/templates/user/list_dns_rec.html +++ b/web/templates/user/list_dns_rec.html @@ -96,7 +96,7 @@
-
+
diff --git a/web/templates/user/list_mail.html b/web/templates/user/list_mail.html index 9eac082b5..09afc6103 100644 --- a/web/templates/user/list_mail.html +++ b/web/templates/user/list_mail.html @@ -121,7 +121,7 @@ sort-accounts="" sort-star="
-
+
diff --git a/web/templates/user/list_mail_acc.html b/web/templates/user/list_mail_acc.html index 0af018cfd..70bc38dc0 100644 --- a/web/templates/user/list_mail_acc.html +++ b/web/templates/user/list_mail_acc.html @@ -114,7 +114,7 @@ sort-star=" -
+
diff --git a/web/templates/user/list_search.html b/web/templates/user/list_search.html index 5545f2057..a8909b29a 100644 --- a/web/templates/user/list_search.html +++ b/web/templates/user/list_search.html @@ -73,7 +73,7 @@ if ($data[$key]['USER'] != $user && $data[$key]['KEY'] == 'ACCOUNT') { if ($key == $user) { ?> -
 L
+
 L
@@ -168,7 +168,7 @@
-
+
diff --git a/web/templates/user/list_user.html b/web/templates/user/list_user.html index d0dda28c6..e71d286a0 100644 --- a/web/templates/user/list_user.html +++ b/web/templates/user/list_user.html @@ -93,7 +93,7 @@ sort-disk="" sort-star=" -
 L
+
 L
@@ -150,7 +150,7 @@ sort-disk="" sort-star=" -
+
diff --git a/web/templates/user/list_web.html b/web/templates/user/list_web.html index eb78d6385..9f08d0ab9 100644 --- a/web/templates/user/list_web.html +++ b/web/templates/user/list_web.html @@ -161,7 +161,7 @@ sort-bandwidth="" sort-disk=""> -
+
From f197bc80412b99f14db46c0564ee1b8d5bd6e6a3 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 27 Jun 2016 01:37:10 +0300 Subject: [PATCH 124/229] fix for userlist --- bin/v-backup-users | 2 +- bin/v-check-letsencrypt-domain | 37 ++++++++++-------- bin/v-list-letsencrypt-user | 68 ++++++++++++++++------------------ bin/v-update-user-stats | 2 +- 4 files changed, 54 insertions(+), 55 deletions(-) diff --git a/bin/v-backup-users b/bin/v-backup-users index 874739286..e96eb2fbe 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 diff --git a/bin/v-check-letsencrypt-domain b/bin/v-check-letsencrypt-domain index c38aea4ae..190f9799b 100755 --- a/bin/v-check-letsencrypt-domain +++ b/bin/v-check-letsencrypt-domain @@ -29,14 +29,14 @@ encode_base64() { #----------------------------------------------------------# check_args '2' "$#" 'USER DOMAIN' -is_format_valid 'user' 'domain' +validate_format '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) +check_domain=$(grep -w "$domain" $USER_DATA/web.conf) if [ -z "$check_domain" ]; then check_result $E_NOTEXIST "domain $domain doesn't exist" fi @@ -48,7 +48,7 @@ fi source $USER_DATA/ssl/le.conf api='https://acme-v01.api.letsencrypt.org' -r_domain=$(echo "$check_domain" |cut -f 2 -d \') +r_domain=$(echo "$check_domain" |cut -f 2 -d \'|tail -n1) key="$USER_DATA/ssl/user.key" exponent="$EXPONENT" modulus="$MODULUS" @@ -77,16 +77,15 @@ 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 + echo -e "$(date) $domain $status\n$answer\n$(dig @8.8.8.8 $domain +short)" >> /tmp/le-log.txt 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" |tr ',' '\n' |grep -A 3 http-01 |grep token) -token=$(echo "$token" |cut -f 4 -d \") -uri=$(echo "$answer" |tr ',' '\n' |grep -A 3 http-01 |grep uri) -uri=$(echo "$uri" |cut -f 4 -d \") +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 @@ -96,20 +95,26 @@ if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then echo ' default_type text/plain;' >> $conf echo ' return 200 "$1.'$thumb'";' >> $conf echo '}' >> $conf - if [ ! -z "$PROXY_SYSTEM" ]; then - $BIN/v-restart-proxy - check_result $? "Proxy restart failed" >/dev/null - else - $BIN/v-restart-web - check_result $? "Web restart failed" >/dev/null - fi fi + echo $conf 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'"}' @@ -123,7 +128,7 @@ data=$data'"payload":"'"$payload"'","signature":"'"$signature"'"}' answer=$(curl -s -i -d "$data" "$uri") # Checking domain validation status -status=$(echo $answer |tr ',' '\n' |grep status |cut -f 4 -d \") +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") @@ -140,6 +145,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$ARGUMENTS" +log_event "$OK" "$EVENT" exit diff --git a/bin/v-list-letsencrypt-user b/bin/v-list-letsencrypt-user index cded96001..68ce6c228 100755 --- a/bin/v-list-letsencrypt-user +++ b/bin/v-list-letsencrypt-user @@ -16,36 +16,33 @@ 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 '}' +# Json function +json_list_conf() { + lines=$(wc -l $USER_DATA/ssl/le.conf | cut -f 1 -d ' ') + i='0' + IFS=$'\n' + echo -e "{\n\t\"LETSENCRYPT\": {" + for str in $(cat $USER_DATA/ssl/le.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}" } -# 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" +# Shell function +shell_list_conf() { + IFS=$'\n' + for str in $(cat $USER_DATA/ssl/le.conf); do + key=${str%%=*} + value=${str#*=} + echo "$key: ${value//\'/}" + done } @@ -56,7 +53,7 @@ csv_list() { 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" + check_result $E_NOTEXIST "LetsEncrypt user account doesn't exist" fi @@ -64,14 +61,11 @@ 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 ;; +# Listing system config +case $format in + json) json_list_conf ;; + plain) shell_list_conf ;; + shell) shell_list_conf | column -t ;; esac diff --git a/bin/v-update-user-stats b/bin/v-update-user-stats index 255981da1..f7e4900eb 100755 --- a/bin/v-update-user-stats +++ b/bin/v-update-user-stats @@ -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 From 5edfe8dd320d9e4a15727c08032b7cb94defe3b1 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 27 Jun 2016 01:38:01 +0300 Subject: [PATCH 125/229] fix LE - JSON pretty --- bin/v-check-letsencrypt-domain | 9 ++--- bin/v-list-letsencrypt-user | 68 ++++++++++++++++++---------------- 2 files changed, 40 insertions(+), 37 deletions(-) diff --git a/bin/v-check-letsencrypt-domain b/bin/v-check-letsencrypt-domain index 190f9799b..3d5c7b62e 100755 --- a/bin/v-check-letsencrypt-domain +++ b/bin/v-check-letsencrypt-domain @@ -29,7 +29,7 @@ encode_base64() { #----------------------------------------------------------# 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" @@ -48,7 +48,7 @@ fi source $USER_DATA/ssl/le.conf api='https://acme-v01.api.letsencrypt.org' -r_domain=$(echo "$check_domain" |cut -f 2 -d \'|tail -n1) +r_domain=$(echo "$check_domain" |cut -f 2 -d \') key="$USER_DATA/ssl/user.key" exponent="$EXPONENT" modulus="$MODULUS" @@ -77,7 +77,6 @@ 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 - echo -e "$(date) $domain $status\n$answer\n$(dig @8.8.8.8 $domain +short)" >> /tmp/le-log.txt check_result $E_CONNECT "LetsEncrypt challenge request $status" fi @@ -96,7 +95,6 @@ if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then echo ' return 200 "$1.'$thumb'";' >> $conf echo '}' >> $conf fi - echo $conf else acme="$HOMEDIR/$user/web/$r_domain/public_html/.well-known/acme-challenge" echo "$token" > $acme/$token.$thumb @@ -112,7 +110,6 @@ else $BIN/v-restart-web check_result $? "Web restart failed" >/dev/null fi - sleep 30 # Defining ACME query (request validation) @@ -145,6 +142,6 @@ fi #----------------------------------------------------------# # Logging -log_event "$OK" "$EVENT" +log_event "$OK" "$ARGUMENTS" exit diff --git a/bin/v-list-letsencrypt-user b/bin/v-list-letsencrypt-user index 68ce6c228..cded96001 100755 --- a/bin/v-list-letsencrypt-user +++ b/bin/v-list-letsencrypt-user @@ -16,33 +16,36 @@ format=${2-shell} # Includes source $VESTA/func/main.sh -# Json function -json_list_conf() { - lines=$(wc -l $USER_DATA/ssl/le.conf | cut -f 1 -d ' ') - i='0' - IFS=$'\n' - echo -e "{\n\t\"LETSENCRYPT\": {" - for str in $(cat $USER_DATA/ssl/le.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}" +# JSON list function +json_list() { + echo '{' + echo ' "'$user'": { + "EMAIL": "'$EMAIL'", + "EXPONENT": "'$EXPONENT'", + "MODULUS": "'$MODULUS'", + "THUMB: "'$THUMB'" + }' + echo '}' } -# Shell function -shell_list_conf() { - IFS=$'\n' - for str in $(cat $USER_DATA/ssl/le.conf); do - key=${str%%=*} - value=${str#*=} - echo "$key: ${value//\'/}" - done +# 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" } @@ -53,7 +56,7 @@ shell_list_conf() { 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" + check_result $E_NOTEXIST "LetsEncrypt user account doesn't exist" fi @@ -61,11 +64,14 @@ fi # Action # #----------------------------------------------------------# -# Listing system config -case $format in - json) json_list_conf ;; - plain) shell_list_conf ;; - shell) shell_list_conf | column -t ;; +source $USER_DATA/ssl/le.conf + +# Listing data +case $format in + json) json_list ;; + plain) plain_list ;; + csv) csv_list ;; + shell) shell_list ;; esac From 4b8a2c3f386408846c9a2cca0ab30f8f17ba9d62 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 27 Jun 2016 01:39:34 +0300 Subject: [PATCH 126/229] fixes from u1 (default login + i18n) --- web/inc/i18n.php | 141 ++++++++++++++++++++++++-------------------- web/login/index.php | 14 ++++- 2 files changed, 89 insertions(+), 66 deletions(-) diff --git a/web/inc/i18n.php b/web/inc/i18n.php index 10f16fc75..63f5be51b 100644 --- a/web/inc/i18n.php +++ b/web/inc/i18n.php @@ -44,69 +44,80 @@ 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 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(){ + } \ No newline at end of file diff --git a/web/login/index.php b/web/login/index.php index 253b8ac91..d6fba0daf 100644 --- a/web/login/index.php +++ b/web/login/index.php @@ -94,7 +94,19 @@ foreach ($sys_arr as $key => $value) { } // Detect language -if (empty($_SESSION['language'])) $_SESSION['language'] = detect_user_language(); +if (empty($_SESSION['language'])) { + $output = ''; + exec (VESTA_CMD."v-list-sys-config json", $output, $return_var); + $config = json_decode(implode('', $output), true); + $lang = $config['config']['LANGUAGE']; + + $output = ''; + exec (VESTA_CMD."v-list-sys-languages json", $output, $return_var); + $languages = json_decode(implode('', $output), true); + if(in_array($lang, $languages)){ + $_SESSION['language'] = $lang; + } +} require_once($_SERVER['DOCUMENT_ROOT'].'/inc/i18n/'.$_SESSION['language'].'.php'); require_once('../templates/header.html'); From 937919439a1b670b12ca0ecfe71a1a0369e81023 Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Mon, 27 Jun 2016 06:18:45 +0200 Subject: [PATCH 127/229] Update vsftpd.conf better for security using 022 for local_umask and anon_umask is better than 002 , it will create default 755 folders and 644 files (instead of 775) : 777 - 775 = 002 777 - 755 = 022 i think this must change in all vsftpd.conf files in install folder regards --- install/debian/8/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/debian/8/vsftpd/vsftpd.conf b/install/debian/8/vsftpd/vsftpd.conf index 0902899e7..55e1c32e8 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 From 53cd231148ddf34d0d300784fe077f762c8b037d Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Mon, 27 Jun 2016 07:03:34 +0200 Subject: [PATCH 128/229] Update vsftpd.conf better for security: using 022 for local_umask and anon_umask is better than 002 , it will create default 755 folders and 644 files (instead of 775) : 777 - 775 = 002 777 - 755 = 022 i think it's better to change in all vsftpd.conf files (all in install folder) regards --- install/debian/8/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/debian/8/vsftpd/vsftpd.conf b/install/debian/8/vsftpd/vsftpd.conf index 1cc0a2b0e..1ca1a9923 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 From 3f314d19bd0011b4dab1600777122eaf8e7aaa44 Mon Sep 17 00:00:00 2001 From: phre4k Date: Mon, 27 Jun 2016 09:37:56 +0200 Subject: [PATCH 129/229] Revert "added check for web server type in SSL config, closes #626" This reverts commit d2e01fab7613cef8698454f120d1475524334c26. --- bin/v-add-web-domain-ssl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/v-add-web-domain-ssl b/bin/v-add-web-domain-ssl index 4ed702897..72767e772 100755 --- a/bin/v-add-web-domain-ssl +++ b/bin/v-add-web-domain-ssl @@ -90,15 +90,11 @@ if [ -x $WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.sh ]; then $user $domain $ip $HOMEDIR $sdocroot fi -# Checking web config include +# Checking web config web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf" -web_include=$(grep "$conf" $web_conf ) -if [ -z "$web_include" ] && [ "$WEB_SYSTEM" != 'nginx' ]; then +if [ -z "$(grep "$conf" $web_conf)" ]; then echo "Include $conf" >> $web_conf fi -if [ -z "$web_include" ] && [ "$WEB_SYSTEM" = 'nginx' ]; then - echo "include $conf;" >> $web_conf -fi # Checking proxy if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then From b1f2f7ca8690be5e128abfe1e14f1f4e27f90972 Mon Sep 17 00:00:00 2001 From: slmcncb Date: Mon, 27 Jun 2016 12:36:14 +0300 Subject: [PATCH 130/229] Update tr.php --- web/inc/i18n/tr.php | 78 ++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/web/inc/i18n/tr.php b/web/inc/i18n/tr.php index 18810a75d..9f11b07d4 100644 --- a/web/inc/i18n/tr.php +++ b/web/inc/i18n/tr.php @@ -599,47 +599,47 @@ $LANG['tr'] = array( 'Select Bunch of Files' => 'Dosya Demetini Seç', 'Append 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' => 'Minutes', - 'Hourly' => 'Hourly', - 'Daily' => 'Daily', - 'Weekly' => 'Weekly', - 'Monthly' => 'Monthly', - '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', - 'Hour' => 'Hour', - 'Minute' => 'Minute' + 'Minutes' => 'Dakikalık', + 'Hourly' => 'Saatlik', + 'Daily' => 'Günlük', + 'Weekly' => 'Haftalık', + 'Monthly' => 'Aylık', + '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' => 'sürekli', + 'Hour' => 'Saat', + 'Minute' => 'Dakika' ); From 75b18551c52620f2fbf473323b7de10a5d312576 Mon Sep 17 00:00:00 2001 From: slmcncb Date: Mon, 27 Jun 2016 12:49:36 +0300 Subject: [PATCH 131/229] Update tr.php --- web/inc/i18n/tr.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/inc/i18n/tr.php b/web/inc/i18n/tr.php index 9f11b07d4..23b0d6161 100644 --- a/web/inc/i18n/tr.php +++ b/web/inc/i18n/tr.php @@ -1,7 +1,8 @@ Date: Mon, 27 Jun 2016 14:30:39 +0300 Subject: [PATCH 132/229] Release 0.9.8-16 --- bin/v-list-sys-services | 8 ++++---- .../debian/7/templates/web/apache2/basedir.stpl | 5 ++++- .../debian/7/templates/web/apache2/basedir.tpl | 5 ++++- .../debian/7/templates/web/apache2/default.stpl | 3 +++ .../debian/7/templates/web/apache2/default.tpl | 3 +++ .../debian/7/templates/web/apache2/hosting.stpl | 6 +++--- .../debian/7/templates/web/apache2/hosting.tpl | 5 +++-- .../debian/7/templates/web/apache2/phpcgi.stpl | 3 +++ .../debian/7/templates/web/apache2/phpcgi.tpl | 3 +++ .../debian/7/templates/web/apache2/phpfcgid.stpl | 3 +++ .../debian/7/templates/web/apache2/phpfcgid.tpl | 3 +++ .../debian/8/templates/web/apache2/basedir.stpl | 5 ++++- .../debian/8/templates/web/apache2/basedir.tpl | 5 ++++- .../debian/8/templates/web/apache2/default.stpl | 3 +++ .../debian/8/templates/web/apache2/default.tpl | 3 +++ .../debian/8/templates/web/apache2/hosting.stpl | 6 +++--- .../debian/8/templates/web/apache2/hosting.tpl | 6 +++--- .../debian/8/templates/web/apache2/phpcgi.stpl | 3 +++ .../debian/8/templates/web/apache2/phpcgi.tpl | 3 +++ .../debian/8/templates/web/apache2/phpfcgid.stpl | 3 +++ .../debian/8/templates/web/apache2/phpfcgid.tpl | 3 +++ install/rhel/5/templates/web/httpd/basedir.stpl | 5 ++++- install/rhel/5/templates/web/httpd/basedir.tpl | 5 ++++- install/rhel/5/templates/web/httpd/default.stpl | 3 +++ install/rhel/5/templates/web/httpd/default.tpl | 3 +++ install/rhel/5/templates/web/httpd/hosting.stpl | 6 +++--- install/rhel/5/templates/web/httpd/hosting.tpl | 6 +++--- install/rhel/5/templates/web/httpd/phpcgi.stpl | 3 +++ install/rhel/5/templates/web/httpd/phpcgi.tpl | 3 +++ install/rhel/5/templates/web/httpd/phpfcgid.stpl | 3 +++ install/rhel/5/templates/web/httpd/phpfcgid.tpl | 3 +++ install/rhel/6/templates/web/httpd/basedir.stpl | 5 ++++- install/rhel/6/templates/web/httpd/basedir.tpl | 5 ++++- install/rhel/6/templates/web/httpd/default.stpl | 3 +++ install/rhel/6/templates/web/httpd/default.tpl | 3 +++ install/rhel/6/templates/web/httpd/hosting.stpl | 5 +++-- install/rhel/6/templates/web/httpd/hosting.tpl | 5 +++-- install/rhel/6/templates/web/httpd/phpcgi.stpl | 3 +++ install/rhel/6/templates/web/httpd/phpcgi.tpl | 3 +++ install/rhel/6/templates/web/httpd/phpfcgid.stpl | 3 +++ install/rhel/6/templates/web/httpd/phpfcgid.tpl | 3 +++ install/rhel/7/templates/web/httpd/basedir.stpl | 5 ++++- install/rhel/7/templates/web/httpd/basedir.tpl | 5 ++++- install/rhel/7/templates/web/httpd/default.stpl | 3 +++ install/rhel/7/templates/web/httpd/default.tpl | 3 +++ install/rhel/7/templates/web/httpd/hosting.stpl | 6 +++--- install/rhel/7/templates/web/httpd/hosting.tpl | 5 +++-- install/rhel/7/templates/web/httpd/phpcgi.stpl | 3 +++ install/rhel/7/templates/web/httpd/phpcgi.tpl | 3 +++ install/rhel/7/templates/web/httpd/phpfcgid.stpl | 3 +++ install/rhel/7/templates/web/httpd/phpfcgid.tpl | 3 +++ .../12.04/templates/web/apache2/basedir.stpl | 5 ++++- .../12.04/templates/web/apache2/basedir.tpl | 5 ++++- .../12.04/templates/web/apache2/default.stpl | 3 +++ .../12.04/templates/web/apache2/default.tpl | 3 +++ .../12.04/templates/web/apache2/hosting.stpl | 6 +++--- .../12.04/templates/web/apache2/hosting.tpl | 6 +++--- .../12.04/templates/web/apache2/phpcgi.stpl | 3 +++ .../12.04/templates/web/apache2/phpcgi.tpl | 3 +++ .../12.04/templates/web/apache2/phpfcgid.stpl | 3 +++ .../12.04/templates/web/apache2/phpfcgid.tpl | 3 +++ .../12.10/templates/web/apache2/basedir.stpl | 5 ++++- .../12.10/templates/web/apache2/basedir.tpl | 5 ++++- .../12.10/templates/web/apache2/default.stpl | 3 +++ .../12.10/templates/web/apache2/default.tpl | 3 +++ .../12.10/templates/web/apache2/hosting.stpl | 6 +++--- .../12.10/templates/web/apache2/hosting.tpl | 6 +++--- .../12.10/templates/web/apache2/phpcgi.stpl | 3 +++ .../12.10/templates/web/apache2/phpcgi.tpl | 3 +++ .../12.10/templates/web/apache2/phpfcgid.stpl | 3 +++ .../12.10/templates/web/apache2/phpfcgid.tpl | 3 +++ .../13.04/templates/web/apache2/basedir.stpl | 5 ++++- .../13.04/templates/web/apache2/basedir.tpl | 5 ++++- .../13.04/templates/web/apache2/default.stpl | 3 +++ .../13.04/templates/web/apache2/default.tpl | 3 +++ .../13.04/templates/web/apache2/hosting.stpl | 5 +++-- .../13.04/templates/web/apache2/hosting.tpl | 5 +++-- .../13.04/templates/web/apache2/phpcgi.stpl | 3 +++ .../13.04/templates/web/apache2/phpcgi.tpl | 3 +++ .../13.04/templates/web/apache2/phpfcgid.stpl | 3 +++ .../13.04/templates/web/apache2/phpfcgid.tpl | 3 +++ .../13.10/templates/web/apache2/basedir.stpl | 5 ++++- .../13.10/templates/web/apache2/basedir.tpl | 5 ++++- .../13.10/templates/web/apache2/default.stpl | 3 +++ .../13.10/templates/web/apache2/default.tpl | 3 +++ .../13.10/templates/web/apache2/hosting.stpl | 6 +++--- .../13.10/templates/web/apache2/hosting.tpl | 6 +++--- .../13.10/templates/web/apache2/phpcgi.stpl | 3 +++ .../13.10/templates/web/apache2/phpcgi.tpl | 3 +++ .../13.10/templates/web/apache2/phpfcgid.stpl | 3 +++ .../13.10/templates/web/apache2/phpfcgid.tpl | 3 +++ .../14.04/templates/web/apache2/basedir.stpl | 5 ++++- .../14.04/templates/web/apache2/basedir.tpl | 5 ++++- .../14.04/templates/web/apache2/default.stpl | 3 +++ .../14.04/templates/web/apache2/default.tpl | 3 +++ .../14.04/templates/web/apache2/hosting.stpl | 6 +++--- .../14.04/templates/web/apache2/hosting.tpl | 6 +++--- .../14.04/templates/web/apache2/phpcgi.stpl | 3 +++ .../14.04/templates/web/apache2/phpcgi.tpl | 3 +++ .../14.04/templates/web/apache2/phpfcgid.stpl | 3 +++ .../14.04/templates/web/apache2/phpfcgid.tpl | 3 +++ .../14.10/templates/web/apache2/basedir.stpl | 5 ++++- .../14.10/templates/web/apache2/basedir.tpl | 5 ++++- .../14.10/templates/web/apache2/default.stpl | 3 +++ .../14.10/templates/web/apache2/default.tpl | 3 +++ .../14.10/templates/web/apache2/hosting.stpl | 6 +++--- .../14.10/templates/web/apache2/hosting.tpl | 6 +++--- .../14.10/templates/web/apache2/phpcgi.stpl | 3 +++ .../14.10/templates/web/apache2/phpcgi.tpl | 3 +++ .../14.10/templates/web/apache2/phpfcgid.stpl | 3 +++ .../14.10/templates/web/apache2/phpfcgid.tpl | 3 +++ .../15.04/templates/web/apache2/basedir.stpl | 5 ++++- .../15.04/templates/web/apache2/basedir.tpl | 5 ++++- .../15.04/templates/web/apache2/default.stpl | 3 +++ .../15.04/templates/web/apache2/default.tpl | 3 +++ .../15.04/templates/web/apache2/hosting.stpl | 6 +++--- .../15.04/templates/web/apache2/hosting.tpl | 6 +++--- .../15.04/templates/web/apache2/phpcgi.stpl | 3 +++ .../15.04/templates/web/apache2/phpcgi.tpl | 3 +++ .../15.04/templates/web/apache2/phpfcgid.stpl | 3 +++ .../15.04/templates/web/apache2/phpfcgid.tpl | 3 +++ .../15.10/templates/web/apache2/basedir.stpl | 5 ++++- .../15.10/templates/web/apache2/basedir.tpl | 5 ++++- .../15.10/templates/web/apache2/default.stpl | 3 +++ .../15.10/templates/web/apache2/default.tpl | 3 +++ .../15.10/templates/web/apache2/hosting.stpl | 6 +++--- .../15.10/templates/web/apache2/hosting.tpl | 6 +++--- .../15.10/templates/web/apache2/phpcgi.stpl | 3 +++ .../15.10/templates/web/apache2/phpcgi.tpl | 3 +++ .../15.10/templates/web/apache2/phpfcgid.stpl | 3 +++ .../15.10/templates/web/apache2/phpfcgid.tpl | 3 +++ install/vst-install-debian.sh | 5 ++++- install/vst-install-rhel.sh | 5 ++++- install/vst-install-ubuntu.sh | 5 ++++- src/deb/nginx/control | 2 +- src/deb/php/control | 2 +- src/deb/vesta/control | 2 +- src/deb/vesta/postinst | 5 +++++ src/rpm/conf/nginx.conf | 4 ++-- src/rpm/conf/php-fpm.conf | 1 + src/rpm/specs/vesta-nginx.spec | 2 +- src/rpm/specs/vesta-php.spec | 5 ++++- src/rpm/specs/vesta.spec | 16 +++++++++++++++- upd/add_notifications.sh | 8 ++++++-- web/css/file_manager.css | 6 +++--- web/css/styles.min.css | 14 ++++++++++---- web/generate/ssl/index.php | 14 +++++++------- web/inc/i18n/ar.php | 4 +++- web/inc/i18n/de.php | 6 +++--- web/inc/i18n/el.php | 6 +++--- web/inc/i18n/es.php | 6 +++--- web/inc/i18n/fa.php | 2 +- web/inc/i18n/fr.php | 14 +++++++------- web/inc/i18n/hu.php | 4 ++-- web/inc/i18n/id.php | 6 +++--- web/inc/i18n/nl.php | 2 +- web/inc/i18n/pt-BR.php | 2 +- web/inc/i18n/pt.php | 2 +- web/inc/i18n/ro.php | 2 +- web/inc/i18n/ru.php | 4 ++-- web/inc/i18n/tw.php | 2 +- 161 files changed, 521 insertions(+), 159 deletions(-) mode change 100755 => 100644 install/debian/7/templates/web/apache2/basedir.stpl mode change 100755 => 100644 install/debian/7/templates/web/apache2/basedir.tpl mode change 100755 => 100644 install/debian/7/templates/web/apache2/default.stpl mode change 100755 => 100644 install/debian/7/templates/web/apache2/default.tpl mode change 100755 => 100644 install/debian/7/templates/web/apache2/hosting.stpl mode change 100755 => 100644 install/debian/7/templates/web/apache2/hosting.tpl mode change 100755 => 100644 install/debian/7/templates/web/apache2/phpcgi.stpl mode change 100755 => 100644 install/debian/7/templates/web/apache2/phpcgi.tpl mode change 100755 => 100644 install/debian/7/templates/web/apache2/phpfcgid.stpl mode change 100755 => 100644 install/debian/7/templates/web/apache2/phpfcgid.tpl mode change 100755 => 100644 install/debian/8/templates/web/apache2/basedir.stpl mode change 100755 => 100644 install/debian/8/templates/web/apache2/basedir.tpl mode change 100755 => 100644 install/debian/8/templates/web/apache2/default.stpl mode change 100755 => 100644 install/debian/8/templates/web/apache2/default.tpl mode change 100755 => 100644 install/debian/8/templates/web/apache2/hosting.stpl mode change 100755 => 100644 install/debian/8/templates/web/apache2/hosting.tpl mode change 100755 => 100644 install/debian/8/templates/web/apache2/phpcgi.stpl mode change 100755 => 100644 install/debian/8/templates/web/apache2/phpcgi.tpl mode change 100755 => 100644 install/debian/8/templates/web/apache2/phpfcgid.stpl mode change 100755 => 100644 install/debian/8/templates/web/apache2/phpfcgid.tpl mode change 100755 => 100644 install/rhel/5/templates/web/httpd/basedir.stpl mode change 100755 => 100644 install/rhel/5/templates/web/httpd/basedir.tpl mode change 100755 => 100644 install/rhel/5/templates/web/httpd/default.stpl mode change 100755 => 100644 install/rhel/5/templates/web/httpd/default.tpl mode change 100755 => 100644 install/rhel/5/templates/web/httpd/hosting.stpl mode change 100755 => 100644 install/rhel/5/templates/web/httpd/hosting.tpl mode change 100755 => 100644 install/rhel/5/templates/web/httpd/phpcgi.stpl mode change 100755 => 100644 install/rhel/5/templates/web/httpd/phpcgi.tpl mode change 100755 => 100644 install/rhel/5/templates/web/httpd/phpfcgid.stpl mode change 100755 => 100644 install/rhel/5/templates/web/httpd/phpfcgid.tpl mode change 100755 => 100644 install/rhel/6/templates/web/httpd/basedir.stpl mode change 100755 => 100644 install/rhel/6/templates/web/httpd/basedir.tpl mode change 100755 => 100644 install/rhel/6/templates/web/httpd/default.stpl mode change 100755 => 100644 install/rhel/6/templates/web/httpd/default.tpl mode change 100755 => 100644 install/rhel/6/templates/web/httpd/hosting.stpl mode change 100755 => 100644 install/rhel/6/templates/web/httpd/hosting.tpl mode change 100755 => 100644 install/rhel/6/templates/web/httpd/phpcgi.stpl mode change 100755 => 100644 install/rhel/6/templates/web/httpd/phpcgi.tpl mode change 100755 => 100644 install/rhel/6/templates/web/httpd/phpfcgid.stpl mode change 100755 => 100644 install/rhel/6/templates/web/httpd/phpfcgid.tpl mode change 100755 => 100644 install/rhel/7/templates/web/httpd/basedir.stpl mode change 100755 => 100644 install/rhel/7/templates/web/httpd/basedir.tpl mode change 100755 => 100644 install/rhel/7/templates/web/httpd/default.stpl mode change 100755 => 100644 install/rhel/7/templates/web/httpd/default.tpl mode change 100755 => 100644 install/rhel/7/templates/web/httpd/hosting.stpl mode change 100755 => 100644 install/rhel/7/templates/web/httpd/hosting.tpl mode change 100755 => 100644 install/rhel/7/templates/web/httpd/phpcgi.stpl mode change 100755 => 100644 install/rhel/7/templates/web/httpd/phpcgi.tpl mode change 100755 => 100644 install/rhel/7/templates/web/httpd/phpfcgid.stpl mode change 100755 => 100644 install/rhel/7/templates/web/httpd/phpfcgid.tpl mode change 100755 => 100644 install/ubuntu/12.04/templates/web/apache2/basedir.stpl mode change 100755 => 100644 install/ubuntu/12.04/templates/web/apache2/basedir.tpl mode change 100755 => 100644 install/ubuntu/12.04/templates/web/apache2/default.stpl mode change 100755 => 100644 install/ubuntu/12.04/templates/web/apache2/default.tpl mode change 100755 => 100644 install/ubuntu/12.04/templates/web/apache2/hosting.stpl mode change 100755 => 100644 install/ubuntu/12.04/templates/web/apache2/hosting.tpl mode change 100755 => 100644 install/ubuntu/12.04/templates/web/apache2/phpcgi.stpl mode change 100755 => 100644 install/ubuntu/12.04/templates/web/apache2/phpcgi.tpl mode change 100755 => 100644 install/ubuntu/12.04/templates/web/apache2/phpfcgid.stpl mode change 100755 => 100644 install/ubuntu/12.04/templates/web/apache2/phpfcgid.tpl mode change 100755 => 100644 install/ubuntu/12.10/templates/web/apache2/basedir.stpl mode change 100755 => 100644 install/ubuntu/12.10/templates/web/apache2/basedir.tpl mode change 100755 => 100644 install/ubuntu/12.10/templates/web/apache2/default.stpl mode change 100755 => 100644 install/ubuntu/12.10/templates/web/apache2/default.tpl mode change 100755 => 100644 install/ubuntu/12.10/templates/web/apache2/hosting.stpl mode change 100755 => 100644 install/ubuntu/12.10/templates/web/apache2/hosting.tpl mode change 100755 => 100644 install/ubuntu/12.10/templates/web/apache2/phpcgi.stpl mode change 100755 => 100644 install/ubuntu/12.10/templates/web/apache2/phpcgi.tpl mode change 100755 => 100644 install/ubuntu/12.10/templates/web/apache2/phpfcgid.stpl mode change 100755 => 100644 install/ubuntu/12.10/templates/web/apache2/phpfcgid.tpl mode change 100755 => 100644 install/ubuntu/13.04/templates/web/apache2/basedir.stpl mode change 100755 => 100644 install/ubuntu/13.04/templates/web/apache2/basedir.tpl mode change 100755 => 100644 install/ubuntu/13.04/templates/web/apache2/default.stpl mode change 100755 => 100644 install/ubuntu/13.04/templates/web/apache2/default.tpl mode change 100755 => 100644 install/ubuntu/13.04/templates/web/apache2/hosting.stpl mode change 100755 => 100644 install/ubuntu/13.04/templates/web/apache2/hosting.tpl mode change 100755 => 100644 install/ubuntu/13.04/templates/web/apache2/phpcgi.stpl mode change 100755 => 100644 install/ubuntu/13.04/templates/web/apache2/phpcgi.tpl mode change 100755 => 100644 install/ubuntu/13.04/templates/web/apache2/phpfcgid.stpl mode change 100755 => 100644 install/ubuntu/13.04/templates/web/apache2/phpfcgid.tpl mode change 100755 => 100644 install/ubuntu/13.10/templates/web/apache2/basedir.stpl mode change 100755 => 100644 install/ubuntu/13.10/templates/web/apache2/basedir.tpl mode change 100755 => 100644 install/ubuntu/13.10/templates/web/apache2/default.stpl mode change 100755 => 100644 install/ubuntu/13.10/templates/web/apache2/default.tpl mode change 100755 => 100644 install/ubuntu/13.10/templates/web/apache2/hosting.stpl mode change 100755 => 100644 install/ubuntu/13.10/templates/web/apache2/hosting.tpl mode change 100755 => 100644 install/ubuntu/13.10/templates/web/apache2/phpcgi.stpl mode change 100755 => 100644 install/ubuntu/13.10/templates/web/apache2/phpcgi.tpl mode change 100755 => 100644 install/ubuntu/13.10/templates/web/apache2/phpfcgid.stpl mode change 100755 => 100644 install/ubuntu/13.10/templates/web/apache2/phpfcgid.tpl mode change 100755 => 100644 install/ubuntu/14.04/templates/web/apache2/basedir.stpl mode change 100755 => 100644 install/ubuntu/14.04/templates/web/apache2/basedir.tpl mode change 100755 => 100644 install/ubuntu/14.04/templates/web/apache2/default.stpl mode change 100755 => 100644 install/ubuntu/14.04/templates/web/apache2/default.tpl mode change 100755 => 100644 install/ubuntu/14.04/templates/web/apache2/hosting.stpl mode change 100755 => 100644 install/ubuntu/14.04/templates/web/apache2/hosting.tpl mode change 100755 => 100644 install/ubuntu/14.04/templates/web/apache2/phpcgi.stpl mode change 100755 => 100644 install/ubuntu/14.04/templates/web/apache2/phpcgi.tpl mode change 100755 => 100644 install/ubuntu/14.04/templates/web/apache2/phpfcgid.stpl mode change 100755 => 100644 install/ubuntu/14.04/templates/web/apache2/phpfcgid.tpl mode change 100755 => 100644 install/ubuntu/14.10/templates/web/apache2/basedir.stpl mode change 100755 => 100644 install/ubuntu/14.10/templates/web/apache2/basedir.tpl mode change 100755 => 100644 install/ubuntu/14.10/templates/web/apache2/default.stpl mode change 100755 => 100644 install/ubuntu/14.10/templates/web/apache2/default.tpl mode change 100755 => 100644 install/ubuntu/14.10/templates/web/apache2/hosting.stpl mode change 100755 => 100644 install/ubuntu/14.10/templates/web/apache2/hosting.tpl mode change 100755 => 100644 install/ubuntu/14.10/templates/web/apache2/phpcgi.stpl mode change 100755 => 100644 install/ubuntu/14.10/templates/web/apache2/phpcgi.tpl mode change 100755 => 100644 install/ubuntu/14.10/templates/web/apache2/phpfcgid.stpl mode change 100755 => 100644 install/ubuntu/14.10/templates/web/apache2/phpfcgid.tpl mode change 100755 => 100644 install/ubuntu/15.04/templates/web/apache2/basedir.stpl mode change 100755 => 100644 install/ubuntu/15.04/templates/web/apache2/basedir.tpl mode change 100755 => 100644 install/ubuntu/15.04/templates/web/apache2/default.stpl mode change 100755 => 100644 install/ubuntu/15.04/templates/web/apache2/default.tpl mode change 100755 => 100644 install/ubuntu/15.04/templates/web/apache2/hosting.stpl mode change 100755 => 100644 install/ubuntu/15.04/templates/web/apache2/hosting.tpl mode change 100755 => 100644 install/ubuntu/15.04/templates/web/apache2/phpcgi.stpl mode change 100755 => 100644 install/ubuntu/15.04/templates/web/apache2/phpcgi.tpl mode change 100755 => 100644 install/ubuntu/15.04/templates/web/apache2/phpfcgid.stpl mode change 100755 => 100644 install/ubuntu/15.04/templates/web/apache2/phpfcgid.tpl mode change 100755 => 100644 install/ubuntu/15.10/templates/web/apache2/basedir.stpl mode change 100755 => 100644 install/ubuntu/15.10/templates/web/apache2/basedir.tpl mode change 100755 => 100644 install/ubuntu/15.10/templates/web/apache2/default.stpl mode change 100755 => 100644 install/ubuntu/15.10/templates/web/apache2/default.tpl mode change 100755 => 100644 install/ubuntu/15.10/templates/web/apache2/hosting.stpl mode change 100755 => 100644 install/ubuntu/15.10/templates/web/apache2/hosting.tpl mode change 100755 => 100644 install/ubuntu/15.10/templates/web/apache2/phpcgi.stpl mode change 100755 => 100644 install/ubuntu/15.10/templates/web/apache2/phpcgi.tpl mode change 100755 => 100644 install/ubuntu/15.10/templates/web/apache2/phpfcgid.stpl mode change 100755 => 100644 install/ubuntu/15.10/templates/web/apache2/phpfcgid.tpl diff --git a/bin/v-list-sys-services b/bin/v-list-sys-services index 93483baee..c67cd94f5 100755 --- a/bin/v-list-sys-services +++ b/bin/v-list-sys-services @@ -170,8 +170,8 @@ service=$DNS_SYSTEM if [ ! -z "$service" ] && [ "$service" != 'remote' ]; then 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 # Checking MAIL system @@ -265,8 +265,8 @@ if [ ! -z "$FIREWALL_SYSTEM" ] && [ "$FIREWALL_SYSTEM" != 'remote' ]; then 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 # Checking FIREWALL Fail2ban extention 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 96de57af7..8ee55ea3e --- 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%" 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 07ec38c98..aab9e0278 --- 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%" 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 da523c138..269c09711 --- 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 b95c1ee38..c24b12796 --- 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 c1c91e22e..a3928bf2e --- 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%" + 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 8f3ec012a..1d07b4ffd --- 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%" + 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 58c4baf90..aa807091a --- 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 21be2cdd7..fd603800b --- 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 20a580093..88cea0e64 --- 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 72e7d8d44..335b9f620 --- 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/8/templates/web/apache2/basedir.stpl b/install/debian/8/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e6999..580b8b931 --- 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%" 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 75daf0e10..dfce41921 --- 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%" 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 e884a95b9..a7faa7219 --- 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 073724ce0..3a2270156 --- 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 7a5d7787f..1762bc674 --- 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%" + 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 ab844dc74..296e25f37 --- 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%" + 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 aa5137308..731355bc1 --- 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 a05ff252d..c6796d29c --- 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 622495756..156c8a918 --- 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 5c1f16e20..a4c012690 --- 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/rhel/5/templates/web/httpd/basedir.stpl b/install/rhel/5/templates/web/httpd/basedir.stpl old mode 100755 new mode 100644 index d568276df..a16f75b00 --- 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%" 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 41b77334a..f611f3bcd --- 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%" 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 ffb536c54..cd4a8c88c --- 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 29de125f9..94288db02 --- 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 ee06dfce7..4e2b26a47 --- 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%" + 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 c3b839972..77d0d2ca0 --- 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%" + 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 b3e6488a6..591693a42 --- 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 952d2b493..114c6a52a --- 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 352d268b6..3bb82cca3 --- 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 9826c9464..f4e4f4724 --- 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/6/templates/web/httpd/basedir.stpl b/install/rhel/6/templates/web/httpd/basedir.stpl old mode 100755 new mode 100644 index d568276df..a16f75b00 --- 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%" 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 41b77334a..f611f3bcd --- 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%" 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 ffb536c54..cd4a8c88c --- 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 29de125f9..94288db02 --- 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 ee06dfce7..a9e2edb1f --- 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%" + 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 c3b839972..74acb2dae --- 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%" + 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 b3e6488a6..591693a42 --- 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 952d2b493..114c6a52a --- 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 352d268b6..3bb82cca3 --- 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 9826c9464..f4e4f4724 --- 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/7/templates/web/httpd/basedir.stpl b/install/rhel/7/templates/web/httpd/basedir.stpl old mode 100755 new mode 100644 index b90818f14..29ee67637 --- 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%" 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 53188221e..549208167 --- 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%" 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 1134f39a8..c63dd270b --- 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 78caf0b8c..558687619 --- 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 28ba49d59..79bf20876 --- 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%" + 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 3a9249701..893db7d8c --- 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%" + 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 924e869ec..1f7b3547a --- 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 bcefbfc4a..c0ae62082 --- 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 64bdb1b07..6d7e81df7 --- 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 d48da5eef..79d26209b --- 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/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 96de57af7..8ee55ea3e --- 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%" 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 07ec38c98..aab9e0278 --- 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%" 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 da523c138..269c09711 --- 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 b95c1ee38..c24b12796 --- 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 c1c91e22e..a3928bf2e --- 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%" + 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 8f3ec012a..869d601e3 --- 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%" + 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 58c4baf90..aa807091a --- 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 21be2cdd7..fd603800b --- 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 20a580093..88cea0e64 --- 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 72e7d8d44..335b9f620 --- 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.10/templates/web/apache2/basedir.stpl b/install/ubuntu/12.10/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 96de57af7..8ee55ea3e --- 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%" 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 07ec38c98..aab9e0278 --- 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%" 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 da523c138..269c09711 --- 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 b95c1ee38..c24b12796 --- 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 c1c91e22e..a3928bf2e --- 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%" + 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 8f3ec012a..869d601e3 --- 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%" + 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 58c4baf90..aa807091a --- 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 21be2cdd7..fd603800b --- 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 20a580093..88cea0e64 --- 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 72e7d8d44..335b9f620 --- 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/13.04/templates/web/apache2/basedir.stpl b/install/ubuntu/13.04/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 96de57af7..8ee55ea3e --- 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%" 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 07ec38c98..aab9e0278 --- 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%" 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 da523c138..269c09711 --- 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 b95c1ee38..c24b12796 --- 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 c1c91e22e..6cfd1bfb2 --- 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%" + 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 8f3ec012a..fcb9fcccc --- 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%" + 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 58c4baf90..aa807091a --- 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 21be2cdd7..fd603800b --- 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 20a580093..88cea0e64 --- 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 72e7d8d44..335b9f620 --- 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.10/templates/web/apache2/basedir.stpl b/install/ubuntu/13.10/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e6999..580b8b931 --- 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%" 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 75daf0e10..dfce41921 --- 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%" 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 e884a95b9..a7faa7219 --- 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 073724ce0..3a2270156 --- 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 7a5d7787f..1762bc674 --- 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%" + 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 ab844dc74..296e25f37 --- 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%" + 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 aa5137308..731355bc1 --- 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 a05ff252d..c6796d29c --- 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 622495756..156c8a918 --- 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 5c1f16e20..a4c012690 --- 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/14.04/templates/web/apache2/basedir.stpl b/install/ubuntu/14.04/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e6999..580b8b931 --- 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%" 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 75daf0e10..dfce41921 --- 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%" 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 e884a95b9..a7faa7219 --- 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 073724ce0..3a2270156 --- 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 7a5d7787f..1762bc674 --- 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%" + 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 ab844dc74..296e25f37 --- 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%" + 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 aa5137308..731355bc1 --- 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 a05ff252d..c6796d29c --- 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 622495756..156c8a918 --- 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 5c1f16e20..a4c012690 --- 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.10/templates/web/apache2/basedir.stpl b/install/ubuntu/14.10/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e6999..580b8b931 --- 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%" 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 75daf0e10..dfce41921 --- 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%" 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 e884a95b9..a7faa7219 --- 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 073724ce0..3a2270156 --- 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 7a5d7787f..1762bc674 --- 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%" + 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 ab844dc74..296e25f37 --- 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%" + 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 aa5137308..731355bc1 --- 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 a05ff252d..c6796d29c --- 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 622495756..156c8a918 --- 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 5c1f16e20..a4c012690 --- 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/15.04/templates/web/apache2/basedir.stpl b/install/ubuntu/15.04/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e6999..580b8b931 --- 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%" 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 75daf0e10..dfce41921 --- 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%" 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 e884a95b9..a7faa7219 --- 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 073724ce0..3a2270156 --- 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 7a5d7787f..1762bc674 --- 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%" + 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 ab844dc74..296e25f37 --- 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%" + 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 aa5137308..731355bc1 --- 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 a05ff252d..c6796d29c --- 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 622495756..156c8a918 --- 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 5c1f16e20..a4c012690 --- 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.10/templates/web/apache2/basedir.stpl b/install/ubuntu/15.10/templates/web/apache2/basedir.stpl old mode 100755 new mode 100644 index 3f71e6999..580b8b931 --- 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%" 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 75daf0e10..dfce41921 --- 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%" 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 e884a95b9..a7faa7219 --- 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 073724ce0..3a2270156 --- 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 7a5d7787f..1762bc674 --- 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%" + 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 ab844dc74..296e25f37 --- 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%" + 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 aa5137308..731355bc1 --- 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 a05ff252d..c6796d29c --- 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 622495756..156c8a918 --- 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 5c1f16e20..a4c012690 --- 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/vst-install-debian.sh b/install/vst-install-debian.sh index 9f27ef4a5..40be39ef6 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -644,7 +644,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 +655,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 diff --git a/install/vst-install-rhel.sh b/install/vst-install-rhel.sh index 593043fbb..058317f37 100755 --- a/install/vst-install-rhel.sh +++ b/install/vst-install-rhel.sh @@ -677,7 +677,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 +688,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 diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh index 8a17a3ba5..a04736103 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -636,7 +636,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 +647,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 diff --git a/src/deb/nginx/control b/src/deb/nginx/control index 708e501f9..568ca7055 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 6a1094e61..e97d4905c 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 d33f84677..14b541475 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 e600138cc..1455ce1f2 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 d055bd694..89206f171 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 7283dfdd2..bfdecd225 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 9741d75eb..448e63f44 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 5dcfd28b4..08d8aa8c7 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 38eae0b77..00156491a 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 June 27 2015 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 ca2dc49c4..67851cc80 100755 --- a/upd/add_notifications.sh +++ b/upd/add_notifications.sh @@ -5,6 +5,10 @@ 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 + /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/web/css/file_manager.css b/web/css/file_manager.css index 26accccad..bc9723c03 100644 --- a/web/css/file_manager.css +++ b/web/css/file_manager.css @@ -545,7 +545,7 @@ input[type="checkbox"] { } -@media (max-width: 1320px) { +@media (max-width: 1450px) { .menu div.button.mkfile, .menu div.button.mkdir { display: none; } .menu div.button.mkfile.small, @@ -553,14 +553,14 @@ input[type="checkbox"] { .listing li .filename-holder { max-width: 30%; } } -@media (max-width: 1270px) { +@media (max-width: 1320px) { .menu div.button.del { display: none; } .menu div.button.del.small { display: inline-block; } .listing li .filename-holder { max-width: 25%; } } -@media (max-width: 1220px) { +@media (max-width: 1290px) { .menu div.button { display: none; } .menu div.button.medium, .menu div.button.small { display: inline-block; } diff --git a/web/css/styles.min.css b/web/css/styles.min.css index caa548128..6821a2408 100644 --- a/web/css/styles.min.css +++ b/web/css/styles.min.css @@ -733,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; } @@ -1683,7 +1686,7 @@ body.mobile .l-unit-toolbar__col--right { .lang-ar .actions-panel__col a { font-size: 15px; font-weight: normal; - line-height: 29px; + line-height: 31px; } @@ -2967,8 +2970,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 { diff --git a/web/generate/ssl/index.php b/web/generate/ssl/index.php index 5ccc2f295..4cc7180dc 100644 --- a/web/generate/ssl/index.php +++ b/web/generate/ssl/index.php @@ -35,12 +35,12 @@ if (!isset($_POST['generate'])) { } // Check input -if (empty($_POST['v_domain'])) $errors[] = __('domain'); -if (empty($_POST['v_country'])) $errors[] = __('country'); -if (empty($_POST['v_state'])) $errors[] = __('domain'); -if (empty($_POST['v_locality'])) $errors[] = __('city'); -if (empty($_POST['v_org'])) $errors[] = __('organization'); -if (empty($_POST['v_email'])) $errors[] = __('email'); +if (empty($_POST['v_domain'])) $errors[] = __('Domain'); +if (empty($_POST['v_country'])) $errors[] = __('Country'); +if (empty($_POST['v_state'])) $errors[] = __('State'); +if (empty($_POST['v_locality'])) $errors[] = __('City'); +if (empty($_POST['v_org'])) $errors[] = __('Organization'); +if (empty($_POST['v_email'])) $errors[] = __('Email'); $v_domain = $_POST['v_domain']; $v_email = $_POST['v_email']; $v_country = $_POST['v_country']; @@ -72,7 +72,7 @@ $v_state = escapeshellarg($_POST['v_state']); $v_locality = escapeshellarg($_POST['v_locality']); $v_org = escapeshellarg($_POST['v_org']); -exec (VESTA_CMD."v-generate-ssl-cert ".$v_domain." ".$v_email." ".$v_country." ".$v_state." ".$v_locality." ".$v_org." IT json", $output, $return_var); +exec (VESTA_CMD."v-generate-ssl-cert ".$v_domain." ".$v_email." ".$v_country." ".$v_state." ".$v_locality." ".$v_org." IT '' json", $output, $return_var); // Revert to raw values $v_domain = $_POST['v_domain']; diff --git a/web/inc/i18n/ar.php b/web/inc/i18n/ar.php index 06ac28309..9434680d6 100644 --- a/web/inc/i18n/ar.php +++ b/web/inc/i18n/ar.php @@ -76,7 +76,7 @@ $LANG['ar'] = array( 'list accounts' => 'عرض الحسابات', 'add account' => 'إضافة حساب', 'open webmail' => 'فتح برنامج البريد من المتصفح ', - 'list fail2ban' => 'عرض قائمة المحظورين للدخول الخاطئ', + 'list fail2ban' => 'list fail2ban', // please make it as short as "list fail2ban" 'عرض قائمة المحظورين للدخول الخاطئ', 'open %s' => 'فتح %s', 'download' => 'تنزيل', 'restore' => 'استرجاع', @@ -90,6 +90,8 @@ $LANG['ar'] = array( 'reread IP' => 'إعادة قراءة IP', 'enable autoupdate' => 'تمكين التحديث التلقائي', 'disable autoupdate' => 'تعطيل التحديث التلقائي', + 'turn on notifications' => 'turn on notific.', + 'turn off notifications' => 'turn off notific.', 'Adding User' => 'جاري إضافة مستخدم', 'Editing User' => 'جاري تعديل المستخدم', diff --git a/web/inc/i18n/de.php b/web/inc/i18n/de.php index 73dbbcbb3..a8fb7f8b3 100644 --- a/web/inc/i18n/de.php +++ b/web/inc/i18n/de.php @@ -53,7 +53,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 +90,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', diff --git a/web/inc/i18n/el.php b/web/inc/i18n/el.php index 50c3fd967..b53e51f53 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', @@ -91,8 +91,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' => 'Επεξεργασία Χρήστη', diff --git a/web/inc/i18n/es.php b/web/inc/i18n/es.php index 95971e3f9..b17abd0e2 100644 --- a/web/inc/i18n/es.php +++ b/web/inc/i18n/es.php @@ -53,7 +53,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 +90,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', diff --git a/web/inc/i18n/fa.php b/web/inc/i18n/fa.php index 32b69138e..71c56dd0a 100644 --- a/web/inc/i18n/fa.php +++ b/web/inc/i18n/fa.php @@ -503,7 +503,7 @@ $LANG['fa'] = array( 'FileManager' => 'مدیریت پرونده', 'show: CPU / MEM / NET / DISK' => 'نمايش: شبكه / حاقظه / پردازنده / ديسك', - 'sort by' => 'مرتب سازی بر اساس', + 'sort by' => 'sort by', // please make it as short as "sort by" 'مرتب سازی بر اساس', 'Date' => 'تاریخ', 'Starred' => 'ستاره دار', 'Name' => 'نام', diff --git a/web/inc/i18n/fr.php b/web/inc/i18n/fr.php index 500280dff..e0586c633 100644 --- a/web/inc/i18n/fr.php +++ b/web/inc/i18n/fr.php @@ -53,7 +53,7 @@ $LANG['fr'] = array( 'Save' => 'Sauvegarde', 'Submit' => 'Envoyer', - 'toggle all' => 'sélectionner 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', @@ -90,8 +90,8 @@ $LANG['fr'] = array( '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' => 'Édition d\'un Utilisateur', @@ -497,7 +497,7 @@ $LANG['fr'] = array( 'Web Config Editor' => 'Web Config Editor', 'Template Manager' => 'Template Manager', 'Backup Migration Manager' => 'Backup Migration Manager', - 'FileManager' => 'Gestionnaire de Fichiers', + 'FileManager' => 'Fichiers', 'show: CPU / MEM / NET / DISK' => 'voir: CPU / MEM / NET / DISK', 'sort by' => 'classer par', @@ -505,15 +505,15 @@ $LANG['fr'] = array( 'Starred' => 'Favoris', 'Name' => 'Nom', - 'File Manager' => 'Gestionnaire de Fichiers', + 'File Manager' => 'Fichiers', 'type' => 'type', 'size' => 'taille', 'date' => 'date', 'name' => 'nom', 'Initializing' => 'Initialisation', 'UPLOAD' => 'CHARGER', - 'NEW FILE' => 'NOUVEAU FICHIER', - 'NEW DIR' => 'NOUVEAU RÉP.', + 'NEW FILE' => 'FICHIER', + 'NEW DIR' => 'RÉP.', 'DELETE' => 'SUPPR', 'RENAME' => 'RENOMMER', 'COPY' => 'COPIER', diff --git a/web/inc/i18n/hu.php b/web/inc/i18n/hu.php index 8cb4a1e7e..5ae967329 100644 --- a/web/inc/i18n/hu.php +++ b/web/inc/i18n/hu.php @@ -94,8 +94,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', diff --git a/web/inc/i18n/id.php b/web/inc/i18n/id.php index 1be00b33f..3fddedffc 100644 --- a/web/inc/i18n/id.php +++ b/web/inc/i18n/id.php @@ -93,8 +93,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', @@ -501,7 +501,7 @@ $LANG['id'] = array( 'FileManager' => 'FileManager', 'show: CPU / MEM / NET / DISK' => 'show: CPU / MEM / NET / DISK', - 'sort by' => 'sortir berdasarkan', + 'sort by' => 'sortir', 'Date' => 'Tanggal', 'Starred' => 'Bintangi', 'Name' => 'Nama', diff --git a/web/inc/i18n/nl.php b/web/inc/i18n/nl.php index 15e484227..cdf98d4e1 100644 --- a/web/inc/i18n/nl.php +++ b/web/inc/i18n/nl.php @@ -54,7 +54,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', diff --git a/web/inc/i18n/pt-BR.php b/web/inc/i18n/pt-BR.php index 0ae395dca..2cf00bf1d 100644 --- a/web/inc/i18n/pt-BR.php +++ b/web/inc/i18n/pt-BR.php @@ -498,7 +498,7 @@ $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', diff --git a/web/inc/i18n/pt.php b/web/inc/i18n/pt.php index 0201e6d1e..6b2dedc83 100644 --- a/web/inc/i18n/pt.php +++ b/web/inc/i18n/pt.php @@ -498,7 +498,7 @@ $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', diff --git a/web/inc/i18n/ro.php b/web/inc/i18n/ro.php index e10745177..b916a35e6 100644 --- a/web/inc/i18n/ro.php +++ b/web/inc/i18n/ro.php @@ -55,7 +55,7 @@ $LANG['ro'] = array( 'Save' => 'Salvează', 'Submit' => 'OK', - 'toggle all' => 'selectează toate', + 'toggle all' => 'toate', 'apply to selected' => 'aplică la selectat', 'rebuild' => 'reconstrui', 'rebuild web' => 'reconstrui WEB', diff --git a/web/inc/i18n/ru.php b/web/inc/i18n/ru.php index 31f7da0fa..fe22d4f98 100644 --- a/web/inc/i18n/ru.php +++ b/web/inc/i18n/ru.php @@ -92,8 +92,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' => 'Редактирование аккаунта', diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index c504307c0..04b49b7c8 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -518,7 +518,7 @@ $LANG['tw'] = array( 'every two minutes' => 'every two minutes', 'every' => 'every', 'Hour' => 'Hour', - 'Minute' => 'Minute' + 'Minute' => 'Minute', '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", 'Jan' => '1月', 'Feb' => '2月', From 0b58fefaee4792b7fbd7c0e5cd56bc74f0d8ee94 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 27 Jun 2016 14:46:59 +0300 Subject: [PATCH 133/229] wrong release date --- src/rpm/specs/vesta.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpm/specs/vesta.spec b/src/rpm/specs/vesta.spec index 00156491a..8a074f810 100644 --- a/src/rpm/specs/vesta.spec +++ b/src/rpm/specs/vesta.spec @@ -53,7 +53,7 @@ fi %config(noreplace) %{_vestadir}/web/css/uploadify.css %changelog -* Mon June 27 2015 Serghey Rodin - 0.9.8-16 +* Mon June 27 2016 Serghey Rodin - 0.9.8-16 - Full keyboard control - Cron Helper - LetsEncrypt Support cli-only From 0ce0083fb783dabd0df406c2c2fa711850b27cea Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 27 Jun 2016 15:05:36 +0300 Subject: [PATCH 134/229] wrong release date --- src/rpm/specs/vesta.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpm/specs/vesta.spec b/src/rpm/specs/vesta.spec index 8a074f810..34cb9c7ff 100644 --- a/src/rpm/specs/vesta.spec +++ b/src/rpm/specs/vesta.spec @@ -53,7 +53,7 @@ fi %config(noreplace) %{_vestadir}/web/css/uploadify.css %changelog -* Mon June 27 2016 Serghey Rodin - 0.9.8-16 +* Mon Jun 27 2016 Serghey Rodin - 0.9.8-16 - Full keyboard control - Cron Helper - LetsEncrypt Support cli-only From 59fd9555a4ecfe35c7726968a5b02067ec324ce7 Mon Sep 17 00:00:00 2001 From: Flat Date: Mon, 27 Jun 2016 21:21:12 +0900 Subject: [PATCH 135/229] Improve Japanese translation --- web/inc/i18n/ja.php | 152 ++++++++++++++++++++++---------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/web/inc/i18n/ja.php b/web/inc/i18n/ja.php index 84c00aa4b..1845b16a2 100644 --- a/web/inc/i18n/ja.php +++ b/web/inc/i18n/ja.php @@ -40,7 +40,7 @@ $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' => '全統計', @@ -206,10 +206,10 @@ $LANG['ja'] = array( 'SYS' => 'SYS', 'Domains' => 'ドメイン', 'Status' => '状態', - 'shared' => '共用', - 'dedicated' => '専用', + 'shared' => '共有', + 'dedicated' => '専有', 'Owner' => '所有者', - 'Users' => 'ユーザー', + 'Users' => '使用者', 'Load Average' => 'ロードアベレージ', 'Memory Usage' => 'メモリ使用量', 'HTTPD Usage' => 'HTTPD使用量', @@ -228,7 +228,7 @@ $LANG['ja'] = array( 'email antispam' => 'アンチスパム', 'database server' => 'データベースサーバー', 'ftp server' => 'FTPサーバー', - 'job scheduler' => 'ジョブ スケジューラ', + 'job scheduler' => 'ジョブスケジューラ', 'CPU' => 'CPU', 'Memory' => 'メモリ', 'Uptime' => '稼働時間', @@ -247,7 +247,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 +257,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 +265,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' => 'ネームサーバー', @@ -285,10 +285,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,7 +332,7 @@ $LANG['ja'] = array( 'stats password' => 'statsパスワード', 'ftp user password' => 'FTPユーザーパスワード', 'ftp user' => 'FTPユーザー', - 'Last 70 lines of %s.%s.log' => '%s.%s.log の最新70行', + 'Last 70 lines of %s.%s.log' => '%s.%s.log の最終70行', 'Download AccessLog' => 'AccessLogをダウンロード', 'Download ErrorLog' => 'ErrorLogをダウンロード', 'Country' => '国', @@ -377,7 +377,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 は正常に作成されました', @@ -435,11 +435,11 @@ $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' => "ドメイン名を一行ずつ入力してください すべてのドメインを除外するには*を使用してください", @@ -454,10 +454,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' => 'パスワードを忘れた場合', @@ -496,7 +496,7 @@ $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' => '日付', @@ -510,11 +510,11 @@ $LANG['ja'] = array( 'name' => '名前', 'Initializing' => '初期化中', 'UPLOAD' => 'アップロード', - 'NEW FILE' => '新規ファイル', - 'NEW DIR' => '新規ディレクトリ', + 'NEW FILE' => 'ファイルの作成', + 'NEW DIR' => 'ディレクトリの作成', 'DELETE' => '削除', 'RENAME' => '名前の変更', - 'RIGHTS' => 'RIGHTS', + 'RIGHTS' => '権限', 'COPY' => 'コピー', 'ARCHIVE' => 'アーカイブ', 'EXTRACT' => '展開', @@ -532,8 +532,8 @@ $LANG['ja'] = array( 'Close' => '閉じる', 'Copy' => 'コピー', 'Cancel' => 'キャンセル', - 'Rename' => '名前を変更', - 'Change Rights' => 'Change Rights', + 'Rename' => '名前の変更', + 'Change Rights' => '権限の変更', 'Delete' => '削除', 'Extract' => '展開', 'Create' => '作成', @@ -542,39 +542,39 @@ $LANG['ja'] = array( 'Are you sure you want to copy' => '次のファイルをコピーしてもよろしいですか', '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' => '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', + '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' => '新しい項目を追加する', '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 up through elements list' => 'Move up through elements list', - 'Move down through elements list' => 'Move down through elements list', + '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' => 'ファイルの作成', @@ -584,7 +584,7 @@ $LANG['ja'] = array( 'Copy' => 'コピー', 'Archive' => 'アーカイブ', 'Delete' => '削除', - 'Save File (in text editor)' => 'ファイルの保存(テキストエディタ上で)', + 'Save File (in text editor)' => 'ファイルを保存する(テキストエディタ上で)', 'Close Popup / Cancel' => 'ポップアップを閉じる / キャンセルする', 'Move Cursor Up' => 'カーソルを上に移動する', 'Move Cursor Dow' => 'カーソルを下に移動する', @@ -611,35 +611,35 @@ $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' => 'Minutes', - 'Hourly' => 'Hourly', - 'Daily' => 'Daily', - 'Weekly' => 'Weekly', - 'Monthly' => 'Monthly', - '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', - 'Hour' => 'Hour', - 'Minute' => 'Minute' + 'Minutes' => '分毎', + 'Hourly' => '時間毎', + 'Daily' => '日毎', + 'Weekly' => '週毎', + 'Monthly' => '月毎', + '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' => '毎', + 'Hour' => '時', + 'Minute' => '分' ); From fed6815c64b2fb5d89fd8fa4c6fe28404a6a6af2 Mon Sep 17 00:00:00 2001 From: Flat Date: Mon, 27 Jun 2016 21:29:11 +0900 Subject: [PATCH 136/229] Correct page title of /list/server/?disk and /list/server/?net --- web/list/server/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/list/server/index.php b/web/list/server/index.php index 7db575457..97af7f9d2 100644 --- a/web/list/server/index.php +++ b/web/list/server/index.php @@ -37,7 +37,7 @@ if (isset($_GET['mem'])) { // Disk info if (isset($_GET['disk'])) { - $TAB = 'MEMORY'; + $TAB = 'DISK'; include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_server_info.html'); exec (VESTA_CMD.'v-list-sys-disk-status', $output, $return_var); foreach($output as $file) { @@ -49,7 +49,7 @@ if (isset($_GET['disk'])) { // Network info if (isset($_GET['net'])) { - $TAB = 'MEMORY'; + $TAB = 'NETWORK'; include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_server_info.html'); exec (VESTA_CMD.'v-list-sys-network-status', $output, $return_var); foreach($output as $file) { From b787f1163556889b5a2c3140f769b6194aead94b Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 27 Jun 2016 19:41:07 +0300 Subject: [PATCH 137/229] css style fixes --- web/css/styles.min.css | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/web/css/styles.min.css b/web/css/styles.min.css index 6821a2408..2a4efc7d1 100644 --- a/web/css/styles.min.css +++ b/web/css/styles.min.css @@ -1073,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); @@ -1082,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; @@ -1651,6 +1651,10 @@ body.mobile .l-unit-toolbar__col--right { 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; @@ -2106,6 +2110,10 @@ body.mobile .l-unit-toolbar__col--right { background-position: -174px 560px; visibility: visible; } +.selected .l-icon-star { + filter: contrast(70%); + -webkit-filter: contrast(70%); +} .units.compact .l-icon-star { margin-top: -14px; From 5f4f05386f3d424428b24e508545e9e1c45a44a4 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 27 Jun 2016 19:50:36 +0300 Subject: [PATCH 138/229] delete old notifications --- src/rpm/conf/php-fpm.conf | 2 +- upd/add_notifications.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rpm/conf/php-fpm.conf b/src/rpm/conf/php-fpm.conf index bfdecd225..8a7d0bd56 100755 --- a/src/rpm/conf/php-fpm.conf +++ b/src/rpm/conf/php-fpm.conf @@ -498,4 +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" +php_admin_value[session.save_path] = /usr/local/vesta/data/sessions diff --git a/upd/add_notifications.sh b/upd/add_notifications.sh index 67851cc80..0798eee49 100755 --- a/upd/add_notifications.sh +++ b/upd/add_notifications.sh @@ -8,6 +8,8 @@ if [ ! -e '/usr/local/vesta/data/users/admin/notifications.conf' ]; then /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 From 27884265679dbabba3fb468a1ead9e0e25c4b810 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 27 Jun 2016 20:29:09 +0300 Subject: [PATCH 139/229] delete old notifications --- web/css/styles.min.css | 2 +- web/delete/notification/index.php | 1 - web/inc/main.php | 15 +++++++++++++++ web/templates/admin/panel.html | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/web/css/styles.min.css b/web/css/styles.min.css index 2a4efc7d1..b0674c767 100644 --- a/web/css/styles.min.css +++ b/web/css/styles.min.css @@ -813,7 +813,7 @@ input[type="checkbox"] { background-color: #c4da5e; } .l-profile__notifications.updates { - background-position: -202px -157px; + background-position: -202px -135px; } .notification-container { diff --git a/web/delete/notification/index.php b/web/delete/notification/index.php index fa3a14f10..0f9787124 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/inc/main.php b/web/inc/main.php index 51e3afbf2..4df0ece95 100644 --- a/web/inc/main.php +++ b/web/inc/main.php @@ -105,6 +105,21 @@ 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(dirname(__FILE__).'/../templates/admin/panel.html'); } else { diff --git a/web/templates/admin/panel.html b/web/templates/admin/panel.html index c26e050c3..fd5d145e5 100644 --- a/web/templates/admin/panel.html +++ b/web/templates/admin/panel.html @@ -23,7 +23,7 @@
- ">  + "> 
From 1bb57ecf63740e8ab1218d6ea4a8fa1a94a46df0 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 01:41:59 +0300 Subject: [PATCH 140/229] changed validator for dbhost --- func/main.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/func/main.sh b/func/main.sh index df4ff94a0..31b969e92 100644 --- a/func/main.sh +++ b/func/main.sh @@ -749,7 +749,7 @@ is_format_valid() { 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_domain_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" ;; From 29fc16495495628e633dd62225d5f1ac69fc814d Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 02:26:07 +0300 Subject: [PATCH 141/229] fix restart argument shifting --- bin/v-add-domain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-add-domain b/bin/v-add-domain index 3816c8115..49b105be7 100755 --- a/bin/v-add-domain +++ b/bin/v-add-domain @@ -53,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 From 17c20881e13155c6cfe5eef4c62f2cdfaa4beefb Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 02:46:10 +0300 Subject: [PATCH 142/229] autoupdates + fqdn workaround --- install/vst-install-debian.sh | 10 ++++++++++ install/vst-install-rhel.sh | 10 ++++++++++ install/vst-install-ubuntu.sh | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index 40be39ef6..dd12e94da 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -380,6 +380,13 @@ if [ -z "$servername" ]; then servername=$(hostname -f) fi +# Set FQND if it wasn't set +mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)' +mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}' +if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then + servername="$servername.example.com" +fi + # Set email if it wasn't set if [ -z "$email" ]; then email="admin@$servername" @@ -1182,6 +1189,9 @@ check_result $? "vesta start failed" # 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 058317f37..9679ddf92 100755 --- a/install/vst-install-rhel.sh +++ b/install/vst-install-rhel.sh @@ -380,6 +380,13 @@ if [ -z "$servername" ]; then servername=$(hostname -f) fi +# Set FQND if it wasn't set +mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)' +mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}' +if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then + servername="$servername.example.com" +fi + # Set email if it wasn't set if [ -z "$email" ]; then email="admin@$servername" @@ -1252,6 +1259,9 @@ check_result $? "vesta start failed" # 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 a04736103..1ea333210 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -365,6 +365,13 @@ if [ -z "$servername" ]; then servername=$(hostname -f) fi +# Set FQND if it wasn't set +mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)' +mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}' +if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then + servername="$servername.example.com" +fi + # Set email if it wasn't set if [ -z "$email" ]; then email="admin@$servername" @@ -1171,6 +1178,9 @@ check_result $? "vesta start failed" # Adding notifications $VESTA/upd/add_notifications.sh +# Adding cronjob for autoupdates +$VESTA/bin/v-add-cron-vesta-autoupdate + #----------------------------------------------------------# # Vesta Access Info # From 637fac7bfe13df8b8904885f4934ec18523a0fe5 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 13:49:17 +0300 Subject: [PATCH 143/229] session fix for new installers --- install/vst-install-debian.sh | 1 + install/vst-install-rhel.sh | 1 + install/vst-install-ubuntu.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index dd12e94da..e0bad0a53 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -1185,6 +1185,7 @@ 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 diff --git a/install/vst-install-rhel.sh b/install/vst-install-rhel.sh index 9679ddf92..b1ec720fe 100755 --- a/install/vst-install-rhel.sh +++ b/install/vst-install-rhel.sh @@ -1255,6 +1255,7 @@ 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 diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh index 1ea333210..6dba2c5b7 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -1174,6 +1174,7 @@ 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 From 859798cb34c5a337b74c1e7509609736ce1148e3 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 14:39:11 +0300 Subject: [PATCH 144/229] hotfixes for css and domain deletion --- func/domain.sh | 5 ++--- web/templates/header.html | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/func/domain.sh b/func/domain.sh index eda517a06..f345bcf71 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -273,9 +273,8 @@ del_web_config() { web_domains=$(grep DOMAIN $USER_DATA/web.conf |wc -l) if [ "$web_domains" -eq '0' ]; then - sed -i "/.*\/$user\/.*$WEB_SYSTEM.conf/d" /etc/$1/conf.d/vesta.conf - rm -f $HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf - rm -f $HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf + sed -i "/.*\/$user\/.*$1.conf/d" /etc/$1/conf.d/vesta.conf + rm -f $conf fi } diff --git a/web/templates/header.html b/web/templates/header.html index e3f20514d..3b462a046 100644 --- a/web/templates/header.html +++ b/web/templates/header.html @@ -9,7 +9,7 @@ - + From 155573ac8805eda702f5097459f5ceab9a540dda Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 14:55:59 +0300 Subject: [PATCH 145/229] fix for missing hostname --- install/vst-install-debian.sh | 9 +++++++-- install/vst-install-rhel.sh | 9 +++++++-- install/vst-install-ubuntu.sh | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index e0bad0a53..4e6b7aa23 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -380,11 +380,16 @@ if [ -z "$servername" ]; then servername=$(hostname -f) fi -# Set FQND if it wasn't set +# Set FQDN if it wasn't set mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)' mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}' if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then - servername="$servername.example.com" + 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 diff --git a/install/vst-install-rhel.sh b/install/vst-install-rhel.sh index b1ec720fe..5009ca0f6 100755 --- a/install/vst-install-rhel.sh +++ b/install/vst-install-rhel.sh @@ -380,11 +380,16 @@ if [ -z "$servername" ]; then servername=$(hostname -f) fi -# Set FQND if it wasn't set +# Set FQDN if it wasn't set mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)' mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}' if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then - servername="$servername.example.com" + 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 diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh index 6dba2c5b7..20d0814e7 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -365,11 +365,16 @@ if [ -z "$servername" ]; then servername=$(hostname -f) fi -# Set FQND if it wasn't set +# Set FQDN if it wasn't set mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)' mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}' if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then - servername="$servername.example.com" + 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 From 9aaa2aa032b6379dd24ebb1a335ae3a6ba59e7b7 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 15:07:37 +0300 Subject: [PATCH 146/229] proper delimiter for name servers --- web/edit/package/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/edit/package/index.php b/web/edit/package/index.php index e8ecaf686..e5cc707a1 100644 --- a/web/edit/package/index.php +++ b/web/edit/package/index.php @@ -45,7 +45,7 @@ $v_disk_quota = $data[$v_package]['DISK_QUOTA']; $v_bandwidth = $data[$v_package]['BANDWIDTH']; $v_shell = $data[$v_package]['SHELL']; $v_ns = $data[$v_package]['NS']; -$nameservers = explode(", ", $v_ns); +$nameservers = explode(",", $v_ns); $v_ns1 = $nameservers[0]; $v_ns2 = $nameservers[1]; $v_ns3 = $nameservers[2]; From 48cf929e22a30dec90b6ab6c7440657f10d60cc5 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 15:38:11 +0300 Subject: [PATCH 147/229] domain idn handler --- bin/v-add-dns-record | 5 +++++ bin/v-change-dns-record | 7 +++++-- bin/v-suspend-dns-record | 8 ++++++-- bin/v-unsuspend-dns-record | 8 ++++++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/bin/v-add-dns-record b/bin/v-add-dns-record index f522f77dc..113874d39 100755 --- a/bin/v-add-dns-record +++ b/bin/v-add-dns-record @@ -26,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 diff --git a/bin/v-change-dns-record b/bin/v-change-dns-record index 9f5dfb082..505a8a1fc 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 diff --git a/bin/v-suspend-dns-record b/bin/v-suspend-dns-record index 811965f9f..0e9afa377 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 diff --git a/bin/v-unsuspend-dns-record b/bin/v-unsuspend-dns-record index 2f27a5ae9..35b2d7b4d 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 From b9c29b20bda5ad04b1add4a62a1e608489cea963 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 16:18:17 +0300 Subject: [PATCH 148/229] fix for banlist deletion --- bin/v-list-firewall-ban | 2 +- web/templates/admin/list_firewall_banlist.html | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/v-list-firewall-ban b/bin/v-list-firewall-ban index 178a84900..62a081201 100755 --- a/bin/v-list-firewall-ban +++ b/bin/v-list-firewall-ban @@ -25,7 +25,7 @@ json_list() { eval $str echo -n ' "'$IP'": { "IP": "'$IP'", - "CHAIN": "'$COMMENT'", + "CHAIN": "'$CHAIN'", "TIME": "'$TIME'", "DATE": "'$DATE'" }' diff --git a/web/templates/admin/list_firewall_banlist.html b/web/templates/admin/list_firewall_banlist.html index 6bf83cab8..ae6f835d6 100644 --- a/web/templates/admin/list_firewall_banlist.html +++ b/web/templates/admin/list_firewall_banlist.html @@ -47,12 +47,13 @@ foreach ($data as $key => $value) { ++$i; list($ip,$chain) = explode(":",$key); + ?>
- +
@@ -61,7 +62,7 @@
- + @@ -82,7 +83,7 @@
 
-
+
From 047be8108c04abb8467bea9ab26fcbaaa429496b Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 16:54:56 +0300 Subject: [PATCH 149/229] fix for missing ip in install header --- install/vst-install-debian.sh | 2 +- install/vst-install-rhel.sh | 2 +- install/vst-install-ubuntu.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index 4e6b7aa23..e5e6af5f5 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -1132,7 +1132,7 @@ $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 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 diff --git a/install/vst-install-rhel.sh b/install/vst-install-rhel.sh index 5009ca0f6..090c20c9e 100755 --- a/install/vst-install-rhel.sh +++ b/install/vst-install-rhel.sh @@ -1202,7 +1202,7 @@ $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 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 diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh index 20d0814e7..c50a4a43b 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -1121,7 +1121,7 @@ $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 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 From cc4e0531486d663f7cc562a32510e99c6c0e130d Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 17:47:49 +0300 Subject: [PATCH 150/229] config parser fix --- bin/v-restore-user | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/v-restore-user b/bin/v-restore-user index 1c5de3652..4ea77af91 100755 --- a/bin/v-restore-user +++ b/bin/v-restore-user @@ -314,7 +314,7 @@ if [ "$dns" != 'no' ] && [ ! -z "$DNS_SYSTEM" ]; then # Creating dns domain restore list backup_domains=$(tar -tf $BACKUP/$backup |grep "^./dns") - backup_domains=$(echo "$backup_domains" |grep domain_data.tar.gz) + 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" @@ -394,7 +394,7 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then # Creating mail domain restore list backup_domains=$(tar -tf $BACKUP/$backup |grep "^./mail") - backup_domains=$(echo "$backup_domains" |grep domain_data.tar.gz) + 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" From 82c1c09f6d03ee4d060828e313666100aad78456 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 28 Jun 2016 18:49:05 +0300 Subject: [PATCH 151/229] cidr ip format validator --- func/main.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/func/main.sh b/func/main.sh index 31b969e92..b6c408bb4 100644 --- a/func/main.sh +++ b/func/main.sh @@ -502,9 +502,18 @@ is_alias_format_valid() { 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])' - if ! [[ $1 =~ ^$ip_regex\.$ip_regex\.$ip_regex\.$ip_regex$ ]]; then + 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 } # Proxy extention format validator From 7a5c63f09291d24e28063ddfc22e53ba49b8b4a5 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Tue, 28 Jun 2016 13:32:06 -0400 Subject: [PATCH 152/229] Update tw.php --- web/inc/i18n/tw.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index 04b49b7c8..5362005ad 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -2,10 +2,10 @@ /** * Vesta language file * This language file is translate by - * Clark’s Computer Knowledge Journal (http://www.clark-chen.com) + * Clark's Computer Knowledge Journal (https://www.clark-chen.com) + * Clark's Hosting Service (https://host.clark-chen.com) * Clark Chen (clark@clark-chen.com) * Github - https://github.com/ttcttctw/Vesta-Control-Panel-Traditional-Chinese-Translation/blob/master/tw.php - * VestaCP Forum - https://forum.vestacp.com/viewtopic.php?f=16&t=8480 */ $LANG['tw'] = array( 'Packages' => '方案設定', @@ -347,6 +347,8 @@ $LANG['tw'] = array( 'ftp user password' => 'FTP使用者帳號密碼', 'ftp user' => 'FTP使用者', 'Last 70 lines of %s.%s.log' => '最後70行的 %s.%s.記錄', + 'AccessLog' => '存取記錄', + 'ErrorLog' => '錯誤紀錄', 'Download AccessLog' => '下載存取記錄', 'Download ErrorLog' => '下載錯誤記錄', 'Country' => '國家', @@ -556,6 +558,7 @@ $LANG['tw'] = array( 'name' => '名稱', 'Initializing' => '正在初始化', 'UPLOAD' => '上傳', + 'RIGHTS' => '權限', 'NEW FILE' => '新增檔案', 'NEW DIR' => '新增資料夾', 'DELETE' => '刪除', @@ -595,6 +598,16 @@ $LANG['tw'] = array( 'Add New object' => '新增', 'Save Form' => '儲存設定', 'Cancel saving form' => '不要儲存設定', + 'Change Rights' => '修改權限', + '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' => '所有人可執行', 'Go to USER list' => '回到使用者列表', 'Go to WEB list' => '回到網站列表', 'Go to DNS list' => '回到DNS列表', From dbb59ca17c477934ba69251f5b1f48a11972f623 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Tue, 28 Jun 2016 23:44:32 -0400 Subject: [PATCH 153/229] Update tw.php --- web/inc/i18n/tw.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index 5362005ad..ca3b1a5ac 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -346,7 +346,7 @@ $LANG['tw'] = array( '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' => '下載存取記錄', @@ -619,7 +619,9 @@ $LANG['tw'] = array( 'Display/Close shortcuts' => '顯示/關閉 快捷鍵列表', 'Move backward through top menu' => '在頂置選單中向左移動', 'Move forward through top menu' => '在頂置選單中向右移動', - 'Enter focused element' => '進去選擇的選項', + 'Enter focused element' => '進入選擇的選項', + 'Move up through elements list' => '往上查看列表', + 'Move down through elements list' => '往下查看列表', 'Upload' => '上傳', 'New File' => '新增檔案', 'New Folder' => '新增資料夾', From cf4ce7dcc0bf1dfdb80ac428d4f320064cde0567 Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Tue, 28 Jun 2016 23:45:09 -0400 Subject: [PATCH 154/229] Update tw.php --- web/inc/i18n/tw.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index ca3b1a5ac..83d429145 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -346,7 +346,7 @@ $LANG['tw'] = array( 'stats password' => '統計密碼', 'ftp user password' => 'FTP使用者帳號密碼', 'ftp user' => 'FTP使用者', - 'Last 70 lines of %s.%s.log' => ' %s.%s.log 的最後70行', + 'Last 70 lines of %s.%s.log' => '%s.%s.log 的最後70行', 'AccessLog' => '存取記錄', 'ErrorLog' => '錯誤紀錄', 'Download AccessLog' => '下載存取記錄', From 0902b1c58d0181cf74edc7a8e801e0d387c58b86 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Wed, 29 Jun 2016 12:22:49 +0300 Subject: [PATCH 155/229] fix missing local ip --- bin/v-add-web-domain-alias | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/v-add-web-domain-alias b/bin/v-add-web-domain-alias index ee6b94e34..59e077ca5 100755 --- a/bin/v-add-web-domain-alias +++ b/bin/v-add-web-domain-alias @@ -51,6 +51,7 @@ is_package_full 'WEB_ALIASES' get_domain_values 'web' # Preparing domain values for the template substitution +local_ip=$(get_real_ip $IP) if [ -z "$ALIAS" ]; then ALIAS="$dom_alias" else From 9f827347ad32cf12e2900aeb050f5d0077293828 Mon Sep 17 00:00:00 2001 From: Flat Date: Thu, 30 Jun 2016 01:37:47 +0900 Subject: [PATCH 156/229] Fix quotes in bin/v-update-user-stats --- bin/v-update-user-stats | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/v-update-user-stats b/bin/v-update-user-stats index f7e4900eb..f6b5ff566 100755 --- a/bin/v-update-user-stats +++ b/bin/v-update-user-stats @@ -75,8 +75,8 @@ for user in $user_list; do # Compiling report string 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 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'" @@ -130,7 +130,7 @@ 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_DB='$TOTAL_U_DISK_DB' BANDWIDTH='0'" From ff05f9cca868d0e8d0d2cec12eb223bed14f91a2 Mon Sep 17 00:00:00 2001 From: Flat Date: Thu, 30 Jun 2016 02:50:17 +0900 Subject: [PATCH 157/229] Prevent .units from hiding behind .header --- web/css/styles.min.css | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/web/css/styles.min.css b/web/css/styles.min.css index 164fb0cf4..72d8a5d65 100644 --- a/web/css/styles.min.css +++ b/web/css/styles.min.css @@ -1338,7 +1338,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; } @@ -2878,12 +2878,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 { @@ -3281,4 +3279,4 @@ form#vstobjects.suspended { .helper-container { display: none; } -} \ No newline at end of file +} From 4208cc699d9cac5773619b37f8e113e8b9e0167e Mon Sep 17 00:00:00 2001 From: Clark Chen Date: Wed, 29 Jun 2016 17:31:05 -0400 Subject: [PATCH 158/229] Update v-add-letsencrypt-domain --- bin/v-add-letsencrypt-domain | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-add-letsencrypt-domain b/bin/v-add-letsencrypt-domain index 368511f96..f1186f46e 100755 --- a/bin/v-add-letsencrypt-domain +++ b/bin/v-add-letsencrypt-domain @@ -30,7 +30,7 @@ source $VESTA/conf/vesta.conf # Verifications # #----------------------------------------------------------# -check_args '2' "$#" 'USER DOMAIN [RESTART]' +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' From 62fc1b33e25088bedbd5ab5851b39305d8529148 Mon Sep 17 00:00:00 2001 From: slmcncb Date: Thu, 30 Jun 2016 00:35:18 +0300 Subject: [PATCH 159/229] Fix licence to license --- web/templates/admin/edit_server.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/templates/admin/edit_server.html b/web/templates/admin/edit_server.html index 34c2d6428..20e494537 100644 --- a/web/templates/admin/edit_server.html +++ b/web/templates/admin/edit_server.html @@ -741,7 +741,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').':
  • From 13cfbabdd7d950eab14dd9b9c81b72cbb90be52f Mon Sep 17 00:00:00 2001 From: slmcncb Date: Thu, 30 Jun 2016 00:37:28 +0300 Subject: [PATCH 160/229] Update tr.php --- web/inc/i18n/tr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/inc/i18n/tr.php b/web/inc/i18n/tr.php index 23b0d6161..86e6238ba 100644 --- a/web/inc/i18n/tr.php +++ b/web/inc/i18n/tr.php @@ -639,7 +639,7 @@ $LANG['tr'] = array( 'every two hours' => 'her iki saatte bir', 'every minute' => 'her dakika', 'every two minutes' => 'her iki dakikada bir', - 'every' => 'sürekli', + 'every' => 'her', 'Hour' => 'Saat', 'Minute' => 'Dakika' From aabbcaeb21c4ee0af2a869dd611330cc2f9bce01 Mon Sep 17 00:00:00 2001 From: insound Date: Thu, 30 Jun 2016 13:42:11 +0400 Subject: [PATCH 161/229] Fix rebulid for web-interface Fixed this bug https://bugs.vestacp.com/issues/273 --- bin/v-rebuild-web-domains | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/v-rebuild-web-domains b/bin/v-rebuild-web-domains index d3277fb9a..f3d35dd88 100755 --- a/bin/v-rebuild-web-domains +++ b/bin/v-rebuild-web-domains @@ -50,7 +50,7 @@ if [ ! -z "$WEB_BACKEND" ]; then prepare_web_backend rm -f $pool/$backend_type.conf else - for domain in $(v-list-web-domains $user plain |cut -f 1); do + for domain in $($BIN/v-list-web-domains $user plain |cut -f 1); do prepare_web_backend rm -f $pool/$backend_type.conf done @@ -58,7 +58,7 @@ if [ ! -z "$WEB_BACKEND" ]; then fi # Starting rebuild loop for each web domain -for domain in $(v-list-web-domains $user plain |cut -f 1); do +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 From a0a003423db78c7673d4eec50ee6bd7f2d69c542 Mon Sep 17 00:00:00 2001 From: Metallizzer Date: Thu, 30 Jun 2016 18:29:32 +0700 Subject: [PATCH 162/229] Parameter %domain% may contain non-ASCII characters, use the %domain idn% instead, when specifying sendmail Return-Path --- install/debian/7/templates/web/apache2/basedir.stpl | 2 +- install/debian/7/templates/web/apache2/basedir.tpl | 2 +- install/debian/7/templates/web/apache2/hosting.stpl | 2 +- install/debian/7/templates/web/apache2/hosting.tpl | 2 +- install/debian/8/templates/web/apache2/basedir.stpl | 2 +- install/debian/8/templates/web/apache2/basedir.tpl | 2 +- install/debian/8/templates/web/apache2/hosting.stpl | 2 +- install/debian/8/templates/web/apache2/hosting.tpl | 2 +- install/rhel/5/templates/web/httpd/basedir.stpl | 2 +- install/rhel/5/templates/web/httpd/basedir.tpl | 2 +- install/rhel/5/templates/web/httpd/hosting.stpl | 2 +- install/rhel/5/templates/web/httpd/hosting.tpl | 2 +- install/rhel/6/templates/web/httpd/basedir.stpl | 2 +- install/rhel/6/templates/web/httpd/basedir.tpl | 2 +- install/rhel/6/templates/web/httpd/hosting.stpl | 2 +- install/rhel/6/templates/web/httpd/hosting.tpl | 2 +- install/rhel/7/templates/web/httpd/basedir.stpl | 2 +- install/rhel/7/templates/web/httpd/basedir.tpl | 2 +- install/rhel/7/templates/web/httpd/hosting.stpl | 2 +- install/rhel/7/templates/web/httpd/hosting.tpl | 2 +- install/ubuntu/12.04/templates/web/apache2/basedir.stpl | 2 +- install/ubuntu/12.04/templates/web/apache2/basedir.tpl | 2 +- install/ubuntu/12.04/templates/web/apache2/hosting.stpl | 2 +- install/ubuntu/12.04/templates/web/apache2/hosting.tpl | 2 +- install/ubuntu/12.10/templates/web/apache2/basedir.stpl | 2 +- install/ubuntu/12.10/templates/web/apache2/basedir.tpl | 2 +- install/ubuntu/12.10/templates/web/apache2/hosting.stpl | 2 +- install/ubuntu/12.10/templates/web/apache2/hosting.tpl | 2 +- install/ubuntu/13.04/templates/web/apache2/basedir.stpl | 2 +- install/ubuntu/13.04/templates/web/apache2/basedir.tpl | 2 +- install/ubuntu/13.04/templates/web/apache2/hosting.stpl | 2 +- install/ubuntu/13.04/templates/web/apache2/hosting.tpl | 2 +- install/ubuntu/13.10/templates/web/apache2/basedir.stpl | 2 +- install/ubuntu/13.10/templates/web/apache2/basedir.tpl | 2 +- install/ubuntu/13.10/templates/web/apache2/hosting.stpl | 2 +- install/ubuntu/13.10/templates/web/apache2/hosting.tpl | 2 +- install/ubuntu/14.04/templates/web/apache2/basedir.stpl | 2 +- install/ubuntu/14.04/templates/web/apache2/basedir.tpl | 2 +- install/ubuntu/14.04/templates/web/apache2/hosting.stpl | 2 +- install/ubuntu/14.04/templates/web/apache2/hosting.tpl | 2 +- install/ubuntu/14.10/templates/web/apache2/basedir.stpl | 2 +- install/ubuntu/14.10/templates/web/apache2/basedir.tpl | 2 +- install/ubuntu/14.10/templates/web/apache2/hosting.stpl | 2 +- install/ubuntu/14.10/templates/web/apache2/hosting.tpl | 2 +- install/ubuntu/15.04/templates/web/apache2/basedir.stpl | 2 +- install/ubuntu/15.04/templates/web/apache2/basedir.tpl | 2 +- install/ubuntu/15.04/templates/web/apache2/hosting.stpl | 2 +- install/ubuntu/15.04/templates/web/apache2/hosting.tpl | 2 +- install/ubuntu/15.10/templates/web/apache2/basedir.stpl | 2 +- install/ubuntu/15.10/templates/web/apache2/basedir.tpl | 2 +- install/ubuntu/15.10/templates/web/apache2/hosting.stpl | 2 +- install/ubuntu/15.10/templates/web/apache2/hosting.tpl | 2 +- 52 files changed, 52 insertions(+), 52 deletions(-) diff --git a/install/debian/7/templates/web/apache2/basedir.stpl b/install/debian/7/templates/web/apache2/basedir.stpl index 8ee55ea3e..dda3aa760 100644 --- a/install/debian/7/templates/web/apache2/basedir.stpl +++ b/install/debian/7/templates/web/apache2/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index aab9e0278..9449bc447 100644 --- a/install/debian/7/templates/web/apache2/basedir.tpl +++ b/install/debian/7/templates/web/apache2/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/debian/7/templates/web/apache2/hosting.stpl index a3928bf2e..627325e06 100644 --- a/install/debian/7/templates/web/apache2/hosting.stpl +++ b/install/debian/7/templates/web/apache2/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/debian/7/templates/web/apache2/hosting.tpl b/install/debian/7/templates/web/apache2/hosting.tpl index 1d07b4ffd..0bdd6ea68 100644 --- a/install/debian/7/templates/web/apache2/hosting.tpl +++ b/install/debian/7/templates/web/apache2/hosting.tpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/debian/8/templates/web/apache2/basedir.stpl b/install/debian/8/templates/web/apache2/basedir.stpl index 580b8b931..d978d4c43 100644 --- a/install/debian/8/templates/web/apache2/basedir.stpl +++ b/install/debian/8/templates/web/apache2/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index dfce41921..96c94a1bd 100644 --- a/install/debian/8/templates/web/apache2/basedir.tpl +++ b/install/debian/8/templates/web/apache2/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/debian/8/templates/web/apache2/hosting.stpl index 1762bc674..8892072b1 100644 --- a/install/debian/8/templates/web/apache2/hosting.stpl +++ b/install/debian/8/templates/web/apache2/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/debian/8/templates/web/apache2/hosting.tpl b/install/debian/8/templates/web/apache2/hosting.tpl index 296e25f37..1eb269103 100644 --- a/install/debian/8/templates/web/apache2/hosting.tpl +++ b/install/debian/8/templates/web/apache2/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/rhel/5/templates/web/httpd/basedir.stpl b/install/rhel/5/templates/web/httpd/basedir.stpl index a16f75b00..4ced9f381 100644 --- a/install/rhel/5/templates/web/httpd/basedir.stpl +++ b/install/rhel/5/templates/web/httpd/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index f611f3bcd..566c9884c 100644 --- a/install/rhel/5/templates/web/httpd/basedir.tpl +++ b/install/rhel/5/templates/web/httpd/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/rhel/5/templates/web/httpd/hosting.stpl index 4e2b26a47..f94ba1867 100644 --- a/install/rhel/5/templates/web/httpd/hosting.stpl +++ b/install/rhel/5/templates/web/httpd/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/rhel/5/templates/web/httpd/hosting.tpl b/install/rhel/5/templates/web/httpd/hosting.tpl index 77d0d2ca0..1d3dd354b 100644 --- a/install/rhel/5/templates/web/httpd/hosting.tpl +++ b/install/rhel/5/templates/web/httpd/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/rhel/6/templates/web/httpd/basedir.stpl b/install/rhel/6/templates/web/httpd/basedir.stpl index a16f75b00..4ced9f381 100644 --- a/install/rhel/6/templates/web/httpd/basedir.stpl +++ b/install/rhel/6/templates/web/httpd/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index f611f3bcd..566c9884c 100644 --- a/install/rhel/6/templates/web/httpd/basedir.tpl +++ b/install/rhel/6/templates/web/httpd/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/rhel/6/templates/web/httpd/hosting.stpl index a9e2edb1f..f1c1c1111 100644 --- a/install/rhel/6/templates/web/httpd/hosting.stpl +++ b/install/rhel/6/templates/web/httpd/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/rhel/6/templates/web/httpd/hosting.tpl b/install/rhel/6/templates/web/httpd/hosting.tpl index 74acb2dae..65bf20fd3 100644 --- a/install/rhel/6/templates/web/httpd/hosting.tpl +++ b/install/rhel/6/templates/web/httpd/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/rhel/7/templates/web/httpd/basedir.stpl b/install/rhel/7/templates/web/httpd/basedir.stpl index 29ee67637..952215394 100644 --- a/install/rhel/7/templates/web/httpd/basedir.stpl +++ b/install/rhel/7/templates/web/httpd/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index 549208167..e1f86c704 100644 --- a/install/rhel/7/templates/web/httpd/basedir.tpl +++ b/install/rhel/7/templates/web/httpd/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/rhel/7/templates/web/httpd/hosting.stpl index 79bf20876..673c9c017 100644 --- a/install/rhel/7/templates/web/httpd/hosting.stpl +++ b/install/rhel/7/templates/web/httpd/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/rhel/7/templates/web/httpd/hosting.tpl b/install/rhel/7/templates/web/httpd/hosting.tpl index 893db7d8c..25f8e3bf9 100644 --- a/install/rhel/7/templates/web/httpd/hosting.tpl +++ b/install/rhel/7/templates/web/httpd/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/ubuntu/12.04/templates/web/apache2/basedir.stpl b/install/ubuntu/12.04/templates/web/apache2/basedir.stpl index 8ee55ea3e..dda3aa760 100644 --- a/install/ubuntu/12.04/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/12.04/templates/web/apache2/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index aab9e0278..9449bc447 100644 --- a/install/ubuntu/12.04/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/12.04/templates/web/apache2/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/ubuntu/12.04/templates/web/apache2/hosting.stpl index a3928bf2e..627325e06 100644 --- a/install/ubuntu/12.04/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/12.04/templates/web/apache2/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/ubuntu/12.04/templates/web/apache2/hosting.tpl b/install/ubuntu/12.04/templates/web/apache2/hosting.tpl index 869d601e3..3e30d737b 100644 --- a/install/ubuntu/12.04/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/12.04/templates/web/apache2/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/ubuntu/12.10/templates/web/apache2/basedir.stpl b/install/ubuntu/12.10/templates/web/apache2/basedir.stpl index 8ee55ea3e..dda3aa760 100644 --- a/install/ubuntu/12.10/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/12.10/templates/web/apache2/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index aab9e0278..9449bc447 100644 --- a/install/ubuntu/12.10/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/12.10/templates/web/apache2/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/ubuntu/12.10/templates/web/apache2/hosting.stpl index a3928bf2e..627325e06 100644 --- a/install/ubuntu/12.10/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/12.10/templates/web/apache2/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/ubuntu/12.10/templates/web/apache2/hosting.tpl b/install/ubuntu/12.10/templates/web/apache2/hosting.tpl index 869d601e3..3e30d737b 100644 --- a/install/ubuntu/12.10/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/12.10/templates/web/apache2/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/ubuntu/13.04/templates/web/apache2/basedir.stpl b/install/ubuntu/13.04/templates/web/apache2/basedir.stpl index 8ee55ea3e..dda3aa760 100644 --- a/install/ubuntu/13.04/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/13.04/templates/web/apache2/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index aab9e0278..9449bc447 100644 --- a/install/ubuntu/13.04/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/13.04/templates/web/apache2/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/ubuntu/13.04/templates/web/apache2/hosting.stpl index 6cfd1bfb2..ce0763ae8 100644 --- a/install/ubuntu/13.04/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/13.04/templates/web/apache2/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/ubuntu/13.04/templates/web/apache2/hosting.tpl b/install/ubuntu/13.04/templates/web/apache2/hosting.tpl index fcb9fcccc..f3491a5fe 100644 --- a/install/ubuntu/13.04/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/13.04/templates/web/apache2/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/ubuntu/13.10/templates/web/apache2/basedir.stpl b/install/ubuntu/13.10/templates/web/apache2/basedir.stpl index 580b8b931..d978d4c43 100644 --- a/install/ubuntu/13.10/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/13.10/templates/web/apache2/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index dfce41921..96c94a1bd 100644 --- a/install/ubuntu/13.10/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/13.10/templates/web/apache2/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/ubuntu/13.10/templates/web/apache2/hosting.stpl index 1762bc674..8892072b1 100644 --- a/install/ubuntu/13.10/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/13.10/templates/web/apache2/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/ubuntu/13.10/templates/web/apache2/hosting.tpl b/install/ubuntu/13.10/templates/web/apache2/hosting.tpl index 296e25f37..1eb269103 100644 --- a/install/ubuntu/13.10/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/13.10/templates/web/apache2/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/ubuntu/14.04/templates/web/apache2/basedir.stpl b/install/ubuntu/14.04/templates/web/apache2/basedir.stpl index 580b8b931..d978d4c43 100644 --- a/install/ubuntu/14.04/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/14.04/templates/web/apache2/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index dfce41921..96c94a1bd 100644 --- a/install/ubuntu/14.04/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/14.04/templates/web/apache2/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/ubuntu/14.04/templates/web/apache2/hosting.stpl index 1762bc674..8892072b1 100644 --- a/install/ubuntu/14.04/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/14.04/templates/web/apache2/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/ubuntu/14.04/templates/web/apache2/hosting.tpl b/install/ubuntu/14.04/templates/web/apache2/hosting.tpl index 296e25f37..1eb269103 100644 --- a/install/ubuntu/14.04/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/14.04/templates/web/apache2/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/ubuntu/14.10/templates/web/apache2/basedir.stpl b/install/ubuntu/14.10/templates/web/apache2/basedir.stpl index 580b8b931..d978d4c43 100644 --- a/install/ubuntu/14.10/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/14.10/templates/web/apache2/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index dfce41921..96c94a1bd 100644 --- a/install/ubuntu/14.10/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/14.10/templates/web/apache2/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/ubuntu/14.10/templates/web/apache2/hosting.stpl index 1762bc674..8892072b1 100644 --- a/install/ubuntu/14.10/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/14.10/templates/web/apache2/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/ubuntu/14.10/templates/web/apache2/hosting.tpl b/install/ubuntu/14.10/templates/web/apache2/hosting.tpl index 296e25f37..1eb269103 100644 --- a/install/ubuntu/14.10/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/14.10/templates/web/apache2/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/ubuntu/15.04/templates/web/apache2/basedir.stpl b/install/ubuntu/15.04/templates/web/apache2/basedir.stpl index 580b8b931..d978d4c43 100644 --- a/install/ubuntu/15.04/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/15.04/templates/web/apache2/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index dfce41921..96c94a1bd 100644 --- a/install/ubuntu/15.04/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/15.04/templates/web/apache2/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/ubuntu/15.04/templates/web/apache2/hosting.stpl index 1762bc674..8892072b1 100644 --- a/install/ubuntu/15.04/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/15.04/templates/web/apache2/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/ubuntu/15.04/templates/web/apache2/hosting.tpl b/install/ubuntu/15.04/templates/web/apache2/hosting.tpl index 296e25f37..1eb269103 100644 --- a/install/ubuntu/15.04/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/15.04/templates/web/apache2/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 diff --git a/install/ubuntu/15.10/templates/web/apache2/basedir.stpl b/install/ubuntu/15.10/templates/web/apache2/basedir.stpl index 580b8b931..d978d4c43 100644 --- a/install/ubuntu/15.10/templates/web/apache2/basedir.stpl +++ b/install/ubuntu/15.10/templates/web/apache2/basedir.stpl @@ -18,7 +18,7 @@ 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%" + 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 index dfce41921..96c94a1bd 100644 --- a/install/ubuntu/15.10/templates/web/apache2/basedir.tpl +++ b/install/ubuntu/15.10/templates/web/apache2/basedir.tpl @@ -17,7 +17,7 @@ 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%" + 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/hosting.stpl b/install/ubuntu/15.10/templates/web/apache2/hosting.stpl index 1762bc674..8892072b1 100644 --- a/install/ubuntu/15.10/templates/web/apache2/hosting.stpl +++ b/install/ubuntu/15.10/templates/web/apache2/hosting.stpl @@ -21,7 +21,7 @@ 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%" + 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 diff --git a/install/ubuntu/15.10/templates/web/apache2/hosting.tpl b/install/ubuntu/15.10/templates/web/apache2/hosting.tpl index 296e25f37..1eb269103 100644 --- a/install/ubuntu/15.10/templates/web/apache2/hosting.tpl +++ b/install/ubuntu/15.10/templates/web/apache2/hosting.tpl @@ -20,7 +20,7 @@ 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%" + 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 From 558643dfa5e8bfd193c6bcf19dbdea71dd35abdb Mon Sep 17 00:00:00 2001 From: Flat Date: Thu, 30 Jun 2016 23:12:23 +0900 Subject: [PATCH 163/229] Fix XSS in Password Reset --- web/templates/reset_2.html | 2 +- web/templates/reset_3.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/templates/reset_2.html b/web/templates/reset_2.html index d4b62a7c7..58c3b94fe 100644 --- a/web/templates/reset_2.html +++ b/web/templates/reset_2.html @@ -21,7 +21,7 @@ - + diff --git a/web/templates/reset_3.html b/web/templates/reset_3.html index 95b31df0a..0cc54bda2 100644 --- a/web/templates/reset_3.html +++ b/web/templates/reset_3.html @@ -13,8 +13,8 @@ - - + + From ea30e9f3c38a30365468a2834eebce4971305284 Mon Sep 17 00:00:00 2001 From: Ekrem KAYA Date: Thu, 30 Jun 2016 18:55:10 +0300 Subject: [PATCH 164/229] Update styles.min.css --- web/css/styles.min.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/css/styles.min.css b/web/css/styles.min.css index 72d8a5d65..d0d79f1e9 100644 --- a/web/css/styles.min.css +++ b/web/css/styles.min.css @@ -1173,8 +1173,12 @@ 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; */ From 40b5aac821abc9b488de6f1a0ad9426da032e324 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 30 Jun 2016 21:12:25 +0300 Subject: [PATCH 165/229] Cron fix from Diman --- web/css/styles.min.css | 4 +- web/js/app.js | 641 +++++++++++++++++++++++++++++ web/templates/admin/add_cron.html | 21 +- web/templates/admin/edit_cron.html | 35 +- web/templates/footer.html | 593 +------------------------- web/templates/header.html | 54 --- 6 files changed, 656 insertions(+), 692 deletions(-) diff --git a/web/css/styles.min.css b/web/css/styles.min.css index 72d8a5d65..4e03b379d 100644 --- a/web/css/styles.min.css +++ b/web/css/styles.min.css @@ -1175,6 +1175,7 @@ div.l-content > div.l-separator:nth-of-type(4) { .l-sort-toolbar td:nth-of-type(2) { /* /// padding-right: 60px;*/ + padding-right: 20px; } .l-sort-toolbar td:last-of-type { /* /// padding-left: 40px; */ @@ -3246,6 +3247,7 @@ form#vstobjects.suspended { width: auto; background-color: #55C9C0; border: 1px solid #55C9C0; + text-transform: capitalize; } .cron-helper-tabs .button:hover { background-color: #5BD8CF; @@ -3279,4 +3281,4 @@ form#vstobjects.suspended { .helper-container { display: none; } -} +} \ No newline at end of file diff --git a/web/js/app.js b/web/js/app.js index 5f53fa6b1..a15cc4ae3 100644 --- a/web/js/app.js +++ b/web/js/app.js @@ -700,6 +700,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 @@ -1040,3 +1045,639 @@ hover_menu = function() { lastScrollTop = st; } + + +function checkedAll(frmname) { + if ($('.l-unit.selected:not(.header)').length > 0) { + $('.l-unit:not(.header)').removeClass("selected"); + $('.ch-toggle').attr("checked", false); + $('.toggle-all').removeClass('clicked-on'); + } + else { + $('.l-unit:not(.header)').addClass("selected"); + $('.ch-toggle').attr("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; +} + + + +$(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').attr('checked', false); + } + else { + $('.l-unit').addClass('selected'); + $('.l-unit .ch-toggle').attr('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').attr('checked', false); + $('.l-content').find('.l-unit.selected .ch-toggle').attr('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').attr('checked', false); + $('#toggle-all').attr('checked', false); + } + else { + $('.ch-toggle').attr('checked', true); + $('#toggle-all').attr('checked', true); + } + } + }); + + $('table').on('mousedown', 'td', function(e) { + if (e.ctrlKey) { + e.preventDefault(); + } + }); + } + + // + $('form#objects').bind('submit', function(evt) { + $('.l-unit.selected').find('.ch-toggle').attr('checked', true); + }); + + + // CRON HELPER + $( "#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/templates/admin/add_cron.html b/web/templates/admin/add_cron.html index 047e1226b..f0ba4f960 100644 --- a/web/templates/admin/add_cron.html +++ b/web/templates/admin/add_cron.html @@ -56,7 +56,7 @@

    - +

@@ -438,21 +438,4 @@ -
- \ No newline at end of file +
\ No newline at end of file diff --git a/web/templates/admin/edit_cron.html b/web/templates/admin/edit_cron.html index 8f28d6036..9eb7f1064 100644 --- a/web/templates/admin/edit_cron.html +++ b/web/templates/admin/edit_cron.html @@ -56,7 +56,7 @@

- +

@@ -445,36 +445,3 @@ - - - diff --git a/web/templates/footer.html b/web/templates/footer.html index cd22658da..b67ab41b8 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -1,588 +1,15 @@ + + + + + + + - + diff --git a/web/templates/header.html b/web/templates/header.html index 3b462a046..0a80b4e3e 100644 --- a/web/templates/header.html +++ b/web/templates/header.html @@ -5,60 +5,6 @@ Vesta - <?="$TAB"?> - - - - - - - - - - - From de21483533d827ded0d9cf945f2e5696c6eb5841 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 30 Jun 2016 21:53:52 +0300 Subject: [PATCH 166/229] fix for multi-interface servers --- bin/v-list-sys-interfaces | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-list-sys-interfaces b/bin/v-list-sys-interfaces index 1c539e6db..990d9cfd8 100755 --- a/bin/v-list-sys-interfaces +++ b/bin/v-list-sys-interfaces @@ -21,7 +21,7 @@ json_list() { i=1 echo '[' for interface in $interfaces; do - echo -n ' "'$interfaces'"' + echo -n ' "'$interface'"' if [ "$i" -lt "$objects" ]; then echo ',' else From 5c98639825978e5fbff8da346a8cc6aebc7e2e6b Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 30 Jun 2016 23:10:03 +0300 Subject: [PATCH 167/229] fix missing pub_ip during install --- install/vst-install-debian.sh | 6 ++---- install/vst-install-rhel.sh | 6 ++---- install/vst-install-ubuntu.sh | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index e5e6af5f5..5dfb084f6 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -1132,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=$(curl vestacp.com/what-is-my-ip/) +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 diff --git a/install/vst-install-rhel.sh b/install/vst-install-rhel.sh index 090c20c9e..37616e60a 100755 --- a/install/vst-install-rhel.sh +++ b/install/vst-install-rhel.sh @@ -1202,12 +1202,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=$(curl vestacp.com/what-is-my-ip/) +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 diff --git a/install/vst-install-ubuntu.sh b/install/vst-install-ubuntu.sh index c50a4a43b..d71a4edcd 100755 --- a/install/vst-install-ubuntu.sh +++ b/install/vst-install-ubuntu.sh @@ -1121,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=$(curl vestacp.com/what-is-my-ip/) +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 From 656d34ed0ba9f15fdd2b64231d1c23fdcf77451f Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 1 Jul 2016 14:59:29 +0300 Subject: [PATCH 168/229] Fix errors when you have sub domains of the given domain --- bin/v-check-letsencrypt-domain | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/v-check-letsencrypt-domain b/bin/v-check-letsencrypt-domain index 3d5c7b62e..2fff26e78 100755 --- a/bin/v-check-letsencrypt-domain +++ b/bin/v-check-letsencrypt-domain @@ -36,8 +36,8 @@ 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 +rdomain=$(egrep "'$domain'|'$domain,|,$domain,|,$domain'" $USER_DATA/web.conf) +if [ -z "$rdomain" ]; then check_result $E_NOTEXIST "domain $domain doesn't exist" fi @@ -48,7 +48,7 @@ fi source $USER_DATA/ssl/le.conf api='https://acme-v01.api.letsencrypt.org' -r_domain=$(echo "$check_domain" |cut -f 2 -d \') +r_domain=$(echo "$rdomain" |cut -f 2 -d \') key="$USER_DATA/ssl/user.key" exponent="$EXPONENT" modulus="$MODULUS" From e16e92278b4698d782faf232bedd4ad38aa7a5d1 Mon Sep 17 00:00:00 2001 From: Flat Date: Sat, 2 Jul 2016 19:51:56 +0900 Subject: [PATCH 169/229] Separate scripts from html & New rendering function --- web/add/cron/index.php | 16 +-- web/add/db/index.php | 19 +-- web/add/dns/index.php | 28 ++-- web/add/firewall/banlist/index.php | 15 +- web/add/firewall/index.php | 15 +- web/add/ip/index.php | 16 +-- web/add/mail/index.php | 25 ++-- web/add/package/index.php | 18 +-- web/add/user/index.php | 16 +-- web/add/web/index.php | 18 +-- web/edit/backup/exclusions/index.php | 14 +- web/edit/cron/index.php | 15 +- web/edit/db/index.php | 19 +-- web/edit/dns/index.php | 29 +--- web/edit/firewall/index.php | 15 +- web/edit/ip/index.php | 18 +-- web/edit/mail/index.php | 28 ++-- web/edit/package/index.php | 16 +-- web/edit/server/index.php | 15 +- web/edit/user/index.php | 23 +--- web/edit/web/index.php | 20 +-- web/generate/ssl/index.php | 30 ++-- web/inc/main.php | 31 ++++- web/list/backup/exclusions/index.php | 15 +- web/list/backup/index.php | 21 +-- web/list/cron/index.php | 20 +-- web/list/db/index.php | 17 +-- web/list/dns/index.php | 26 +--- web/list/firewall/banlist/index.php | 15 +- web/list/firewall/index.php | 15 +- web/list/ip/index.php | 28 ++-- web/list/log/index.php | 15 +- web/list/mail/index.php | 26 +--- web/list/notifications/index.php | 18 +-- web/list/package/index.php | 14 +- web/list/rrd/index.php | 25 ++-- web/list/server/index.php | 14 +- web/list/stats/index.php | 16 +-- web/list/updates/index.php | 30 ++-- web/list/user/index.php | 31 ++--- web/list/web/index.php | 17 +-- web/phpinfo.php | 1 + web/search/index.php | 32 ++--- web/templates/admin/add_db.html | 43 ++---- web/templates/admin/add_db.js.html | 21 +++ web/templates/admin/add_dns.html | 40 ------ web/templates/admin/add_dns.js.html | 35 +++++ web/templates/admin/add_dns_rec.html | 5 - web/templates/admin/add_dns_rec.js.html | 4 + web/templates/admin/add_firewall.html | 16 +-- web/templates/admin/add_firewall.js.html | 6 + web/templates/admin/add_firewall_banlist.html | 14 +- .../admin/add_firewall_banlist.js.html | 6 + web/templates/admin/add_ip.html | 10 -- web/templates/admin/add_ip.js.html | 6 + web/templates/admin/add_mail_acc.html | 48 ------- web/templates/admin/add_mail_acc.js.html | 46 +++++++ web/templates/admin/add_package.html | 49 ++----- web/templates/admin/add_package.js.html | 30 ++++ web/templates/admin/add_user.html | 22 +-- web/templates/admin/add_user.js.html | 18 +++ web/templates/admin/add_web.html | 56 +------- web/templates/admin/add_web.js.html | 45 ++++++ web/templates/admin/edit_db.html | 25 ---- web/templates/admin/edit_db.js.html | 21 +++ web/templates/admin/edit_firewall.html | 16 +-- web/templates/admin/edit_firewall.js.html | 6 + web/templates/admin/edit_ip.html | 18 +-- web/templates/admin/edit_ip.js.html | 6 + web/templates/admin/edit_mail_acc.html | 21 --- web/templates/admin/edit_mail_acc.js.html | 18 +++ web/templates/admin/edit_package.html | 47 ++----- web/templates/admin/edit_package.js.html | 31 +++++ web/templates/admin/edit_server.html | 129 +++++++----------- web/templates/admin/edit_server.js.html | 24 ++++ web/templates/admin/edit_user.html | 49 +------ web/templates/admin/edit_user.js.html | 41 ++++++ web/templates/admin/edit_web.html | 66 ++------- web/templates/admin/edit_web.js.html | 42 ++++++ web/templates/footer.html | 9 +- web/templates/user/edit_user.html | 45 +----- web/templates/user/edit_user.js.html | 41 ++++++ web/templates/user/edit_web.html | 56 +------- web/templates/user/edit_web.js.html | 42 ++++++ 84 files changed, 848 insertions(+), 1280 deletions(-) create mode 100644 web/phpinfo.php create mode 100644 web/templates/admin/add_db.js.html create mode 100644 web/templates/admin/add_dns.js.html create mode 100644 web/templates/admin/add_dns_rec.js.html create mode 100644 web/templates/admin/add_firewall.js.html create mode 100644 web/templates/admin/add_firewall_banlist.js.html create mode 100644 web/templates/admin/add_ip.js.html create mode 100644 web/templates/admin/add_mail_acc.js.html create mode 100644 web/templates/admin/add_package.js.html create mode 100644 web/templates/admin/add_user.js.html create mode 100644 web/templates/admin/add_web.js.html create mode 100644 web/templates/admin/edit_db.js.html create mode 100644 web/templates/admin/edit_firewall.js.html create mode 100644 web/templates/admin/edit_ip.js.html create mode 100644 web/templates/admin/edit_mail_acc.js.html create mode 100644 web/templates/admin/edit_package.js.html create mode 100644 web/templates/admin/edit_server.js.html create mode 100644 web/templates/admin/edit_user.js.html create mode 100644 web/templates/admin/edit_web.js.html create mode 100644 web/templates/user/edit_user.js.html create mode 100644 web/templates/user/edit_web.js.html diff --git a/web/add/cron/index.php b/web/add/cron/index.php index 62cae8f1c..9280f25e3 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 bd890c875..ec9dcbfcf 100644 --- a/web/add/dns/index.php +++ b/web/add/dns/index.php @@ -1,10 +1,9 @@ $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, 'admin/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 2fbd526a5..3c2288e13 100644 --- a/web/edit/user/index.php +++ b/web/edit/user/index.php @@ -1,10 +1,9 @@ ', $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, 'admin/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, 'admin/list_ssl'); + unset($_SESSION['ok_msg']); diff --git a/web/inc/main.php b/web/inc/main.php index 4df0ece95..f3f96b872 100644 --- a/web/inc/main.php +++ b/web/inc/main.php @@ -95,6 +95,33 @@ function check_return_code($return_var,$output) { } } +function render_page($user, $TAB, $page) { + $__template_dir = dirname(__DIR__) . '/templates/'; + $__template_base = $__template_dir . str_replace('*', $_SESSION['user'] === 'admin' ? 'admin' : 'user', $page); + + // 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 + @include($__template_base . '.html'); + + // Footer + $JS_FILE = $__template_base . '.js.html'; + include($__template_dir . 'footer.html'); +} + function top_panel($user, $TAB) { global $panel; $command = VESTA_CMD."v-list-user '".$user."' 'json'"; @@ -107,7 +134,7 @@ function top_panel($user, $TAB) { unset($output); - // getting notifications + // getting notifications $command = VESTA_CMD."v-list-user-notifications '".$user."' 'json'"; exec ($command, $output, $return_var); $notifications = json_decode(implode('', $output), true); @@ -118,7 +145,7 @@ function top_panel($user, $TAB) { } } unset($output); - + if ( $user == 'admin' ) { include(dirname(__FILE__).'/../templates/admin/panel.html'); diff --git a/web/list/backup/exclusions/index.php b/web/list/backup/exclusions/index.php index d03e98614..c533129cb 100644 --- a/web/list/backup/exclusions/index.php +++ b/web/list/backup/exclusions/index.php @@ -3,22 +3,15 @@ error_reporting(NULL); $TAB = 'BACKUP'; // Main include -include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); - -// Header -include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html'); - -// Panel -top_panel($user,$TAB); +include($_SERVER['DOCUMENT_ROOT'].'/inc/main.php'); // Data exec (VESTA_CMD."v-list-user-backup-exclusions $user json", $output, $return_var); $data = json_decode(implode('', $output), true); unset($output); -include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup_exclusions.html'); + +// Render page +render_page($user, $TAB, 'admin/list_backup_exclusions'); // Back uri $_SESSION['back'] = $_SERVER['REQUEST_URI']; - -// Footer -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); diff --git a/web/list/backup/index.php b/web/list/backup/index.php index a79205724..b25284eb1 100644 --- a/web/list/backup/index.php +++ b/web/list/backup/index.php @@ -3,31 +3,24 @@ error_reporting(NULL); $TAB = 'BACKUP'; // Main include -include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); +include($_SERVER['DOCUMENT_ROOT'].'/inc/main.php'); -// Header -include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html'); - -// Panel -top_panel($user,$TAB); - -// Data +// Data & Render page if (empty($_GET['backup'])){ exec (VESTA_CMD."v-list-user-backups $user json", $output, $return_var); $data = json_decode(implode('', $output), true); $data = array_reverse($data,true); unset($output); - include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup.html'); + + render_page($user, $TAB, 'admin/list_backup'); } else { - exec (VESTA_CMD."v-list-user-backup $user '".escapeshellarg($_GET['backup'])."' json", $output, $return_var); + exec (VESTA_CMD."v-list-user-backup $user ".escapeshellarg($_GET['backup'])." json", $output, $return_var); $data = json_decode(implode('', $output), true); $data = array_reverse($data,true); unset($output); - include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup_detail.html'); + + render_page($user, $TAB, 'admin/list_backup_detail'); } // Back uri $_SESSION['back'] = $_SERVER['REQUEST_URI']; - -// Footer -include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); diff --git a/web/list/cron/index.php b/web/list/cron/index.php index 19f66379c..5461ba0bf 100644 --- a/web/list/cron/index.php +++ b/web/list/cron/index.php @@ -1,16 +1,9 @@ - + @@ -79,7 +60,7 @@ @@ -100,7 +81,7 @@ @@ -112,13 +93,13 @@ if ((!empty($v_type)) && ( $value == $v_type )) echo ' selected'; echo ">".htmlentities($value).""; } - ?> + ?> @@ -130,14 +111,14 @@ if ((!empty($v_host)) && ( $key == $v_host )) echo ' selected'; echo ">".htmlentities($key).""; } - ?> + ?> @@ -183,7 +164,7 @@ @@ -207,9 +188,3 @@
@@ -68,7 +49,7 @@
- +
- +
- +
- +
- +
- +
- - - diff --git a/web/templates/admin/add_db.js.html b/web/templates/admin/add_db.js.html new file mode 100644 index 000000000..764f37967 --- /dev/null +++ b/web/templates/admin/add_db.js.html @@ -0,0 +1,21 @@ + + diff --git a/web/templates/admin/add_dns.html b/web/templates/admin/add_dns.html index 564ca5fa1..e559166b0 100644 --- a/web/templates/admin/add_dns.html +++ b/web/templates/admin/add_dns.html @@ -32,16 +32,6 @@
- @@ -190,33 +180,3 @@
- diff --git a/web/templates/admin/add_dns.js.html b/web/templates/admin/add_dns.js.html new file mode 100644 index 000000000..c3fefaadd --- /dev/null +++ b/web/templates/admin/add_dns.js.html @@ -0,0 +1,35 @@ + diff --git a/web/templates/admin/add_dns_rec.html b/web/templates/admin/add_dns_rec.html index 76964b4c1..2e65de4a0 100644 --- a/web/templates/admin/add_dns_rec.html +++ b/web/templates/admin/add_dns_rec.html @@ -121,8 +121,3 @@ - - - diff --git a/web/templates/admin/add_dns_rec.js.html b/web/templates/admin/add_dns_rec.js.html new file mode 100644 index 000000000..55358442b --- /dev/null +++ b/web/templates/admin/add_dns_rec.js.html @@ -0,0 +1,4 @@ + + diff --git a/web/templates/admin/add_firewall.html b/web/templates/admin/add_firewall.html index de3d63723..c884e85d2 100644 --- a/web/templates/admin/add_firewall.html +++ b/web/templates/admin/add_firewall.html @@ -32,16 +32,6 @@
- @@ -54,7 +44,7 @@
@@ -67,7 +57,7 @@ @@ -128,4 +118,4 @@
- +
- +
- \ No newline at end of file + diff --git a/web/templates/admin/add_firewall.js.html b/web/templates/admin/add_firewall.js.html new file mode 100644 index 000000000..438d2596f --- /dev/null +++ b/web/templates/admin/add_firewall.js.html @@ -0,0 +1,6 @@ + diff --git a/web/templates/admin/add_firewall_banlist.html b/web/templates/admin/add_firewall_banlist.html index 9c09d8da6..3b1ae2bf9 100644 --- a/web/templates/admin/add_firewall_banlist.html +++ b/web/templates/admin/add_firewall_banlist.html @@ -32,16 +32,6 @@ - @@ -54,7 +44,7 @@
@@ -95,4 +85,4 @@
- +
- \ No newline at end of file + diff --git a/web/templates/admin/add_firewall_banlist.js.html b/web/templates/admin/add_firewall_banlist.js.html new file mode 100644 index 000000000..438d2596f --- /dev/null +++ b/web/templates/admin/add_firewall_banlist.js.html @@ -0,0 +1,6 @@ + diff --git a/web/templates/admin/add_ip.html b/web/templates/admin/add_ip.html index 43b37d5d2..47ca95dfe 100644 --- a/web/templates/admin/add_ip.html +++ b/web/templates/admin/add_ip.html @@ -32,16 +32,6 @@ - diff --git a/web/templates/admin/add_ip.js.html b/web/templates/admin/add_ip.js.html new file mode 100644 index 000000000..438d2596f --- /dev/null +++ b/web/templates/admin/add_ip.js.html @@ -0,0 +1,6 @@ + diff --git a/web/templates/admin/add_mail_acc.html b/web/templates/admin/add_mail_acc.html index 2dd8c78d9..2b6333755 100644 --- a/web/templates/admin/add_mail_acc.html +++ b/web/templates/admin/add_mail_acc.html @@ -32,53 +32,6 @@ -
@@ -229,4 +182,3 @@
- diff --git a/web/templates/admin/add_mail_acc.js.html b/web/templates/admin/add_mail_acc.js.html new file mode 100644 index 000000000..538b53951 --- /dev/null +++ b/web/templates/admin/add_mail_acc.js.html @@ -0,0 +1,46 @@ + + diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html index ec4e675c3..d39a5a98b 100644 --- a/web/templates/admin/add_package.html +++ b/web/templates/admin/add_package.html @@ -72,11 +72,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " . strtoupper($_SESSION['WEB_BACKEND']). "" ;?> @@ -96,13 +96,13 @@ } echo ">".$value."\n"; } - ?> + ?> - + - + " .strtoupper($_SESSION['PROXY_SYSTEM']) . "" ;?> @@ -123,11 +123,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " .strtoupper($_SESSION['DNS_SYSTEM']) . "" ;?> @@ -147,7 +147,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -170,7 +170,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -380,34 +380,3 @@ - - \ No newline at end of file diff --git a/web/templates/admin/add_package.js.html b/web/templates/admin/add_package.js.html new file mode 100644 index 000000000..b4de83b00 --- /dev/null +++ b/web/templates/admin/add_package.js.html @@ -0,0 +1,30 @@ + + diff --git a/web/templates/admin/add_user.html b/web/templates/admin/add_user.html index 7f978c65e..069692c4b 100644 --- a/web/templates/admin/add_user.html +++ b/web/templates/admin/add_user.html @@ -34,24 +34,6 @@
- @@ -112,7 +94,7 @@ } echo ">".htmlentities($key)."\n"; } - ?> + ?> @@ -188,4 +170,4 @@
- \ No newline at end of file + diff --git a/web/templates/admin/add_user.js.html b/web/templates/admin/add_user.js.html new file mode 100644 index 000000000..4a3e7cb02 --- /dev/null +++ b/web/templates/admin/add_user.js.html @@ -0,0 +1,18 @@ + diff --git a/web/templates/admin/add_web.html b/web/templates/admin/add_web.html index 2a9170291..22b6a1dfa 100644 --- a/web/templates/admin/add_web.html +++ b/web/templates/admin/add_web.html @@ -33,44 +33,6 @@
- @@ -142,7 +104,7 @@ - +
@@ -164,7 +126,7 @@
- + / @@ -242,7 +204,7 @@ } echo ">" . htmlentities(__($value)) . "\n"; } - ?> + ?> @@ -428,15 +390,3 @@ - - - - diff --git a/web/templates/admin/add_web.js.html b/web/templates/admin/add_web.js.html new file mode 100644 index 000000000..538a50092 --- /dev/null +++ b/web/templates/admin/add_web.js.html @@ -0,0 +1,45 @@ + + diff --git a/web/templates/admin/edit_db.html b/web/templates/admin/edit_db.html index 296f8bef9..ded1c9b53 100644 --- a/web/templates/admin/edit_db.html +++ b/web/templates/admin/edit_db.html @@ -32,26 +32,6 @@ - @@ -146,8 +126,3 @@
- - diff --git a/web/templates/admin/edit_db.js.html b/web/templates/admin/edit_db.js.html new file mode 100644 index 000000000..ae45fd7fe --- /dev/null +++ b/web/templates/admin/edit_db.js.html @@ -0,0 +1,21 @@ + + diff --git a/web/templates/admin/edit_firewall.html b/web/templates/admin/edit_firewall.html index 60a13e164..f95557ace 100644 --- a/web/templates/admin/edit_firewall.html +++ b/web/templates/admin/edit_firewall.html @@ -32,16 +32,6 @@
- @@ -60,7 +50,7 @@
@@ -73,7 +63,7 @@ @@ -130,4 +120,4 @@
- +
- +
- \ No newline at end of file + diff --git a/web/templates/admin/edit_firewall.js.html b/web/templates/admin/edit_firewall.js.html new file mode 100644 index 000000000..c55772c7e --- /dev/null +++ b/web/templates/admin/edit_firewall.js.html @@ -0,0 +1,6 @@ + diff --git a/web/templates/admin/edit_ip.html b/web/templates/admin/edit_ip.html index 4d013f005..aef5f9929 100644 --- a/web/templates/admin/edit_ip.html +++ b/web/templates/admin/edit_ip.html @@ -32,16 +32,6 @@
- @@ -60,7 +50,7 @@
@@ -70,7 +60,7 @@ @@ -80,7 +70,7 @@ @@ -153,4 +143,4 @@
- +
- +
- +
- \ No newline at end of file + diff --git a/web/templates/admin/edit_ip.js.html b/web/templates/admin/edit_ip.js.html new file mode 100644 index 000000000..c55772c7e --- /dev/null +++ b/web/templates/admin/edit_ip.js.html @@ -0,0 +1,6 @@ + diff --git a/web/templates/admin/edit_mail_acc.html b/web/templates/admin/edit_mail_acc.html index c4ae09266..b22f2c325 100644 --- a/web/templates/admin/edit_mail_acc.html +++ b/web/templates/admin/edit_mail_acc.html @@ -32,26 +32,6 @@
- @@ -163,4 +143,3 @@
- diff --git a/web/templates/admin/edit_mail_acc.js.html b/web/templates/admin/edit_mail_acc.js.html new file mode 100644 index 000000000..5c71cf16b --- /dev/null +++ b/web/templates/admin/edit_mail_acc.js.html @@ -0,0 +1,18 @@ + + diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html index 4480fa825..f8519cd17 100644 --- a/web/templates/admin/edit_package.html +++ b/web/templates/admin/edit_package.html @@ -72,11 +72,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " .strtoupper($_SESSION['WEB_BACKEND']) . "";?> @@ -96,12 +96,12 @@ } echo ">".$value."\n"; } - ?> + ?> - - + + " .strtoupper($_SESSION['PROXY_SYSTEM']) . "";?> @@ -121,11 +121,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + " .strtoupper($_SESSION['DNS_SYSTEM']) . "";?> @@ -145,7 +145,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -381,34 +381,3 @@ - - \ No newline at end of file diff --git a/web/templates/admin/edit_package.js.html b/web/templates/admin/edit_package.js.html new file mode 100644 index 000000000..ced6604c3 --- /dev/null +++ b/web/templates/admin/edit_package.js.html @@ -0,0 +1,31 @@ + + diff --git a/web/templates/admin/edit_server.html b/web/templates/admin/edit_server.html index 20e494537..b6400e156 100644 --- a/web/templates/admin/edit_server.html +++ b/web/templates/admin/edit_server.html @@ -33,16 +33,7 @@
- + @@ -245,7 +236,7 @@
@@ -54,7 +45,7 @@ @@ -82,7 +73,7 @@ } echo ">".$value."\n"; } - ?> + ?>

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

@@ -121,10 +112,10 @@ @@ -187,7 +178,7 @@
- +
- + @@ -133,10 +124,10 @@

- + @@ -145,10 +136,10 @@

- + @@ -159,7 +150,7 @@ @@ -169,7 +160,7 @@ - +
- +
- +
- +
- +
@@ -215,10 +206,10 @@ $i = 0; foreach ($dns_cluster as $key => $value) { $i++; - ?> + ?> @@ -227,7 +218,7 @@

- +
- +
- +
@@ -254,10 +245,10 @@

- + @@ -266,11 +257,11 @@

- - + + @@ -279,10 +270,10 @@

- + @@ -324,7 +315,7 @@ @@ -338,10 +329,10 @@ $i = 0; foreach ($v_mysql_hosts as $key => $value) { $i++; - ?> + ?> @@ -352,7 +343,7 @@ @@ -364,7 +355,7 @@ @@ -375,7 +366,7 @@ @@ -384,7 +375,7 @@



- + @@ -404,7 +395,7 @@ @@ -418,10 +409,10 @@ $i = 0; foreach ($v_pgsql_hosts as $key => $value) { $i++; - ?> + ?> @@ -432,7 +423,7 @@ @@ -443,7 +434,7 @@ @@ -452,7 +443,7 @@



- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -470,7 +461,7 @@ @@ -484,7 +475,7 @@ @@ -505,7 +496,7 @@ @@ -524,7 +515,7 @@ - + @@ -296,7 +263,7 @@ } echo ">". htmlentities(__($value)) ."\n"; } - ?> + ?> @@ -430,7 +397,7 @@
- +
- +
- +
@@ -538,7 +529,7 @@ @@ -549,7 +540,7 @@ @@ -560,7 +551,7 @@ @@ -571,7 +562,7 @@ @@ -599,7 +590,7 @@
- +
- +
- +
- +
- +
@@ -638,7 +629,7 @@ @@ -651,7 +642,7 @@ @@ -690,7 +681,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 +703,7 @@
@@ -778,23 +769,3 @@
- +
- +
- +
- +
- - \ No newline at end of file diff --git a/web/templates/admin/edit_server.js.html b/web/templates/admin/edit_server.js.html new file mode 100644 index 000000000..2582fc5c7 --- /dev/null +++ b/web/templates/admin/edit_server.js.html @@ -0,0 +1,24 @@ + diff --git a/web/templates/admin/edit_user.html b/web/templates/admin/edit_user.html index 8717ce3f6..6ccb03f3b 100644 --- a/web/templates/admin/edit_user.html +++ b/web/templates/admin/edit_user.html @@ -32,18 +32,7 @@
- + @@ -130,7 +119,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -171,7 +160,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -264,33 +253,3 @@
@@ -106,7 +95,7 @@ } echo ">".htmlentities($key)."\n"; } - ?> + ?>
- \ No newline at end of file diff --git a/web/templates/admin/edit_user.js.html b/web/templates/admin/edit_user.js.html new file mode 100644 index 000000000..1b906fc13 --- /dev/null +++ b/web/templates/admin/edit_user.js.html @@ -0,0 +1,41 @@ + diff --git a/web/templates/admin/edit_web.html b/web/templates/admin/edit_web.html index 51822ec78..7ace1abca 100644 --- a/web/templates/admin/edit_web.html +++ b/web/templates/admin/edit_web.html @@ -32,40 +32,7 @@
- - + - - + + @@ -217,7 +184,7 @@
@@ -141,11 +108,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
" . strtoupper($_SESSION['WEB_BACKEND']) . "";?> @@ -166,12 +133,12 @@ } echo ">".$value."\n"; } - ?> + ?>
@@ -200,7 +167,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
/ @@ -247,7 +214,7 @@
- +
- +
# () @@ -485,16 +452,3 @@
- - - diff --git a/web/templates/admin/edit_web.js.html b/web/templates/admin/edit_web.js.html new file mode 100644 index 000000000..79e1b235d --- /dev/null +++ b/web/templates/admin/edit_web.js.html @@ -0,0 +1,42 @@ + + diff --git a/web/templates/footer.html b/web/templates/footer.html index b67ab41b8..e0bd4dea5 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -7,9 +7,12 @@ - - + + - diff --git a/web/templates/user/edit_user.js.html b/web/templates/user/edit_user.js.html new file mode 100644 index 000000000..1b906fc13 --- /dev/null +++ b/web/templates/user/edit_user.js.html @@ -0,0 +1,41 @@ + diff --git a/web/templates/user/edit_web.html b/web/templates/user/edit_web.html index 878e91402..aef2cd674 100644 --- a/web/templates/user/edit_web.html +++ b/web/templates/user/edit_web.html @@ -32,40 +32,7 @@
- - +
@@ -124,7 +91,7 @@
@@ -146,7 +113,7 @@
- + / @@ -176,7 +143,7 @@ - + @@ -225,7 +192,7 @@ } echo ">". htmlentities(__($value)) ."\n"; } - ?> + ?> @@ -359,7 +326,7 @@ - - - diff --git a/web/templates/user/edit_web.js.html b/web/templates/user/edit_web.js.html new file mode 100644 index 000000000..3546f0fd9 --- /dev/null +++ b/web/templates/user/edit_web.js.html @@ -0,0 +1,42 @@ + + From d1b1f97ff497c6b9ec93f990b2ee47f01e2e0f0d Mon Sep 17 00:00:00 2001 From: Flat Date: Sat, 2 Jul 2016 20:19:26 +0900 Subject: [PATCH 170/229] Move display_error_block() to footer.html --- web/inc/main.php | 30 ---------------- web/list/user/index.php | 1 - web/templates/admin/add_cron.html | 4 +-- web/templates/admin/add_db.html | 2 -- web/templates/admin/add_dns.html | 2 -- web/templates/admin/add_dns_rec.html | 2 -- web/templates/admin/add_firewall.html | 2 -- web/templates/admin/add_firewall_banlist.html | 2 -- web/templates/admin/add_ip.html | 2 -- web/templates/admin/add_mail.html | 4 +-- web/templates/admin/add_mail_acc.html | 2 -- web/templates/admin/add_package.html | 2 -- web/templates/admin/add_user.html | 2 -- web/templates/admin/add_web.html | 2 -- .../admin/edit_backup_exclusions.html | 4 +-- web/templates/admin/edit_cron.html | 6 ++-- web/templates/admin/edit_db.html | 2 -- web/templates/admin/edit_dns.html | 6 ++-- web/templates/admin/edit_dns_rec.html | 4 +-- web/templates/admin/edit_firewall.html | 2 -- web/templates/admin/edit_ip.html | 2 -- web/templates/admin/edit_mail.html | 4 +-- web/templates/admin/edit_mail_acc.html | 2 -- web/templates/admin/edit_package.html | 2 -- web/templates/admin/edit_server.html | 2 -- web/templates/admin/edit_user.html | 2 -- web/templates/admin/edit_web.html | 2 -- web/templates/admin/generate_ssl.html | 4 +-- web/templates/admin/list_backup.html | 4 --- web/templates/admin/list_backup_detail.html | 6 +--- .../admin/list_backup_exclusions.html | 4 --- web/templates/admin/list_cron.html | 8 ++--- web/templates/admin/list_db.html | 8 ++--- web/templates/admin/list_dns.html | 8 ++--- web/templates/admin/list_dns_rec.html | 4 --- web/templates/admin/list_firewall.html | 8 ++--- .../admin/list_firewall_banlist.html | 6 +--- web/templates/admin/list_ip.html | 4 --- web/templates/admin/list_log.html | 3 -- web/templates/admin/list_mail.html | 8 ++--- web/templates/admin/list_mail_acc.html | 6 +--- web/templates/admin/list_packages.html | 8 ++--- web/templates/admin/list_rrd.html | 6 +--- web/templates/admin/list_search.html | 3 -- web/templates/admin/list_services.html | 3 -- web/templates/admin/list_ssl.html | 4 +-- web/templates/admin/list_stats.html | 6 +--- web/templates/admin/list_updates.html | 4 --- web/templates/admin/list_user.html | 8 ++--- web/templates/admin/list_web.html | 19 +++++----- web/templates/footer.html | 36 +++++++++++++++++-- web/templates/user/edit_dns.html | 4 +-- web/templates/user/edit_user.html | 2 -- web/templates/user/list_user.html | 8 ++--- web/templates/user/list_web.html | 11 ++---- 55 files changed, 78 insertions(+), 224 deletions(-) diff --git a/web/inc/main.php b/web/inc/main.php index f3f96b872..75a66c732 100644 --- a/web/inc/main.php +++ b/web/inc/main.php @@ -268,36 +268,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/list/user/index.php b/web/list/user/index.php index d32ea6f16..9b63bbaf2 100644 --- a/web/list/user/index.php +++ b/web/list/user/index.php @@ -13,7 +13,6 @@ if ($user == 'admin') { } $data = json_decode(implode('', $output), true); $data = array_reverse($data,true); -display_error_block(); // Render page render_page($user, $TAB, '*/list_user'); diff --git a/web/templates/admin/add_cron.html b/web/templates/admin/add_cron.html index f0ba4f960..12a56e3f9 100644 --- a/web/templates/admin/add_cron.html +++ b/web/templates/admin/add_cron.html @@ -12,9 +12,7 @@ } ?> - -
@@ -438,4 +436,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/add_db.html b/web/templates/admin/add_db.html index ff202d33f..426ba7d6d 100644 --- a/web/templates/admin/add_db.html +++ b/web/templates/admin/add_db.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/add_dns.html b/web/templates/admin/add_dns.html index e559166b0..3598113d4 100644 --- a/web/templates/admin/add_dns.html +++ b/web/templates/admin/add_dns.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/add_dns_rec.html b/web/templates/admin/add_dns_rec.html index 2e65de4a0..00824c6d4 100644 --- a/web/templates/admin/add_dns_rec.html +++ b/web/templates/admin/add_dns_rec.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/add_firewall.html b/web/templates/admin/add_firewall.html index c884e85d2..36c1d78d2 100644 --- a/web/templates/admin/add_firewall.html +++ b/web/templates/admin/add_firewall.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/add_firewall_banlist.html b/web/templates/admin/add_firewall_banlist.html index 3b1ae2bf9..bbcecdcd4 100644 --- a/web/templates/admin/add_firewall_banlist.html +++ b/web/templates/admin/add_firewall_banlist.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/add_ip.html b/web/templates/admin/add_ip.html index 47ca95dfe..26887c3bc 100644 --- a/web/templates/admin/add_ip.html +++ b/web/templates/admin/add_ip.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/add_mail.html b/web/templates/admin/add_mail.html index c736f586d..057e81652 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 2b6333755..49abd9904 100644 --- a/web/templates/admin/add_mail_acc.html +++ b/web/templates/admin/add_mail_acc.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html index d39a5a98b..94de1957c 100644 --- a/web/templates/admin/add_package.html +++ b/web/templates/admin/add_package.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/add_user.html b/web/templates/admin/add_user.html index 069692c4b..e469a4dcb 100644 --- a/web/templates/admin/add_user.html +++ b/web/templates/admin/add_user.html @@ -12,9 +12,7 @@ } ?> - - diff --git a/web/templates/admin/add_web.html b/web/templates/admin/add_web.html index 22b6a1dfa..15b108fdf 100644 --- a/web/templates/admin/add_web.html +++ b/web/templates/admin/add_web.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/edit_backup_exclusions.html b/web/templates/admin/edit_backup_exclusions.html index 4dd5995c9..6bb489ea9 100644 --- a/web/templates/admin/edit_backup_exclusions.html +++ b/web/templates/admin/edit_backup_exclusions.html @@ -12,9 +12,7 @@ } ?> - -
@@ -100,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 9eb7f1064..91baee271 100644 --- a/web/templates/admin/edit_cron.html +++ b/web/templates/admin/edit_cron.html @@ -12,9 +12,7 @@ } ?> - -
@@ -32,7 +30,7 @@
-
    +
    • @@ -232,7 +230,7 @@
- +
diff --git a/web/templates/admin/edit_db.html b/web/templates/admin/edit_db.html index ded1c9b53..6e71678b0 100644 --- a/web/templates/admin/edit_db.html +++ b/web/templates/admin/edit_db.html @@ -12,9 +12,7 @@ } ?>
-
-
diff --git a/web/templates/admin/edit_dns.html b/web/templates/admin/edit_dns.html index 780270c15..df8ef25e4 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"; } - ?> + ?> @@ -133,4 +131,4 @@ - \ 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 446fda6b9..698cb6579 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 f95557ace..6f144ebbd 100644 --- a/web/templates/admin/edit_firewall.html +++ b/web/templates/admin/edit_firewall.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/edit_ip.html b/web/templates/admin/edit_ip.html index aef5f9929..c9ea2c723 100644 --- a/web/templates/admin/edit_ip.html +++ b/web/templates/admin/edit_ip.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/edit_mail.html b/web/templates/admin/edit_mail.html index 7bcfa18ad..141725c7a 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 b22f2c325..24c76e6dd 100644 --- a/web/templates/admin/edit_mail_acc.html +++ b/web/templates/admin/edit_mail_acc.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html index f8519cd17..343595449 100644 --- a/web/templates/admin/edit_package.html +++ b/web/templates/admin/edit_package.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/edit_server.html b/web/templates/admin/edit_server.html index b6400e156..04a96eada 100644 --- a/web/templates/admin/edit_server.html +++ b/web/templates/admin/edit_server.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/edit_user.html b/web/templates/admin/edit_user.html index 6ccb03f3b..567db42fb 100644 --- a/web/templates/admin/edit_user.html +++ b/web/templates/admin/edit_user.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/edit_web.html b/web/templates/admin/edit_web.html index 7ace1abca..09c9edb3f 100644 --- a/web/templates/admin/edit_web.html +++ b/web/templates/admin/edit_web.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/admin/generate_ssl.html b/web/templates/admin/generate_ssl.html index a5c9a5581..a9e490bba 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 365a816f4..0dcac926d 100644 --- a/web/templates/admin/list_backup.html +++ b/web/templates/admin/list_backup.html @@ -32,11 +32,7 @@ - - - - diff --git a/web/templates/admin/list_backup_detail.html b/web/templates/admin/list_backup_detail.html index 2c721ba7a..cabcec762 100644 --- a/web/templates/admin/list_backup_detail.html +++ b/web/templates/admin/list_backup_detail.html @@ -30,11 +30,7 @@ - - - - @@ -397,4 +393,4 @@ - \ No newline at end of file + diff --git a/web/templates/admin/list_backup_exclusions.html b/web/templates/admin/list_backup_exclusions.html index d9de37639..2593510f0 100644 --- a/web/templates/admin/list_backup_exclusions.html +++ b/web/templates/admin/list_backup_exclusions.html @@ -29,11 +29,7 @@ - - - - diff --git a/web/templates/admin/list_cron.html b/web/templates/admin/list_cron.html index c05aa8ed4..4ec2de21f 100644 --- a/web/templates/admin/list_cron.html +++ b/web/templates/admin/list_cron.html @@ -51,11 +51,7 @@ - - - - @@ -79,8 +75,8 @@ } ?> -
diff --git a/web/templates/admin/list_db.html b/web/templates/admin/list_db.html index 4e5e5140a..63fdcae18 100644 --- a/web/templates/admin/list_db.html +++ b/web/templates/admin/list_db.html @@ -72,11 +72,7 @@
-
- - -
@@ -109,8 +105,8 @@ ?> -
diff --git a/web/templates/admin/list_dns.html b/web/templates/admin/list_dns.html index 7f25b0d3c..649e3073e 100644 --- a/web/templates/admin/list_dns.html +++ b/web/templates/admin/list_dns.html @@ -42,11 +42,7 @@
-
- - -
@@ -69,8 +65,8 @@ } ?> -
diff --git a/web/templates/admin/list_dns_rec.html b/web/templates/admin/list_dns_rec.html index e4b55877b..00b7be544 100644 --- a/web/templates/admin/list_dns_rec.html +++ b/web/templates/admin/list_dns_rec.html @@ -32,11 +32,7 @@
-
- - -
diff --git a/web/templates/admin/list_firewall.html b/web/templates/admin/list_firewall.html index 73990d58d..ab24069a9 100644 --- a/web/templates/admin/list_firewall.html +++ b/web/templates/admin/list_firewall.html @@ -45,11 +45,7 @@ - - - - @@ -72,8 +68,8 @@ } ?> -
diff --git a/web/templates/admin/list_firewall_banlist.html b/web/templates/admin/list_firewall_banlist.html index ae6f835d6..40193198b 100644 --- a/web/templates/admin/list_firewall_banlist.html +++ b/web/templates/admin/list_firewall_banlist.html @@ -30,11 +30,7 @@
-
- - -
@@ -47,7 +43,7 @@ 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 ada609a2a..1875f7bba 100644 --- a/web/templates/admin/list_ip.html +++ b/web/templates/admin/list_ip.html @@ -42,11 +42,7 @@
- - - - diff --git a/web/templates/admin/list_log.html b/web/templates/admin/list_log.html index cc9011e28..34a676c6a 100644 --- a/web/templates/admin/list_log.html +++ b/web/templates/admin/list_log.html @@ -14,9 +14,6 @@ - - - diff --git a/web/templates/admin/list_mail.html b/web/templates/admin/list_mail.html index 27285db53..21a68ef5c 100644 --- a/web/templates/admin/list_mail.html +++ b/web/templates/admin/list_mail.html @@ -50,11 +50,7 @@ - - - - @@ -86,8 +82,8 @@ ?> -
">
diff --git a/web/templates/admin/list_mail_acc.html b/web/templates/admin/list_mail_acc.html index 9607d127e..28e1f90bf 100644 --- a/web/templates/admin/list_mail_acc.html +++ b/web/templates/admin/list_mail_acc.html @@ -49,11 +49,7 @@
-
- - -
@@ -83,7 +79,7 @@
" - 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="">
diff --git a/web/templates/admin/list_packages.html b/web/templates/admin/list_packages.html index d06f06088..1812bd840 100644 --- a/web/templates/admin/list_packages.html +++ b/web/templates/admin/list_packages.html @@ -37,11 +37,7 @@
-
- - -
@@ -56,8 +52,8 @@ ?> -
diff --git a/web/templates/admin/list_rrd.html b/web/templates/admin/list_rrd.html index 756193fb8..9245ada44 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 3db736d39..110feb87b 100644 --- a/web/templates/admin/list_search.html +++ b/web/templates/admin/list_search.html @@ -23,9 +23,6 @@ - - - diff --git a/web/templates/admin/list_services.html b/web/templates/admin/list_services.html index aa85671c7..0be6efe40 100644 --- a/web/templates/admin/list_services.html +++ b/web/templates/admin/list_services.html @@ -36,9 +36,6 @@ - - - diff --git a/web/templates/admin/list_ssl.html b/web/templates/admin/list_ssl.html index aa2addf9f..415419046 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 46bd11a3d..bc3192d25 100644 --- a/web/templates/admin/list_stats.html +++ b/web/templates/admin/list_stats.html @@ -37,11 +37,7 @@ - - - - @@ -265,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 86e3c96c5..4529dc24b 100644 --- a/web/templates/admin/list_updates.html +++ b/web/templates/admin/list_updates.html @@ -35,11 +35,7 @@ - - - - diff --git a/web/templates/admin/list_user.html b/web/templates/admin/list_user.html index ae0651af8..a4753aa3d 100644 --- a/web/templates/admin/list_user.html +++ b/web/templates/admin/list_user.html @@ -54,11 +54,7 @@ - - - - @@ -81,8 +77,8 @@ } ?> -
diff --git a/web/templates/admin/list_web.html b/web/templates/admin/list_web.html index 7f610b1a6..94556eb51 100644 --- a/web/templates/admin/list_web.html +++ b/web/templates/admin/list_web.html @@ -38,16 +38,13 @@
-
+ - - -
@@ -120,9 +117,9 @@ } ?> -
@@ -210,7 +207,7 @@ 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/footer.html b/web/templates/footer.html index e0bd4dea5..1a2795f8d 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -8,10 +8,42 @@ + + +
+
+

+
+ +
+ -
-
@@ -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 80bf0e316..2b1b24173 100644 --- a/web/templates/user/edit_user.html +++ b/web/templates/user/edit_user.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/user/list_user.html b/web/templates/user/list_user.html index e71d286a0..eea0e93a3 100644 --- a/web/templates/user/list_user.html +++ b/web/templates/user/list_user.html @@ -52,11 +52,7 @@ - - - - @@ -79,8 +75,8 @@ } ?> -
diff --git a/web/templates/user/list_web.html b/web/templates/user/list_web.html index 9f08d0ab9..fefe74d1d 100644 --- a/web/templates/user/list_web.html +++ b/web/templates/user/list_web.html @@ -36,18 +36,13 @@
-
- + - - - -
@@ -122,8 +117,8 @@ -
From c57e10156e316045e7d6b225e523169af01e4ea6 Mon Sep 17 00:00:00 2001 From: Flat Date: Sat, 2 Jul 2016 20:39:25 +0900 Subject: [PATCH 171/229] Correct indentation --- web/templates/admin/add_db.js.html | 38 ++--- web/templates/admin/add_dns.js.html | 62 ++++---- web/templates/admin/add_dns_rec.js.html | 8 +- web/templates/admin/add_firewall.js.html | 12 +- .../admin/add_firewall_banlist.js.html | 12 +- web/templates/admin/add_ip.js.html | 12 +- web/templates/admin/add_mail_acc.js.html | 80 +++++----- web/templates/admin/add_package.js.html | 56 +++---- web/templates/admin/add_user.js.html | 34 ++--- web/templates/admin/add_web.js.html | 80 +++++----- web/templates/admin/edit_db.js.html | 38 ++--- web/templates/admin/edit_firewall.js.html | 12 +- web/templates/admin/edit_ip.js.html | 12 +- web/templates/admin/edit_mail_acc.js.html | 34 ++--- web/templates/admin/edit_package.js.html | 58 ++++---- web/templates/admin/edit_server.js.html | 44 +++--- web/templates/admin/edit_user.js.html | 76 +++++----- web/templates/admin/edit_web.js.html | 74 +++++----- web/templates/footer.html | 138 +++++++++--------- web/templates/user/edit_user.js.html | 76 +++++----- web/templates/user/edit_web.js.html | 74 +++++----- 21 files changed, 515 insertions(+), 515 deletions(-) diff --git a/web/templates/admin/add_db.js.html b/web/templates/admin/add_db.js.html index 764f37967..fd78fbbcc 100644 --- a/web/templates/admin/add_db.js.html +++ b/web/templates/admin/add_db.js.html @@ -1,21 +1,21 @@ - - + GLOBAL.DB_USER_PREFIX = ; + GLOBAL.DB_DBNAME_PREFIX = ; + + diff --git a/web/templates/admin/add_dns.js.html b/web/templates/admin/add_dns.js.html index c3fefaadd..8c80da064 100644 --- a/web/templates/admin/add_dns.js.html +++ b/web/templates/admin/add_dns.js.html @@ -1,35 +1,35 @@ - + }); + diff --git a/web/templates/admin/add_dns_rec.js.html b/web/templates/admin/add_dns_rec.js.html index 55358442b..3b482171a 100644 --- a/web/templates/admin/add_dns_rec.js.html +++ b/web/templates/admin/add_dns_rec.js.html @@ -1,4 +1,4 @@ - - + + diff --git a/web/templates/admin/add_firewall.js.html b/web/templates/admin/add_firewall.js.html index 438d2596f..6be2268ea 100644 --- a/web/templates/admin/add_firewall.js.html +++ b/web/templates/admin/add_firewall.js.html @@ -1,6 +1,6 @@ - + diff --git a/web/templates/admin/add_firewall_banlist.js.html b/web/templates/admin/add_firewall_banlist.js.html index 438d2596f..6be2268ea 100644 --- a/web/templates/admin/add_firewall_banlist.js.html +++ b/web/templates/admin/add_firewall_banlist.js.html @@ -1,6 +1,6 @@ - + diff --git a/web/templates/admin/add_ip.js.html b/web/templates/admin/add_ip.js.html index 438d2596f..6be2268ea 100644 --- a/web/templates/admin/add_ip.js.html +++ b/web/templates/admin/add_ip.js.html @@ -1,6 +1,6 @@ - + diff --git a/web/templates/admin/add_mail_acc.js.html b/web/templates/admin/add_mail_acc.js.html index 538b53951..8f55a8900 100644 --- a/web/templates/admin/add_mail_acc.js.html +++ b/web/templates/admin/add_mail_acc.js.html @@ -1,46 +1,46 @@ - - + $('.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/templates/admin/add_package.js.html b/web/templates/admin/add_package.js.html index b4de83b00..30d518b1d 100644 --- a/web/templates/admin/add_package.js.html +++ b/web/templates/admin/add_package.js.html @@ -1,30 +1,30 @@ - - + $('input[name^=v_ns]').each(function(i, ns){ + i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show(); + }); + }); + + diff --git a/web/templates/admin/add_user.js.html b/web/templates/admin/add_user.js.html index 4a3e7cb02..3a79e6f88 100644 --- a/web/templates/admin/add_user.js.html +++ b/web/templates/admin/add_user.js.html @@ -1,18 +1,18 @@ - + 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_add_user.v_password.value = randomstring; + } + diff --git a/web/templates/admin/add_web.js.html b/web/templates/admin/add_web.js.html index 538a50092..891100e1c 100644 --- a/web/templates/admin/add_web.js.html +++ b/web/templates/admin/add_web.js.html @@ -1,45 +1,45 @@ - - + GLOBAL.FTP_USER_PREFIX = ; + GLOBAL.FTP_USER_PREPATH = ; + + diff --git a/web/templates/admin/edit_db.js.html b/web/templates/admin/edit_db.js.html index ae45fd7fe..c8938bea1 100644 --- a/web/templates/admin/edit_db.js.html +++ b/web/templates/admin/edit_db.js.html @@ -1,21 +1,21 @@ - - + GLOBAL.DB_USER_PREFIX = ; + GLOBAL.DB_DBNAME_PREFIX = ; + + diff --git a/web/templates/admin/edit_firewall.js.html b/web/templates/admin/edit_firewall.js.html index c55772c7e..434b66e68 100644 --- a/web/templates/admin/edit_firewall.js.html +++ b/web/templates/admin/edit_firewall.js.html @@ -1,6 +1,6 @@ - + diff --git a/web/templates/admin/edit_ip.js.html b/web/templates/admin/edit_ip.js.html index c55772c7e..434b66e68 100644 --- a/web/templates/admin/edit_ip.js.html +++ b/web/templates/admin/edit_ip.js.html @@ -1,6 +1,6 @@ - + diff --git a/web/templates/admin/edit_mail_acc.js.html b/web/templates/admin/edit_mail_acc.js.html index 5c71cf16b..ee6fc04ea 100644 --- a/web/templates/admin/edit_mail_acc.js.html +++ b/web/templates/admin/edit_mail_acc.js.html @@ -1,18 +1,18 @@ - - + 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_mail_acc.v_password.value = randomstring; + } + + diff --git a/web/templates/admin/edit_package.js.html b/web/templates/admin/edit_package.js.html index ced6604c3..7b6ab0779 100644 --- a/web/templates/admin/edit_package.js.html +++ b/web/templates/admin/edit_package.js.html @@ -1,31 +1,31 @@ - - + $('.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/templates/admin/edit_server.js.html b/web/templates/admin/edit_server.js.html index 2582fc5c7..d9512cedc 100644 --- a/web/templates/admin/edit_server.js.html +++ b/web/templates/admin/edit_server.js.html @@ -1,24 +1,24 @@ - + $('select[name=v_sftp]').change(function(){ + if($(this).val() == 'yes'){ + $('.sftp.description').show(); + } else { + $('.sftp.description').hide(); + } + }); + }); + diff --git a/web/templates/admin/edit_user.js.html b/web/templates/admin/edit_user.js.html index 1b906fc13..1cd825347 100644 --- a/web/templates/admin/edit_user.js.html +++ b/web/templates/admin/edit_user.js.html @@ -1,41 +1,41 @@ - + $('.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/templates/admin/edit_web.js.html b/web/templates/admin/edit_web.js.html index 79e1b235d..59eaf3303 100644 --- a/web/templates/admin/edit_web.js.html +++ b/web/templates/admin/edit_web.js.html @@ -1,42 +1,42 @@ - - + GLOBAL.FTP_USER_PREFIX = ; + + diff --git a/web/templates/footer.html b/web/templates/footer.html index 1a2795f8d..fa71c1540 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -1,84 +1,84 @@ -
- - - - - - - - - +
+ + + + + + + + + -
-
-

-
- -
+ }, + create: function() { + $(this) + .closest('.ui-dialog') + .find('.ui-button:first') + .addClass('submit'); + } + }); + +
- - \ No newline at end of file + diff --git a/web/templates/user/list_user.html b/web/templates/user/list_user.html index eea0e93a3..3087bc65d 100644 --- a/web/templates/user/list_user.html +++ b/web/templates/user/list_user.html @@ -90,38 +90,9 @@ sort-disk="" sort-star="
 L
- - -
-

-
- +
 L
 ↵
From 8b2e4da753dcb4c2afdb2020cf279035c82b3c36 Mon Sep 17 00:00:00 2001 From: Flat Date: Sat, 2 Jul 2016 21:50:16 +0900 Subject: [PATCH 176/229] Forgot to delete display_error_block()s in web/templates/user/*.html --- web/templates/user/edit_web.html | 2 -- web/templates/user/list_cron.html | 6 +----- web/templates/user/list_db.html | 8 ++------ web/templates/user/list_dns.html | 8 ++------ web/templates/user/list_dns_rec.html | 4 ---- web/templates/user/list_mail.html | 8 ++------ web/templates/user/list_mail_acc.html | 8 ++------ web/templates/user/list_search.html | 3 --- web/templates/user/list_stats.html | 6 +----- 9 files changed, 10 insertions(+), 43 deletions(-) diff --git a/web/templates/user/edit_web.html b/web/templates/user/edit_web.html index aef2cd674..013c24741 100644 --- a/web/templates/user/edit_web.html +++ b/web/templates/user/edit_web.html @@ -12,9 +12,7 @@ } ?> - -
diff --git a/web/templates/user/list_cron.html b/web/templates/user/list_cron.html index 757725ad3..568d045c2 100644 --- a/web/templates/user/list_cron.html +++ b/web/templates/user/list_cron.html @@ -49,11 +49,7 @@ - - - - @@ -78,7 +74,7 @@ ?> -
diff --git a/web/templates/user/list_db.html b/web/templates/user/list_db.html index 2a80f7abc..f4e13f29c 100644 --- a/web/templates/user/list_db.html +++ b/web/templates/user/list_db.html @@ -71,11 +71,7 @@
-
- - -
@@ -108,8 +104,8 @@ ?> -
diff --git a/web/templates/user/list_dns.html b/web/templates/user/list_dns.html index ce5c12a5c..22dcbc552 100644 --- a/web/templates/user/list_dns.html +++ b/web/templates/user/list_dns.html @@ -41,11 +41,7 @@
-
- - -
@@ -68,8 +64,8 @@ } ?> -
diff --git a/web/templates/user/list_dns_rec.html b/web/templates/user/list_dns_rec.html index 2cf428a4b..71b15abde 100644 --- a/web/templates/user/list_dns_rec.html +++ b/web/templates/user/list_dns_rec.html @@ -30,11 +30,7 @@
-
- - -
diff --git a/web/templates/user/list_mail.html b/web/templates/user/list_mail.html index 09afc6103..2d3dd836e 100644 --- a/web/templates/user/list_mail.html +++ b/web/templates/user/list_mail.html @@ -48,11 +48,7 @@ - - - - @@ -84,8 +80,8 @@ ?> -
diff --git a/web/templates/user/list_mail_acc.html b/web/templates/user/list_mail_acc.html index 70bc38dc0..a7ff6e7ad 100644 --- a/web/templates/user/list_mail_acc.html +++ b/web/templates/user/list_mail_acc.html @@ -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="">
diff --git a/web/templates/user/list_search.html b/web/templates/user/list_search.html index 4820b51df..889cd094a 100644 --- a/web/templates/user/list_search.html +++ b/web/templates/user/list_search.html @@ -23,9 +23,6 @@
- - -
diff --git a/web/templates/user/list_stats.html b/web/templates/user/list_stats.html index dc9419b45..aa70d794c 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 + From a9a7af414873c4212711363c25b554ee20938e0f Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 3 Jul 2016 14:10:17 +0900 Subject: [PATCH 177/229] Don't translate those which shouldn't be translated `those` are - Numbers - Already translated texts - User names - Network interfaces --- web/templates/admin/list_ip.html | 6 +++--- web/templates/admin/list_packages.html | 6 +++--- web/templates/admin/list_updates.html | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/templates/admin/list_ip.html b/web/templates/admin/list_ip.html index ada609a2a..670f25782 100644 --- a/web/templates/admin/list_ip.html +++ b/web/templates/admin/list_ip.html @@ -62,8 +62,8 @@
+sort-netmask="" sort-interface="" sort-domains="" +sort-owner="" sort-star="">
@@ -132,7 +132,7 @@ sort-owner="" sort-star="
:
- +
diff --git a/web/templates/admin/list_packages.html b/web/templates/admin/list_packages.html index d06f06088..26bdcf1c2 100644 --- a/web/templates/admin/list_packages.html +++ b/web/templates/admin/list_packages.html @@ -56,8 +56,8 @@ ?> -
@@ -126,7 +126,7 @@ sort-star="
:
- +
diff --git a/web/templates/admin/list_updates.html b/web/templates/admin/list_updates.html index 86e3c96c5..7a0753e7a 100644 --- a/web/templates/admin/list_updates.html +++ b/web/templates/admin/list_updates.html @@ -54,10 +54,10 @@ if ($data[$key]['UPDATED'] == 'yes') { $status = 'active'; - $upd_status = __('updated'); + $upd_status = 'updated'; } else { $status = 'suspended'; - $upd_status = __('outdated'); + $upd_status = 'outdated'; } ?> From 6faead081b6b4c1de8081730180b4b0a3d874ade Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 3 Jul 2016 15:09:32 +0900 Subject: [PATCH 178/229] Fix /edit/server/ always says database unsupported --- bin/v-list-database-hosts | 6 +- web/edit/server/index.php | 22 ++---- web/templates/admin/edit_server.html | 108 +++++++++++++-------------- 3 files changed, 65 insertions(+), 71 deletions(-) diff --git a/bin/v-list-database-hosts b/bin/v-list-database-hosts index 4260d59b9..1355a5a48 100755 --- a/bin/v-list-database-hosts +++ b/bin/v-list-database-hosts @@ -28,12 +28,12 @@ json_list() { fi done - echo "{" + 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'": { + echo -n ' { "HOST": "'$HOST'", "TYPE": "'$type'", "CHARSETS": "'$CHARSETS'", @@ -54,7 +54,7 @@ json_list() { done fi done - echo '}' + echo ']' } # SHELL list function diff --git a/web/edit/server/index.php b/web/edit/server/index.php index 073dc97b3..602fce4a7 100644 --- a/web/edit/server/index.php +++ b/web/edit/server/index.php @@ -46,21 +46,15 @@ foreach ($dns_cluster as $key => $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_pgsql = '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"; diff --git a/web/templates/admin/edit_server.html b/web/templates/admin/edit_server.html index 20e494537..1c8578599 100644 --- a/web/templates/admin/edit_server.html +++ b/web/templates/admin/edit_server.html @@ -54,7 +54,7 @@ @@ -82,7 +82,7 @@ } echo ">".$value."\n"; } - ?> + ?>

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

@@ -121,10 +121,10 @@ @@ -187,7 +187,7 @@
- +
- + @@ -133,10 +133,10 @@

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

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

- +
- +
- +
@@ -245,7 +245,7 @@ @@ -254,10 +254,10 @@

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

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

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



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



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

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

- +
- +
@@ -470,7 +470,7 @@ @@ -484,7 +484,7 @@ @@ -505,7 +505,7 @@ @@ -524,7 +524,7 @@ @@ -245,7 +245,7 @@
- +
- +
- +
@@ -538,7 +538,7 @@ @@ -549,7 +549,7 @@ @@ -560,7 +560,7 @@ @@ -571,7 +571,7 @@ @@ -599,7 +599,7 @@
- +
- +
- +
- +
- +
@@ -638,7 +638,7 @@ @@ -651,7 +651,7 @@ @@ -690,7 +690,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 +712,7 @@
@@ -797,4 +797,4 @@ } }); }); - \ No newline at end of file + From e0f695e493e6d8ae1125c6de3c365e0b1e2e90fe Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 3 Jul 2016 15:09:32 +0900 Subject: [PATCH 179/229] Fix /edit/server/ always says database unsupported This commit changes interface of bin/v-list-database-hosts --- bin/v-list-database-hosts | 6 +- web/add/db/index.php | 12 +-- web/edit/server/index.php | 22 ++---- web/templates/admin/add_db.html | 24 +++--- web/templates/admin/edit_server.html | 108 +++++++++++++-------------- 5 files changed, 83 insertions(+), 89 deletions(-) diff --git a/bin/v-list-database-hosts b/bin/v-list-database-hosts index 4260d59b9..1355a5a48 100755 --- a/bin/v-list-database-hosts +++ b/bin/v-list-database-hosts @@ -28,12 +28,12 @@ json_list() { fi done - echo "{" + 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'": { + echo -n ' { "HOST": "'$HOST'", "TYPE": "'$type'", "CHARSETS": "'$CHARSETS'", @@ -54,7 +54,7 @@ json_list() { done fi done - echo '}' + echo ']' } # SHELL list function diff --git a/web/add/db/index.php b/web/add/db/index.php index c64ca42e8..ae2c0809d 100644 --- a/web/add/db/index.php +++ b/web/add/db/index.php @@ -120,12 +120,13 @@ $v_db_email = $panel[$user]['CONTACT']; $db_types = split(",",$_SESSION['DB_SYSTEM']); // List available database servers -$db_hosts = array(); -exec (VESTA_CMD."v-list-database-hosts 'json'", $output, $return_var); -$db_hosts_tmp = json_decode(implode('', $output), true); -$db_hosts = array_merge($db_hosts, $db_hosts_tmp); -unset($db_hosts_tmp); +exec (VESTA_CMD."v-list-database-hosts json", $output, $return_var); +$db_hosts_tmp1 = json_decode(implode('', $output), true); +$db_hosts_tmp2 = array_map(function($host){return $host['HOST'];}, $db_hosts_tmp1); +$db_hosts = array_values(array_unique($db_hosts_tmp2)); unset($output); +unset($db_hosts_tmp1); +unset($db_hosts_tmp2); // Display body include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_db.html'); @@ -136,4 +137,3 @@ unset($_SESSION['ok_msg']); // Footer include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html'); -?> diff --git a/web/edit/server/index.php b/web/edit/server/index.php index 073dc97b3..602fce4a7 100644 --- a/web/edit/server/index.php +++ b/web/edit/server/index.php @@ -46,21 +46,15 @@ foreach ($dns_cluster as $key => $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_pgsql = '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"; diff --git a/web/templates/admin/add_db.html b/web/templates/admin/add_db.html index a69a6c140..2caa24a7a 100644 --- a/web/templates/admin/add_db.html +++ b/web/templates/admin/add_db.html @@ -68,7 +68,7 @@ @@ -79,7 +79,7 @@ @@ -100,7 +100,7 @@ @@ -112,32 +112,32 @@ if ((!empty($v_type)) && ( $value == $v_type )) echo ' selected'; echo ">".htmlentities($value).""; } - ?> + ?> @@ -183,7 +183,7 @@ diff --git a/web/templates/admin/edit_server.html b/web/templates/admin/edit_server.html index 20e494537..1c8578599 100644 --- a/web/templates/admin/edit_server.html +++ b/web/templates/admin/edit_server.html @@ -54,7 +54,7 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
@@ -82,7 +82,7 @@ } echo ">".$value."\n"; } - ?> + ?>

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

@@ -121,10 +121,10 @@ @@ -187,7 +187,7 @@
- +
- + @@ -133,10 +133,10 @@

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

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

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

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

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

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



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



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

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

- +
- +
@@ -470,7 +470,7 @@ @@ -484,7 +484,7 @@ @@ -505,7 +505,7 @@ @@ -524,7 +524,7 @@ - + @@ -296,7 +296,7 @@ } echo ">". htmlentities(__($value)) ."\n"; } - ?> + ?> @@ -430,7 +430,7 @@
- +
- +
- +
@@ -538,7 +538,7 @@ @@ -549,7 +549,7 @@ @@ -560,7 +560,7 @@ @@ -571,7 +571,7 @@ @@ -599,7 +599,7 @@
- +
- +
- +
- +
- +
@@ -638,7 +638,7 @@ @@ -651,7 +651,7 @@ @@ -690,7 +690,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 +712,7 @@
@@ -797,4 +797,4 @@ } }); }); - \ No newline at end of file + From 6fd8787985febfc0b70e7bb87fb597b1f2823e0b Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 3 Jul 2016 15:47:24 +0900 Subject: [PATCH 180/229] Don't translate those which shouldn't be translated `those` are - Numbers - Already translated texts - User names - Network interfaces - Package names, template names and shells --- web/templates/admin/add_package.html | 22 +++++++++++----------- web/templates/admin/edit_package.html | 20 ++++++++++---------- web/templates/admin/edit_web.html | 23 +++++++++++------------ web/templates/admin/list_packages.html | 8 ++++---- web/templates/admin/list_web.html | 16 ++++++++-------- web/templates/user/list_web.html | 6 +++--- 6 files changed, 47 insertions(+), 48 deletions(-) diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html index ec4e675c3..3a8dda480 100644 --- a/web/templates/admin/add_package.html +++ b/web/templates/admin/add_package.html @@ -72,11 +72,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + - + - + - + @@ -170,7 +170,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> @@ -410,4 +410,4 @@ }) }); - \ No newline at end of file + diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html index 4480fa825..8a8e82cca 100644 --- a/web/templates/admin/edit_package.html +++ b/web/templates/admin/edit_package.html @@ -72,11 +72,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + - - + + - + @@ -411,4 +411,4 @@ }) }); - \ No newline at end of file + diff --git a/web/templates/admin/edit_web.html b/web/templates/admin/edit_web.html index 51822ec78..5abd6af6c 100644 --- a/web/templates/admin/edit_web.html +++ b/web/templates/admin/edit_web.html @@ -141,11 +141,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?> - + - - + + @@ -217,7 +217,7 @@
- +
- +
- +
- +
" . strtoupper($_SESSION['WEB_BACKEND']). "" ;?> @@ -94,15 +94,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 +123,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
" .strtoupper($_SESSION['DNS_SYSTEM']) . "" ;?> @@ -147,7 +147,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
" .strtoupper($_SESSION['WEB_BACKEND']) . "";?> @@ -94,14 +94,14 @@ if ((!empty($v_backend_template)) && ( $value == $_POST['v_backend_template'])){ echo ' selected' ; } - echo ">".$value."\n"; + echo ">".htmlentities($value)."\n"; } - ?> + ?>
" .strtoupper($_SESSION['PROXY_SYSTEM']) . "";?> @@ -121,11 +121,11 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
" .strtoupper($_SESSION['DNS_SYSTEM']) . "";?> @@ -145,7 +145,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
" . strtoupper($_SESSION['WEB_BACKEND']) . "";?> @@ -164,14 +164,14 @@ if ((empty($v_backend_template)) && ($value == 'default')){ echo ' selected' ; } - echo ">".$value."\n"; + echo ">".htmlentities($value)."\n"; } - ?> + ?>
@@ -200,7 +200,7 @@ } echo ">".htmlentities($value)."\n"; } - ?> + ?>
/ @@ -247,7 +247,7 @@
- +
- + @@ -138,7 +138,7 @@ sort-star="
:
- +
@@ -166,7 +166,7 @@ sort-star="
:
- +
@@ -193,7 +193,7 @@ sort-star="
:
- +
diff --git a/web/templates/admin/list_web.html b/web/templates/admin/list_web.html index 7f610b1a6..f8c8c290a 100644 --- a/web/templates/admin/list_web.html +++ b/web/templates/admin/list_web.html @@ -120,9 +120,9 @@ } ?> -
@@ -205,12 +205,12 @@ sort-name="" sort-bandwidth="" sort-dis
:
- +
From dc655613913674dbc2a2080c5e41d8cd76646eae Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 3 Jul 2016 16:09:16 +0900 Subject: [PATCH 181/229] Correct some keys of $LANG --- web/inc/i18n/ar.php | 14 +++++++------- web/inc/i18n/bs.php | 14 +++++++------- web/inc/i18n/cn.php | 14 +++++++------- web/inc/i18n/cz.php | 16 ++++++++-------- web/inc/i18n/da.php | 14 +++++++------- web/inc/i18n/de.php | 17 +++++++++-------- web/inc/i18n/el.php | 16 ++++++++-------- web/inc/i18n/en.php | 16 ++++++++-------- web/inc/i18n/es.php | 16 ++++++++-------- web/inc/i18n/fa.php | 20 ++++++++++---------- web/inc/i18n/fi.php | 13 +++++++------ web/inc/i18n/fr.php | 14 +++++++------- web/inc/i18n/hu.php | 16 ++++++++-------- web/inc/i18n/id.php | 16 ++++++++-------- web/inc/i18n/it.php | 14 +++++++------- web/inc/i18n/ja.php | 12 ++++++------ web/inc/i18n/nl.php | 18 +++++++++--------- web/inc/i18n/no.php | 16 ++++++++-------- web/inc/i18n/pl.php | 11 ++++++----- web/inc/i18n/pt-BR.php | 10 +++++----- web/inc/i18n/pt.php | 10 +++++----- web/inc/i18n/ro.php | 12 ++++++------ web/inc/i18n/ru.php | 12 ++++++------ web/inc/i18n/se.php | 16 ++++++++-------- web/inc/i18n/tr.php | 12 ++++++------ web/inc/i18n/tw.php | 4 ++-- web/inc/i18n/ua.php | 14 +++++++------- web/inc/i18n/vi.php | 16 ++++++++-------- 28 files changed, 198 insertions(+), 195 deletions(-) diff --git a/web/inc/i18n/ar.php b/web/inc/i18n/ar.php index 9434680d6..153a70083 100644 --- a/web/inc/i18n/ar.php +++ b/web/inc/i18n/ar.php @@ -160,8 +160,8 @@ $LANG['ar'] = array( 'Web Aliases' => 'الأسماء البديلة', 'per domain' => 'لكل نطاق', 'DNS Domains' => 'نطاقات DNS', - 'DNS Domains' => 'نطاقات DNS', - 'DNS records' => 'سجلات DNS' , + 'DNS domains' => 'نطاقات DNS', + 'DNS records' => 'سجلات DNS', 'Name Servers' => 'خوادم الأسماء
Name Servers', 'Mail Domains' => 'نطاقات البريد', 'Mail Accounts' => 'حسابات البريد', @@ -577,19 +577,19 @@ $LANG['ar'] = array( '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' => 'فتح ملف / مجلد', '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 file manager', 'Minutes' => 'Minutes', diff --git a/web/inc/i18n/bs.php b/web/inc/i18n/bs.php index ceed309fa..338c4d4df 100644 --- a/web/inc/i18n/bs.php +++ b/web/inc/i18n/bs.php @@ -155,8 +155,8 @@ $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', @@ -581,19 +581,19 @@ $LANG['bs'] = array( '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', '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', diff --git a/web/inc/i18n/cn.php b/web/inc/i18n/cn.php index 1d82d9206..d64ff5971 100644 --- a/web/inc/i18n/cn.php +++ b/web/inc/i18n/cn.php @@ -159,9 +159,9 @@ $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' => '邮箱账户', @@ -588,19 +588,19 @@ $LANG['cn'] = array( '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', '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', diff --git a/web/inc/i18n/cz.php b/web/inc/i18n/cz.php index cca1f5a9c..f09c5456d 100644 --- a/web/inc/i18n/cz.php +++ b/web/inc/i18n/cz.php @@ -161,8 +161,8 @@ $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', @@ -588,19 +588,19 @@ $LANG['cz'] = array( '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', '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', @@ -643,4 +643,4 @@ $LANG['cz'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/da.php b/web/inc/i18n/da.php index b7c6e6945..7e3197407 100644 --- a/web/inc/i18n/da.php +++ b/web/inc/i18n/da.php @@ -162,8 +162,8 @@ $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', @@ -490,7 +490,7 @@ $LANG['da'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Tidszone', 'Default Language' => 'Standard Sprog', - 'FileSystem Disk Quota ' => 'FilSystem Disk Quota ', + 'FileSystem Disk Quota' => 'FilSystem Disk Quota ', 'Vesta Control Panel Plugins' => 'Vesta Kontrolpanel Plugins', 'preview' => 'preview', 'Reseller Role' => 'Forhandlerrolle', @@ -589,17 +589,17 @@ $LANG['da'] = array( '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', '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', diff --git a/web/inc/i18n/de.php b/web/inc/i18n/de.php index a8fb7f8b3..6fcc62d3a 100644 --- a/web/inc/i18n/de.php +++ b/web/inc/i18n/de.php @@ -53,7 +53,7 @@ $LANG['de'] = array( 'Save' => 'Speichern', 'Submit' => 'Übermitteln', - 'toggle all' => 'alle', // please make it as short as "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', @@ -160,7 +160,8 @@ $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', @@ -586,19 +587,19 @@ $LANG['de'] = array( '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', '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', @@ -641,4 +642,4 @@ $LANG['de'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/el.php b/web/inc/i18n/el.php index b53e51f53..1cf85cf03 100644 --- a/web/inc/i18n/el.php +++ b/web/inc/i18n/el.php @@ -161,8 +161,8 @@ $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', @@ -588,19 +588,19 @@ $LANG['el'] = array( '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', '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', @@ -643,4 +643,4 @@ $LANG['el'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/en.php b/web/inc/i18n/en.php index 7e448ceec..70c899ef1 100644 --- a/web/inc/i18n/en.php +++ b/web/inc/i18n/en.php @@ -160,8 +160,8 @@ $LANG['en'] = 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' => 'Mail Accounts', @@ -488,7 +488,7 @@ $LANG['en'] = array( 'Hostname' => 'Hostname', 'Time Zone' => 'Time Zone', 'Default Language' => 'Default Language', - 'FileSystem Disk Quota ' => 'FileSystem Disk Quota ', + 'FileSystem Disk Quota' => 'FileSystem Disk Quota', 'Vesta Control Panel Plugins' => 'Vesta Control Panel Plugins', 'preview' => 'preview', 'Reseller Role' => 'Reseller Role', @@ -588,17 +588,17 @@ $LANG['en'] = array( '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', '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', @@ -643,4 +643,4 @@ $LANG['en'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/es.php b/web/inc/i18n/es.php index b17abd0e2..54d77d210 100644 --- a/web/inc/i18n/es.php +++ b/web/inc/i18n/es.php @@ -160,8 +160,8 @@ $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', @@ -589,19 +589,19 @@ $LANG['es'] = array( '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', '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', @@ -644,4 +644,4 @@ $LANG['es'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/fa.php b/web/inc/i18n/fa.php index 71c56dd0a..b02fa5c12 100644 --- a/web/inc/i18n/fa.php +++ b/web/inc/i18n/fa.php @@ -163,9 +163,9 @@ $LANG['fa'] = 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' => 'نامهاي سرور', 'Mail Domains' => 'دامنه هاي ايميل', 'Mail Accounts' => 'حساب هاي ايميل', @@ -475,7 +475,7 @@ $LANG['fa'] = array( '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' => 'مارس', @@ -493,7 +493,7 @@ $LANG['fa'] = array( 'Hostname' => 'نام میزبان', 'Time Zone' => 'زمان منطقه ای', 'Default Language' => 'زبان پیشفرض', - 'FileSystem Disk Quota ' => 'سهميه فايل سيستم ديسك ', + 'FileSystem Disk Quota' => 'سهميه فايل سيستم ديسك ', 'Vesta Control Panel Plugins' => 'افزونه هاي كنترل پنل وستا', 'preview' => 'پیش نمایش', 'Reseller Role' => 'نقش فروشنده', @@ -553,7 +553,7 @@ $LANG['fa'] = array( 'Create file' => 'ایجاد پرونده', 'Create directory' => 'ایجاد پوشه', - + 'Add New object' => 'افزودن شیء تازه', 'Save Form' => 'ذخیره فرم', 'Cancel saving form' => 'انصراف از ذخیره فرم', @@ -581,17 +581,17 @@ $LANG['fa'] = array( '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' => 'بازگردن پرونده/ورود به پوشه', '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' => 'ميانبرها الهام گرفته از Midnight Commander مديريت فايل باشكوه GNU است.', @@ -607,4 +607,4 @@ $LANG['fa'] = array( '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 +); diff --git a/web/inc/i18n/fi.php b/web/inc/i18n/fi.php index 15592e776..861bfc23e 100644 --- a/web/inc/i18n/fi.php +++ b/web/inc/i18n/fi.php @@ -163,6 +163,7 @@ $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', @@ -594,19 +595,19 @@ $LANG['fi'] = array( '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', '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', @@ -649,4 +650,4 @@ $LANG['fi'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/fr.php b/web/inc/i18n/fr.php index e0586c633..4333a9546 100644 --- a/web/inc/i18n/fr.php +++ b/web/inc/i18n/fr.php @@ -160,8 +160,8 @@ $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', @@ -576,17 +576,17 @@ $LANG['fr'] = array( 'Save File (in text editor)' => 'Save File (in text editor)', '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', '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', @@ -631,4 +631,4 @@ $LANG['fr'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/hu.php b/web/inc/i18n/hu.php index 5ae967329..03c974e6c 100644 --- a/web/inc/i18n/hu.php +++ b/web/inc/i18n/hu.php @@ -164,8 +164,8 @@ $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', @@ -596,19 +596,19 @@ $LANG['hu'] = array( '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', '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', @@ -651,4 +651,4 @@ $LANG['hu'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/id.php b/web/inc/i18n/id.php index 3fddedffc..338cf9561 100644 --- a/web/inc/i18n/id.php +++ b/web/inc/i18n/id.php @@ -34,7 +34,7 @@ $LANG['id'] = array( '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', @@ -163,8 +163,8 @@ $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', @@ -577,19 +577,19 @@ $LANG['id'] = array( 'Save File (in text editor)' => 'Simpan File (di text editor)', 'Close Popup / Cancel' => 'Tutup Popup / Batal', 'Move Cursor Up' => 'Pindahkan kursur keatas', - 'Move Cursor Dow' => 'Pindahkan kursur kebawah', + '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 File List' => 'Pindah Ke atas dari Daftar File', + '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', + 'Open File / Enter Directory' => 'Buka File/Masuk ke Directory', 'Go to Parent Directory' => 'Ke Parent Directory', 'Select Current File' => 'Pilih File ini', 'Select Bunch of Files' => 'Pilih Bunch of Files', - 'Append File to the Current Selection' => 'Tambahkan File di Seleksi ini', + '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' => + 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'jalan pintas terinspirasi oleh magnificent GNU Midnight Commander file manager', 'Minutes' => 'Minutes', diff --git a/web/inc/i18n/it.php b/web/inc/i18n/it.php index 9b5da7ed9..655b2c1c8 100644 --- a/web/inc/i18n/it.php +++ b/web/inc/i18n/it.php @@ -161,7 +161,7 @@ $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', @@ -588,19 +588,19 @@ $LANG['it'] = array( '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', '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', @@ -643,4 +643,4 @@ $LANG['it'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/ja.php b/web/inc/i18n/ja.php index 1845b16a2..5d8d5605c 100644 --- a/web/inc/i18n/ja.php +++ b/web/inc/i18n/ja.php @@ -160,7 +160,7 @@ $LANG['ja'] = array( 'Web Aliases' => 'ウェブエイリアス', 'per domain' => 'ドメインごと', 'DNS Domains' => 'DNSドメイン', - 'DNS Domains' => 'DNSドメイン', + 'DNS domains' => 'DNSドメイン', 'DNS records' => 'DNSレコード', 'Name Servers' => 'ネームサーバー', 'Mail Domains' => 'メールドメイン', @@ -488,7 +488,7 @@ $LANG['ja'] = array( 'Hostname' => 'ホスト名', 'Time Zone' => 'タイムゾーン', 'Default Language' => '規定の言語', - 'FileSystem Disk Quota ' => 'ディスク割り当て量', + 'FileSystem Disk Quota' => 'ディスク割り当て量', 'Vesta Control Panel Plugins' => 'Vesta Control Panel プラグイン', 'preview' => 'プレビュー', 'Reseller Role' => 'リセラーの役割', @@ -587,17 +587,17 @@ $LANG['ja'] = array( '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' => 'ファイルを開く / ディレクトリに入る', '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', diff --git a/web/inc/i18n/nl.php b/web/inc/i18n/nl.php index cdf98d4e1..389d80601 100644 --- a/web/inc/i18n/nl.php +++ b/web/inc/i18n/nl.php @@ -160,9 +160,9 @@ $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', @@ -588,19 +588,19 @@ $LANG['nl'] = array( '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', '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', @@ -643,4 +643,4 @@ $LANG['nl'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/no.php b/web/inc/i18n/no.php index f8bab47ca..471db7bcf 100644 --- a/web/inc/i18n/no.php +++ b/web/inc/i18n/no.php @@ -161,8 +161,8 @@ $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', @@ -588,19 +588,19 @@ $LANG['no'] = array( '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', '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', @@ -643,4 +643,4 @@ $LANG['no'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/pl.php b/web/inc/i18n/pl.php index bef640306..ea5224fb5 100644 --- a/web/inc/i18n/pl.php +++ b/web/inc/i18n/pl.php @@ -160,6 +160,7 @@ $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', @@ -487,7 +488,7 @@ $LANG['pl'] = array( 'Hostname' => 'Nazwa hosta', 'Time Zone' => 'Strefa czasowa', 'Default Language' => 'Domyślny język', - 'FileSystem Disk Quota ' => 'Quota systemu plików', + 'FileSystem Disk Quota' => 'Quota systemu plików', 'Vesta Control Panel Plugins' => 'Pluginy panelu Vesta', 'preview' => 'podląd', 'Reseller Role' => 'Rola Resellera', @@ -585,17 +586,17 @@ $LANG['pl'] = array( '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', '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', diff --git a/web/inc/i18n/pt-BR.php b/web/inc/i18n/pt-BR.php index 2cf00bf1d..91710526e 100644 --- a/web/inc/i18n/pt-BR.php +++ b/web/inc/i18n/pt-BR.php @@ -160,7 +160,7 @@ $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', @@ -574,17 +574,17 @@ $LANG['pt-BR'] = array( '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', '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', diff --git a/web/inc/i18n/pt.php b/web/inc/i18n/pt.php index 6b2dedc83..e8f83083c 100644 --- a/web/inc/i18n/pt.php +++ b/web/inc/i18n/pt.php @@ -160,7 +160,7 @@ $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', @@ -575,17 +575,17 @@ $LANG['pt'] = array( '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', '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', diff --git a/web/inc/i18n/ro.php b/web/inc/i18n/ro.php index b916a35e6..1b68236ee 100644 --- a/web/inc/i18n/ro.php +++ b/web/inc/i18n/ro.php @@ -161,7 +161,7 @@ $LANG['ro'] = array( '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 de poștă', @@ -587,19 +587,19 @@ $LANG['ro'] = array( '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', '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', diff --git a/web/inc/i18n/ru.php b/web/inc/i18n/ru.php index fe22d4f98..0451b3c0c 100644 --- a/web/inc/i18n/ru.php +++ b/web/inc/i18n/ru.php @@ -162,7 +162,7 @@ $LANG['ru'] = array( 'Web Aliases' => 'Веб алиасы', 'per domain' => 'на домен', 'DNS Domains' => 'DNS домены', - 'DNS Domains' => 'DNS домены', + 'DNS domains' => 'DNS домены', 'DNS records' => 'DNS записи', 'Name Servers' => 'Сервер имен', 'Mail Domains' => 'Почтовые домены', @@ -589,19 +589,19 @@ $LANG['ru'] = array( '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' => 'Открыть Файл/Папку', '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' => 'Лицензионный Ключ', diff --git a/web/inc/i18n/se.php b/web/inc/i18n/se.php index 3851df96c..289d993de 100644 --- a/web/inc/i18n/se.php +++ b/web/inc/i18n/se.php @@ -158,8 +158,8 @@ $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', @@ -585,19 +585,19 @@ $LANG['se'] = array( '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', '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', @@ -640,4 +640,4 @@ $LANG['se'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/tr.php b/web/inc/i18n/tr.php index 86e6238ba..682f71f7b 100644 --- a/web/inc/i18n/tr.php +++ b/web/inc/i18n/tr.php @@ -160,9 +160,9 @@ $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ı', @@ -588,17 +588,17 @@ $LANG['tr'] = array( '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', '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' => 'kısayollar muhteşem dosya yöneticisi Midnight Commander arayüzünden esinlenilmiştir', diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index 83d429145..a434cd226 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -155,6 +155,7 @@ $LANG['tw'] = array( 'SSL Domains' => 'SSL網域', 'Web Aliases' => '網站次網域', 'per domain' => '(每網域)', + 'DNS Domains' => 'DNS網域', 'DNS domains' => 'DNS網域', 'DNS records' => 'DNS紀錄', 'Name Servers' => '域名服務器', @@ -306,7 +307,6 @@ $LANG['tw'] = array( 'web domains' => '網站網域', 'web aliases' => '網站次網域', 'dns records' => 'DNS記錄', - 'DNS Domains' => 'DNS網域', 'mail domains' => '信箱網域', 'mail accounts' => '信箱帳號', 'accounts' => '帳號', @@ -646,7 +646,7 @@ $LANG['tw'] = array( 'Select Bunch of Files' => '選取多個檔案', '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' => "快捷鍵是的想法是由 magnificent GNU Midnight Commander 檔案管理器 啟發的
繁體中文翻譯是由 Clark's 虛擬主機服務 總工程師 Clark Chen 提供。", 'Save' => '儲存', 'Licence Key' => '授權金鑰', diff --git a/web/inc/i18n/ua.php b/web/inc/i18n/ua.php index 34e579d90..14134c62e 100644 --- a/web/inc/i18n/ua.php +++ b/web/inc/i18n/ua.php @@ -162,7 +162,7 @@ $LANG['ua'] = array( 'Web Aliases' => 'Web аліаси', 'per domain' => 'на домен', 'DNS Domains' => 'DNS домени', - 'DNS Domains' => 'DNS домени', + 'DNS domains' => 'DNS домени', 'DNS records' => 'DNS записи', 'Name Servers' => 'Сервери імен', 'Mail Domains' => 'Поштові домени', @@ -589,19 +589,19 @@ $LANG['ua'] = array( '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', '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', @@ -644,4 +644,4 @@ $LANG['ua'] = array( 'Hour' => 'Hour', 'Minute' => 'Minute' -); \ No newline at end of file +); diff --git a/web/inc/i18n/vi.php b/web/inc/i18n/vi.php index 455005203..f651cb51b 100644 --- a/web/inc/i18n/vi.php +++ b/web/inc/i18n/vi.php @@ -158,8 +158,8 @@ $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', @@ -479,7 +479,7 @@ $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ờ', @@ -493,7 +493,7 @@ $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', @@ -583,17 +583,17 @@ $LANG['vi'] = array( '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', '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', From 869c54970e52bdc415fd234a961fd53345b97044 Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 3 Jul 2016 16:15:52 +0900 Subject: [PATCH 182/229] Correct typo, replace 'LoadAverage' with 'Load Average' --- web/add/web/index.php | 4 ++-- web/edit/web/index.php | 2 +- web/templates/admin/add_firewall_banlist.html | 6 +++--- web/templates/admin/add_web.html | 8 ++++---- web/templates/admin/list_services.html | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/web/add/web/index.php b/web/add/web/index.php index 0be71f635..22cb7abb9 100644 --- a/web/add/web/index.php +++ b/web/add/web/index.php @@ -60,7 +60,7 @@ if (!empty($_POST['ok'])) { $aliases = implode(",",$aliases_arr); $aliases = escapeshellarg($aliases); - // Define proxy extentions + // Define proxy extensions $v_proxy_ext = $_POST['v_proxy_ext']; $proxy_ext = preg_replace("/\n/", ",", $v_proxy_ext); $proxy_ext = preg_replace("/\r/", ",", $proxy_ext); @@ -272,7 +272,7 @@ if (!empty($_POST['ok'])) { $fp = fopen($v_ftp_password, "w"); fwrite($fp, $v_ftp_user_data['v_ftp_password']."\n"); fclose($fp); - exec (VESTA_CMD."v-add-web-domain-ftp ".$user." ".$v_domain." ".$v_ftp_user." ".$v_ftp_password . " " . $v_ftp_path, $output, $return_var); + exec (VESTA_CMD."v-add-web-domain-ftp ".$user." ".$v_domain." ".$v_ftp_user." ".$v_ftp_password . " " . $v_ftp_path, $output, $return_var); check_return_code($return_var,$output); unset($output); unlink($v_ftp_password); diff --git a/web/edit/web/index.php b/web/edit/web/index.php index e28aa713a..339a68196 100644 --- a/web/edit/web/index.php +++ b/web/edit/web/index.php @@ -222,7 +222,7 @@ if (!empty($_POST['save'])) { $restart_proxy = 'yes'; } - // Change proxy template / Update extention list + // Change proxy template / Update extension list if ((!empty($_SESSION['PROXY_SYSTEM'])) && (!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) { $ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']); $ext = preg_replace("/,/", " ", $ext); diff --git a/web/templates/admin/add_firewall_banlist.html b/web/templates/admin/add_firewall_banlist.html index 9c09d8da6..43d41ba57 100644 --- a/web/templates/admin/add_firewall_banlist.html +++ b/web/templates/admin/add_firewall_banlist.html @@ -54,7 +54,7 @@
# () @@ -497,4 +497,3 @@ }); - diff --git a/web/templates/admin/list_packages.html b/web/templates/admin/list_packages.html index 26bdcf1c2..4efb8b6f6 100644 --- a/web/templates/admin/list_packages.html +++ b/web/templates/admin/list_packages.html @@ -110,7 +110,7 @@ sort-star="
:
- +
- +
@@ -222,7 +222,7 @@ sort-name="" sort-bandwidth="" sort-dis - +
@@ -251,7 +251,7 @@ sort-name="" sort-bandwidth="" sort-dis
- +
:
@@ -259,7 +259,7 @@ sort-name="" sort-bandwidth="" sort-dis
- +
:
diff --git a/web/templates/user/list_web.html b/web/templates/user/list_web.html index 9f08d0ab9..d90f9f0ac 100644 --- a/web/templates/user/list_web.html +++ b/web/templates/user/list_web.html @@ -122,8 +122,8 @@ -
@@ -197,7 +197,7 @@ sort-bandwidth="" sort-disk="
:
- +
@@ -72,7 +72,7 @@ @@ -95,4 +95,4 @@
- +
- () + ()
-
\ No newline at end of file +
diff --git a/web/templates/admin/add_web.html b/web/templates/admin/add_web.html index 2a9170291..ee489c423 100644 --- a/web/templates/admin/add_web.html +++ b/web/templates/admin/add_web.html @@ -142,7 +142,7 @@ - + @@ -153,7 +153,7 @@ @@ -164,7 +164,7 @@
- +
- + / @@ -242,7 +242,7 @@ } echo ">" . htmlentities(__($value)) . "\n"; } - ?> + ?> diff --git a/web/templates/admin/list_services.html b/web/templates/admin/list_services.html index aa85671c7..28cd8ba3f 100644 --- a/web/templates/admin/list_services.html +++ b/web/templates/admin/list_services.html @@ -91,7 +91,7 @@
-
:
+
:
From 7be9a01b8dd90cf542fc9727a2d85fd1399adb3c Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 3 Jul 2016 16:26:19 +0900 Subject: [PATCH 183/229] Translate [Back] buttons, 'delete' links, 'Add one more Name Server' links --- web/templates/admin/add_package.html | 18 +++++++++--------- web/templates/admin/edit_package.html | 18 +++++++++--------- web/templates/admin/list_backup_detail.html | 2 +- .../admin/list_backup_exclusions.html | 2 +- web/templates/admin/list_dns_rec.html | 2 +- web/templates/admin/list_firewall_banlist.html | 2 +- web/templates/admin/list_mail_acc.html | 2 +- web/templates/user/list_dns_rec.html | 2 +- web/templates/user/list_mail_acc.html | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html index 3a8dda480..bcf9aaac1 100644 --- a/web/templates/admin/add_package.html +++ b/web/templates/admin/add_package.html @@ -302,20 +302,20 @@ delete + delete + - delete + '.__('delete').' '; @@ -323,7 +323,7 @@ echo ' - delete + '.__('delete').' '; @@ -331,7 +331,7 @@ echo ' - delete + '.__('delete').' '; @@ -339,7 +339,7 @@ echo ' - delete + '.__('delete').' '; @@ -347,7 +347,7 @@ echo ' - delete + '.__('delete').' '; @@ -355,13 +355,13 @@ echo ' - delete + '.__('delete').' '; ?> > - Add one more Name Server + diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html index 8a8e82cca..9767e0fc4 100644 --- a/web/templates/admin/edit_package.html +++ b/web/templates/admin/edit_package.html @@ -300,13 +300,13 @@ delete + delete + @@ -314,7 +314,7 @@ echo ' - delete + '.__('delete').' '; @@ -322,7 +322,7 @@ echo ' - delete + '.__('delete').' '; @@ -330,7 +330,7 @@ echo ' - delete + '.__('delete').' '; @@ -338,7 +338,7 @@ echo ' - delete + '.__('delete').' '; @@ -346,7 +346,7 @@ echo ' - delete + '.__('delete').' '; @@ -354,14 +354,14 @@ echo ' - delete + '.__('delete').' '; ?> > - Add one more Name Server + diff --git a/web/templates/admin/list_backup_detail.html b/web/templates/admin/list_backup_detail.html index 2c721ba7a..65449b0b7 100644 --- a/web/templates/admin/list_backup_detail.html +++ b/web/templates/admin/list_backup_detail.html @@ -393,7 +393,7 @@ ?>
- back +
diff --git a/web/templates/admin/list_backup_exclusions.html b/web/templates/admin/list_backup_exclusions.html index d9de37639..1f0998af2 100644 --- a/web/templates/admin/list_backup_exclusions.html +++ b/web/templates/admin/list_backup_exclusions.html @@ -111,7 +111,7 @@
- back +
diff --git a/web/templates/admin/list_dns_rec.html b/web/templates/admin/list_dns_rec.html index e4b55877b..0dd32b599 100644 --- a/web/templates/admin/list_dns_rec.html +++ b/web/templates/admin/list_dns_rec.html @@ -139,7 +139,7 @@ v_unit_id="" v_section="dns_rec"> ?>
- back +
diff --git a/web/templates/admin/list_firewall_banlist.html b/web/templates/admin/list_firewall_banlist.html index ae6f835d6..52e315987 100644 --- a/web/templates/admin/list_firewall_banlist.html +++ b/web/templates/admin/list_firewall_banlist.html @@ -118,7 +118,7 @@ ?>
- back +
diff --git a/web/templates/admin/list_mail_acc.html b/web/templates/admin/list_mail_acc.html index 9607d127e..2d133d6bf 100644 --- a/web/templates/admin/list_mail_acc.html +++ b/web/templates/admin/list_mail_acc.html @@ -216,7 +216,7 @@ sort-star="
- back +
diff --git a/web/templates/user/list_dns_rec.html b/web/templates/user/list_dns_rec.html index 2cf428a4b..5a811fdeb 100644 --- a/web/templates/user/list_dns_rec.html +++ b/web/templates/user/list_dns_rec.html @@ -136,7 +136,7 @@ ?>
- back +
diff --git a/web/templates/user/list_mail_acc.html b/web/templates/user/list_mail_acc.html index 70bc38dc0..6439803fa 100644 --- a/web/templates/user/list_mail_acc.html +++ b/web/templates/user/list_mail_acc.html @@ -204,7 +204,7 @@ sort-star="
- back +
From e76c3fd808e68266a702f1e8dc5d2b62082575f7 Mon Sep 17 00:00:00 2001 From: Flat Date: Sun, 3 Jul 2016 16:37:10 +0900 Subject: [PATCH 184/229] Translate page titles, dialog captions, 'Shortcuts', firewall actions & protocols, and list2ban chains I think protocols and chains shouldn't be translated --- web/templates/admin/add_firewall.html | 16 ++++++++-------- web/templates/admin/add_firewall_banlist.html | 14 +++++++------- web/templates/admin/edit_firewall.html | 16 ++++++++-------- web/templates/admin/list_firewall.html | 12 ++++++------ web/templates/admin/list_firewall_banlist.html | 4 ++-- web/templates/admin/list_server_info.html | 4 ++-- web/templates/footer.html | 6 +++--- web/templates/header.html | 2 +- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/web/templates/admin/add_firewall.html b/web/templates/admin/add_firewall.html index de3d63723..27f478393 100644 --- a/web/templates/admin/add_firewall.html +++ b/web/templates/admin/add_firewall.html @@ -54,28 +54,28 @@ @@ -128,4 +128,4 @@
- +
- +
- \ No newline at end of file + diff --git a/web/templates/admin/add_firewall_banlist.html b/web/templates/admin/add_firewall_banlist.html index 43d41ba57..55e8b7a09 100644 --- a/web/templates/admin/add_firewall_banlist.html +++ b/web/templates/admin/add_firewall_banlist.html @@ -60,13 +60,13 @@ diff --git a/web/templates/admin/edit_firewall.html b/web/templates/admin/edit_firewall.html index 60a13e164..c6f42279a 100644 --- a/web/templates/admin/edit_firewall.html +++ b/web/templates/admin/edit_firewall.html @@ -60,28 +60,28 @@ @@ -130,4 +130,4 @@
- +
- +
- \ No newline at end of file + diff --git a/web/templates/admin/list_firewall.html b/web/templates/admin/list_firewall.html index 73990d58d..1a02a9360 100644 --- a/web/templates/admin/list_firewall.html +++ b/web/templates/admin/list_firewall.html @@ -72,8 +72,8 @@ } ?> -
@@ -121,11 +121,11 @@ sort-ip="" sort-comment="
-
-
+
+
-
-
+
+
diff --git a/web/templates/admin/list_firewall_banlist.html b/web/templates/admin/list_firewall_banlist.html index 52e315987..94fab3dbf 100644 --- a/web/templates/admin/list_firewall_banlist.html +++ b/web/templates/admin/list_firewall_banlist.html @@ -47,7 +47,7 @@ foreach ($data as $key => $value) { ++$i; list($ip,$chain) = explode(":",$key); - + ?>
@@ -83,7 +83,7 @@
 
-
+
diff --git a/web/templates/admin/list_server_info.html b/web/templates/admin/list_server_info.html index 94d5e833d..53dc2185b 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/footer.html b/web/templates/footer.html
index b67ab41b8..96526fa1b 100644
--- a/web/templates/footer.html
+++ b/web/templates/footer.html
@@ -8,16 +8,16 @@
     
     
 
-    
 
-    
+
+
+    
+    
diff --git a/web/templates/admin/add_package.js.html b/web/templates/admin/add_package.js.html
deleted file mode 100644
index 9c580fb16..000000000
--- a/web/templates/admin/add_package.js.html
+++ /dev/null
@@ -1,30 +0,0 @@
-  
-  
diff --git a/web/templates/admin/add_user.html b/web/templates/admin/add_user.html
index e469a4dcb..aafdf2534 100644
--- a/web/templates/admin/add_user.html
+++ b/web/templates/admin/add_user.html
@@ -169,3 +169,23 @@
             
         
     
+ + + diff --git a/web/templates/admin/add_user.js.html b/web/templates/admin/add_user.js.html deleted file mode 100644 index 3a79e6f88..000000000 --- a/web/templates/admin/add_user.js.html +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/web/templates/admin/add_web.html b/web/templates/admin/add_web.html index 15b108fdf..5b9ecf478 100644 --- a/web/templates/admin/add_web.html +++ b/web/templates/admin/add_web.html @@ -388,3 +388,50 @@
+ + + + diff --git a/web/templates/admin/add_web.js.html b/web/templates/admin/add_web.js.html deleted file mode 100644 index 891100e1c..000000000 --- a/web/templates/admin/add_web.js.html +++ /dev/null @@ -1,45 +0,0 @@ - - diff --git a/web/templates/admin/edit_db.html b/web/templates/admin/edit_db.html index 6e71678b0..1b27ab386 100644 --- a/web/templates/admin/edit_db.html +++ b/web/templates/admin/edit_db.html @@ -124,3 +124,26 @@
+ + + + diff --git a/web/templates/admin/edit_db.js.html b/web/templates/admin/edit_db.js.html deleted file mode 100644 index c8938bea1..000000000 --- a/web/templates/admin/edit_db.js.html +++ /dev/null @@ -1,21 +0,0 @@ - - diff --git a/web/templates/admin/edit_firewall.html b/web/templates/admin/edit_firewall.html index 6f144ebbd..1b6bf359c 100644 --- a/web/templates/admin/edit_firewall.html +++ b/web/templates/admin/edit_firewall.html @@ -119,3 +119,11 @@
+ + + diff --git a/web/templates/admin/edit_firewall.js.html b/web/templates/admin/edit_firewall.js.html deleted file mode 100644 index 434b66e68..000000000 --- a/web/templates/admin/edit_firewall.js.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/web/templates/admin/edit_ip.html b/web/templates/admin/edit_ip.html index c9ea2c723..811457b30 100644 --- a/web/templates/admin/edit_ip.html +++ b/web/templates/admin/edit_ip.html @@ -142,3 +142,11 @@ + + + diff --git a/web/templates/admin/edit_ip.js.html b/web/templates/admin/edit_ip.js.html deleted file mode 100644 index 434b66e68..000000000 --- a/web/templates/admin/edit_ip.js.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/web/templates/admin/edit_mail_acc.html b/web/templates/admin/edit_mail_acc.html index 24c76e6dd..52b66d7bf 100644 --- a/web/templates/admin/edit_mail_acc.html +++ b/web/templates/admin/edit_mail_acc.html @@ -141,3 +141,23 @@ + + + + diff --git a/web/templates/admin/edit_mail_acc.js.html b/web/templates/admin/edit_mail_acc.js.html deleted file mode 100644 index ee6fc04ea..000000000 --- a/web/templates/admin/edit_mail_acc.js.html +++ /dev/null @@ -1,18 +0,0 @@ - - diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html index 343595449..8db168646 100644 --- a/web/templates/admin/edit_package.html +++ b/web/templates/admin/edit_package.html @@ -379,3 +379,36 @@ + + + + diff --git a/web/templates/admin/edit_package.js.html b/web/templates/admin/edit_package.js.html deleted file mode 100644 index 790fe975c..000000000 --- a/web/templates/admin/edit_package.js.html +++ /dev/null @@ -1,31 +0,0 @@ - - diff --git a/web/templates/admin/edit_server.html b/web/templates/admin/edit_server.html index 04a96eada..5272750c6 100644 --- a/web/templates/admin/edit_server.html +++ b/web/templates/admin/edit_server.html @@ -767,3 +767,29 @@ + + + diff --git a/web/templates/admin/edit_server.js.html b/web/templates/admin/edit_server.js.html deleted file mode 100644 index d9512cedc..000000000 --- a/web/templates/admin/edit_server.js.html +++ /dev/null @@ -1,24 +0,0 @@ - diff --git a/web/templates/admin/edit_user.html b/web/templates/admin/edit_user.html index 567db42fb..aa017d41b 100644 --- a/web/templates/admin/edit_user.html +++ b/web/templates/admin/edit_user.html @@ -251,3 +251,46 @@ + + + diff --git a/web/templates/admin/edit_user.js.html b/web/templates/admin/edit_user.js.html deleted file mode 100644 index ef48eec9b..000000000 --- a/web/templates/admin/edit_user.js.html +++ /dev/null @@ -1,41 +0,0 @@ - diff --git a/web/templates/admin/edit_web.html b/web/templates/admin/edit_web.html index 09c9edb3f..f85931866 100644 --- a/web/templates/admin/edit_web.html +++ b/web/templates/admin/edit_web.html @@ -450,3 +450,47 @@ + + + + diff --git a/web/templates/admin/edit_web.js.html b/web/templates/admin/edit_web.js.html deleted file mode 100644 index 59eaf3303..000000000 --- a/web/templates/admin/edit_web.js.html +++ /dev/null @@ -1,42 +0,0 @@ - - diff --git a/web/templates/footer.html b/web/templates/footer.html index bab46cf05..a98c6d1b6 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -1,22 +1,17 @@ + - - - - - - - - + - + + + + + + + diff --git a/web/templates/user/edit_user.html b/web/templates/user/edit_user.html index 2b1b24173..9caa95039 100644 --- a/web/templates/user/edit_user.html +++ b/web/templates/user/edit_user.html @@ -219,3 +219,46 @@ + + + diff --git a/web/templates/user/edit_user.js.html b/web/templates/user/edit_user.js.html deleted file mode 100644 index ef48eec9b..000000000 --- a/web/templates/user/edit_user.js.html +++ /dev/null @@ -1,41 +0,0 @@ - diff --git a/web/templates/user/edit_web.html b/web/templates/user/edit_web.html index 013c24741..a40fe88e8 100644 --- a/web/templates/user/edit_web.html +++ b/web/templates/user/edit_web.html @@ -379,3 +379,47 @@ + + + + diff --git a/web/templates/user/edit_web.js.html b/web/templates/user/edit_web.js.html deleted file mode 100644 index e3776fc20..000000000 --- a/web/templates/user/edit_web.js.html +++ /dev/null @@ -1,42 +0,0 @@ - - From d22a7ae902c8afbae01e574fe3d57686c992da1b Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:03:28 +0200 Subject: [PATCH 197/229] Update ar.php Full Translate for the newly added texts --- web/inc/i18n/ar.php | 210 ++++++++++++++++++++++---------------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/web/inc/i18n/ar.php b/web/inc/i18n/ar.php index 718a23b35..c04b7f3fd 100644 --- a/web/inc/i18n/ar.php +++ b/web/inc/i18n/ar.php @@ -182,7 +182,7 @@ $LANG['ar'] = array( 'Mail Accounts' => 'حسابات البريد', 'Cron Jobs' => 'الوظائق المجدولة', 'SSH Access' => 'دخول SSH', - 'IP Address' => 'IP Address', + 'IP Address' => 'عناوين الأي بي', 'IP Addresses' => 'عنوان IP', 'Backups' => 'نسخ احتياطية', 'Backup System' => 'نظام النسخ الاحتياطي', @@ -194,12 +194,12 @@ $LANG['ar'] = array( 'Proxy Extensions' => 'توسعات بروكسي', 'Web Statistics' => 'إحصائيات الوب', 'Additional FTP Account' => 'حساب FTP إضافي
لا تحتاج حساب إضافي عادة ويتم الدخول باسم المستخدم نفسه', - 'Path' => 'Path', + 'Path' => 'المسار', 'SOA' => 'SOA', 'TTL' => 'TTL', 'Expire' => 'تنقضي', 'Records' => 'سجلات', - 'Serial' => 'Serial', + 'Serial' => 'رقم متسلسل', 'Catchall email' => 'استقبل أي بريد', 'AntiVirus Support' => 'دعم مضاد الفيروسات', 'AntiSpam Support' => 'دعم مضاد البريد المزعج (سبام)', @@ -209,16 +209,16 @@ $LANG['ar'] = 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', + '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' => 'Normal password', + 'Normal password' => 'كلمة مرور طبيعية', 'database' => 'قاعدة بيانات', 'User' => 'المستخدم', 'Host' => 'المضيف', @@ -240,13 +240,13 @@ $LANG['ar'] = array( 'Users' => 'مستخدمين', 'Load Average' => 'متوسط التحميل', 'Memory Usage' => 'استخدام الذاكرة', - 'APACHE2 Usage' => 'APACHE2 Usage', + 'APACHE2 Usage' => 'استخدام APACHE2', 'HTTPD Usage' => 'استخدام نظام بروتوكول نقل النص التشعبي', 'NGINX Usage' => 'NGINX استخدام', 'MySQL Usage on localhost' => 'استخدام قاعدة بيانات MySql على المضيف المحلي', 'PostgreSQL Usage on localhost' => 'PostgreSQL استخدام قاعدة بيانات على المضيف المحلي', 'Bandwidth Usage eth0' => 'eth0 استخدام سعة النطاق على منفذ', - 'Exim Usage' => 'Exim Usage', + 'Exim Usage' => 'استخدام Exim', 'FTP Usage' => 'استخدام FTP', 'SSH Usage' => 'استخدام SSH', 'reverse proxy' => 'بروكسي عكسي', @@ -259,7 +259,7 @@ $LANG['ar'] = array( 'database server' => 'مخدم قاعدة البيانات', 'ftp server' => 'مخدم FTP', 'job scheduler' => 'مجدول الوظائف', - 'firewall' => 'firewall', + 'firewall' => 'جدار النار', 'brute-force monitor' => 'brute-force monitor', 'CPU' => 'المعالج', 'Memory' => 'الذاكرة', @@ -364,8 +364,8 @@ $LANG['ar'] = array( 'ftp user password' => 'كلمة مرور FTP', 'ftp user' => 'مستخدم FTP', 'Last 70 lines of %s.%s.log' => 'آخر 70 سطر في %s.%s.log', - 'AccessLog' => 'AccessLog', - 'ErrorLog' => 'ErrorLog', + 'AccessLog' => 'سجلات الدخول', + 'ErrorLog' => 'سجلات الأخطاء', 'Download AccessLog' => 'تنزيل سجلات الوصول', 'Download ErrorLog' => 'تنزيل سجلات الأخطاء', 'Country' => 'البلد', @@ -380,25 +380,25 @@ $LANG['ar'] = array( 'Banlist' => 'قائمة الحجب', 'ranges are acceptable' => 'نطاقات مقبولة', 'CIDR format is supported' => 'ويدعم صيغة CIDR', - 'ACCEPT' => 'ACCEPT', - 'DROP' => 'DROP', + 'ACCEPT' => 'موافق', + 'DROP' => 'حذف', 'TCP' => 'TCP', 'UDP' => 'UDP', 'ICMP' => 'ICMP', 'SSH' => 'SSH', 'FTP' => 'FTP', - 'VESTA' => 'VESTA', + 'VESTA' => 'فيستا', 'Add one more Name Server' => 'إضافة مخدم أسماء (NS) جديد', - 'web domain' => 'web domain', - 'dns domain' => 'dns domain', - 'dns record' => 'dns record', - 'mail domain' => 'mail domain', - 'mail account' => 'mail account', - 'cron job' => 'cron job', + 'web domain' => 'نطاق ويب', + 'dns domain' => 'نطاق dns', + 'dns record' => 'سجل dns', + 'mail domain' => 'نطاق بريد الكتروني', + 'mail account' => 'حساب بريد الكتروني', + 'cron job' => 'الأعمال المجدولة', - 'cron' => 'cron', - 'user dir' => 'user dir', + 'cron' => 'جدولة', + 'user dir' => 'مجلد المستخدم', 'unlimited' => 'غير محدود', '1 account' => '1 حساب', @@ -415,8 +415,8 @@ $LANG['ar'] = array( '%s cron jobs' => 'وظائف مجدولة %s', '1 archive' => '1 أرشيف', '%s archives' => 'أرشيف %s', - '1 item' => '1 item', - '%s items' => '%s items', + '1 item' => '1 عنصر', + '%s items' => '%s عناصر', '1 package' => '1 حزمة', '%s packages' => 'رزم %s', '1 IP address' => '1 عنوان بروتوكول إنترنت', @@ -429,7 +429,7 @@ $LANG['ar'] = array( '%s objects' => 'عناصر %s', 'no exclusions' => 'لا استثناءات', '1 rule' => '1 قاعدة', - '%s rules' => '%s rules', + '%s rules' => '%s قواعد', 'There are no currently banned IP' => 'لا يوجد عناوين IP المحظورة حاليالا يوجد عناوين IP المحظورة حاليا', 'USER_CREATED_OK' => 'المستخدم %s تم إنشائه بنجاح', @@ -444,7 +444,7 @@ $LANG['ar'] = array( '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 + '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' => 'تم تمكين إعداد التقارير البريد الإلكتروني بنجاح', @@ -519,7 +519,7 @@ $LANG['ar'] = array( 'New Password' => 'كلمة مرور جديدة', 'Confirm Password' => 'تأكيد كلمة المرور', 'Reset' => 'إعادة تعيين', - 'Reset Code' => 'إعادة تعيين الكود', + 'Reset Code' => 'كود إعادة تعيين', 'RESET_NOTICE' => '', // should we add something here? 'RESET_CODE_SENT' => 'لقد تم إرسال كود إعادة تعيين كلمة المرور لعنوان بريدك الإلكتروني
', 'MAIL_RESET_SUBJECT' => 'تم إعادة تعيين كلمة المرور %s', @@ -542,26 +542,26 @@ $LANG['ar'] = array( 'Hostname' => 'اسم المضيف (host)', 'Time Zone' => 'المنطقة الزمنية', 'Default Language' => 'اللغة الافتراضية', - 'Proxy Server' => 'Proxy Server', - 'Web Server' => 'Web Server', - 'Backend Server' => 'Backend Server', + 'Proxy Server' => 'المخدم الوكيل (بروكسي)', + 'Web 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', + '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', @@ -591,12 +591,12 @@ $LANG['ar'] = array( 'NEW DIR' => 'مجلد جديد', 'DELETE' => 'حذف', 'RENAME' => 'إعادة تسمية', - 'RIGHTS' => 'RIGHTS', + 'RIGHTS' => 'الحقوق', 'COPY' => 'نسخ', 'ARCHIVE' => 'ضغط', 'EXTRACT' => 'فك ضغط', 'DOWNLOAD' => 'تنزيل', - 'Are you sure?' => 'Are you sure?', // unused? + 'Are you sure?' => 'هل أنت متأكد ?', // unused? 'Hit' => 'نقر', 'to reload the page' => 'لإعادة تحميل الصفحة', 'Directory name cannot be empty' => 'اسم المجلد يجب ان لايكون فارغ', @@ -611,16 +611,16 @@ $LANG['ar'] = array( 'Copy' => 'نسخ', 'Cancel' => 'إلغاء', 'Rename' => 'إعادة تسمية', - 'Change Rights' => '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', + 'YOU ARE COPYING' => 'تقوم بالنسخ ', // unused? + 'YOU ARE REMOVING' => 'تقوم بالحذف', + 'Delete items' => 'حذف العناصر', + 'Copy files' => 'نسخ الملفات', 'Are you sure you want to copy' => 'هل أنت متأكد أنك تريد نسخ', 'Are you sure you want to delete' => 'هل انت متأكد أنك تريد حذف', 'into' => 'إلى', @@ -630,17 +630,17 @@ $LANG['ar'] = array( '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', + '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', + 'Shortcuts' => 'اختصارات', 'Add New object' => 'إضافة جديد', 'Save Form' => 'نموذج الحفظ', 'Cancel saving form' => 'إلغاء نموذج الحفظ', @@ -656,8 +656,8 @@ $LANG['ar'] = array( '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', + 'Move up through elements list' => 'انتقل للأعلى خلال لائحة العناصر', + 'Move down through elements list' => 'انتقل للأسفل خلال لائحة العناصر', 'Upload' => 'رفع', 'New File' => 'ملف جديد', @@ -682,49 +682,49 @@ $LANG['ar'] = array( 'shortcuts are inspired by magnificent GNU Midnight Commander file manager' => 'الاختصارات الهمت من قبل ال 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.', - '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', + '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', + 'webalizer' => 'محلل الويب webalizer', + 'awstats' => 'احصائيات الويب awstats', // Texts below doesn't exist in en.php '%s rule' => 'قواعد %s', 'MainDomain' => 'النطاق الرئيسي', 'SubDomain' => 'النطاق الفرعي (الجزء الاول الذي يضاف إلى النطاق الرئيسي)', - 'Add Sub Domain' => 'إضافة نطاق فرعي', + 'Add Sub Domain' => 'إضافة نطاق فرعي' ); From 19e54dd38f49e1f5f46e1c8a7d900608a8cc446a Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:15:54 +0200 Subject: [PATCH 198/229] Update vsftpd.conf --- install/rhel/5/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/rhel/5/vsftpd/vsftpd.conf b/install/rhel/5/vsftpd/vsftpd.conf index 7a986aff0..3820facb4 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 From 01bea04cd454ac0793c9b175b6749fda1253a04d Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:16:19 +0200 Subject: [PATCH 199/229] Update vsftpd.conf --- install/rhel/6/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/rhel/6/vsftpd/vsftpd.conf b/install/rhel/6/vsftpd/vsftpd.conf index 7a986aff0..3820facb4 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 From c177f164d49b4cb903da900cd04ee499ca568d91 Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:16:41 +0200 Subject: [PATCH 200/229] Update vsftpd.conf --- install/rhel/7/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/rhel/7/vsftpd/vsftpd.conf b/install/rhel/7/vsftpd/vsftpd.conf index 4673c838d..d8f38c153 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 From b76575bef380b87e95fbe283af80599f75133713 Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:17:06 +0200 Subject: [PATCH 201/229] Update vsftpd.conf --- install/ubuntu/12.04/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/ubuntu/12.04/vsftpd/vsftpd.conf b/install/ubuntu/12.04/vsftpd/vsftpd.conf index 0902899e7..55e1c32e8 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 From 374dc9e905723c58fc1f9c680127343b4b39fdee Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:17:23 +0200 Subject: [PATCH 202/229] Update vsftpd.conf --- install/ubuntu/12.10/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/ubuntu/12.10/vsftpd/vsftpd.conf b/install/ubuntu/12.10/vsftpd/vsftpd.conf index 0902899e7..55e1c32e8 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 From d973ea897234975cf0134f1659b9ce1d898a5bf9 Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:17:39 +0200 Subject: [PATCH 203/229] Update vsftpd.conf --- install/ubuntu/13.04/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/ubuntu/13.04/vsftpd/vsftpd.conf b/install/ubuntu/13.04/vsftpd/vsftpd.conf index 0902899e7..55e1c32e8 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 From 08c471022220f4cbfe76e3b0906504fb86558052 Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:17:58 +0200 Subject: [PATCH 204/229] Update vsftpd.conf --- install/ubuntu/13.10/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/ubuntu/13.10/vsftpd/vsftpd.conf b/install/ubuntu/13.10/vsftpd/vsftpd.conf index 0902899e7..55e1c32e8 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 From db1aa70d18a7d37636588f008f15e3c71ea6382b Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:18:22 +0200 Subject: [PATCH 205/229] Update vsftpd.conf --- install/ubuntu/14.04/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/ubuntu/14.04/vsftpd/vsftpd.conf b/install/ubuntu/14.04/vsftpd/vsftpd.conf index 0902899e7..55e1c32e8 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 From 6f691bc62d875df2d2dd8571482dbc5393653806 Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:18:40 +0200 Subject: [PATCH 206/229] Update vsftpd.conf --- install/ubuntu/14.10/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/ubuntu/14.10/vsftpd/vsftpd.conf b/install/ubuntu/14.10/vsftpd/vsftpd.conf index 0902899e7..55e1c32e8 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 From 39192a7c467060bec2420758c2f021cdb0597819 Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:18:57 +0200 Subject: [PATCH 207/229] Update vsftpd.conf --- install/ubuntu/15.04/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/ubuntu/15.04/vsftpd/vsftpd.conf b/install/ubuntu/15.04/vsftpd/vsftpd.conf index 0902899e7..55e1c32e8 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 From 947f48fb0879e63e0a7c5759cf3e283496280944 Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:19:15 +0200 Subject: [PATCH 208/229] Update vsftpd.conf --- install/ubuntu/15.10/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/ubuntu/15.10/vsftpd/vsftpd.conf b/install/ubuntu/15.10/vsftpd/vsftpd.conf index 0902899e7..55e1c32e8 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 From eb86b95e79cce006d9bf0274bdb39167b2dd3a3a Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Wed, 6 Jul 2016 03:29:20 +0200 Subject: [PATCH 209/229] Update vsftpd.conf --- install/debian/7/vsftpd/vsftpd.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/debian/7/vsftpd/vsftpd.conf b/install/debian/7/vsftpd/vsftpd.conf index 0902899e7..55e1c32e8 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 From a9e2abb683158dea65e399945f7030b88faec961 Mon Sep 17 00:00:00 2001 From: Orwah Issa Date: Thu, 7 Jul 2016 19:30:23 +0200 Subject: [PATCH 210/229] Update footer.html keep language qutes --- web/templates/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/templates/footer.html b/web/templates/footer.html index bd44a61bd..ca48e4b7f 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -1,12 +1,12 @@ -