Skip to content

Commit ebe8173

Browse files
committed
Merge branch 'master' of github.com:serghey-rodin/vesta
2 parents 83b7110 + f871faf commit ebe8173

File tree

15 files changed

+141
-46
lines changed

15 files changed

+141
-46
lines changed

bin/v-update-sys-ip-counters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ for ip in $ip_list; do
4545

4646
# Calculate usage
4747
ip_usage=$(grep -H $ip $VESTA/data/users/*/web.conf)
48-
web_domains=$(echo "$ip_usage"| wc -l)
48+
web_domains=$(echo "$ip_usage" | sed '/^$/d' | wc -l)
4949
sys_users=$(echo "$ip_usage" | cut -f7 -d/ | sort -u |\
5050
tr '\n' ',' | sed "s/,$//g")
5151

install/debian/exim4.conf.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ acl_check_rcpt:
108108
require message = relay not permitted
109109
domains = +local_domains : +relay_to_domains
110110

111-
deny message = smtp auth requried
111+
deny message = smtp auth required
112112
sender_domains = +local_domains
113113
!authenticated = *
114114

install/debian/whmcs-module.php

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ function vesta_CreateAccount($params) {
4343
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
4444
$answer = curl_exec($curl);
4545

46+
logModuleCall('vesta','CreateAccount_UserAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
47+
4648
// Enable ssh access
4749
if(($answer == 'OK') && ($params["configoption2"] == 'on')) {
4850
$postvars = array(
@@ -62,6 +64,8 @@ function vesta_CreateAccount($params) {
6264
curl_setopt($curl, CURLOPT_POST, true);
6365
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
6466
$answer = curl_exec($curl);
67+
68+
logModuleCall('vesta','CreateAccount_EnableSSH','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
6569
}
6670

6771
// Add domain
@@ -84,6 +88,8 @@ function vesta_CreateAccount($params) {
8488
curl_setopt($curl, CURLOPT_POST, true);
8589
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
8690
$answer = curl_exec($curl);
91+
92+
logModuleCall('vesta','CreateAccount_AddDomain','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
8793
}
8894
}
8995

@@ -92,8 +98,8 @@ function vesta_CreateAccount($params) {
9298
} else {
9399
$result = $answer;
94100
}
95-
return $result;
96101

102+
return $result;
97103
}
98104

99105
function vesta_TerminateAccount($params) {
@@ -122,14 +128,15 @@ function vesta_TerminateAccount($params) {
122128
$answer = curl_exec($curl);
123129
}
124130

131+
logModuleCall('vesta','TerminateAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
132+
125133
if($answer == 'OK') {
126134
$result = "success";
127135
} else {
128136
$result = $answer;
129137
}
130138

131139
return $result;
132-
133140
}
134141

135142
function vesta_SuspendAccount($params) {
@@ -158,12 +165,15 @@ function vesta_SuspendAccount($params) {
158165
$answer = curl_exec($curl);
159166
}
160167

168+
logModuleCall('vesta','SuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
169+
161170
if($answer == 'OK') {
162171
$result = "success";
163172
} else {
164173
$result = $answer;
165174
}
166175

176+
return $result;
167177
}
168178

169179
function vesta_UnsuspendAccount($params) {
@@ -192,12 +202,15 @@ function vesta_UnsuspendAccount($params) {
192202
$answer = curl_exec($curl);
193203
}
194204

205+
logModuleCall('vesta','UnsuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
206+
195207
if($answer == 'OK') {
196208
$result = "success";
197209
} else {
198210
$result = $answer;
199211
}
200212

213+
return $result;
201214
}
202215

203216
function vesta_ChangePassword($params) {
@@ -227,13 +240,15 @@ function vesta_ChangePassword($params) {
227240
$answer = curl_exec($curl);
228241
}
229242

243+
logModuleCall('vesta','ChangePassword','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
244+
230245
if($answer == 'OK') {
231246
$result = "success";
232247
} else {
233248
$result = $answer;
234249
}
250+
235251
return $result;
236-
237252
}
238253

239254
function vesta_ChangePackage($params) {
@@ -263,13 +278,15 @@ function vesta_ChangePackage($params) {
263278
$answer = curl_exec($curl);
264279
}
265280

281+
logModuleCall('vesta','ChangePackage','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
282+
266283
if($answer == 'OK') {
267284
$result = "success";
268285
} else {
269286
$result = $answer;
270287
}
271-
return $result;
272288

289+
return $result;
273290
}
274291

275292
function vesta_ClientArea($params) {

install/rhel/exim.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ acl_check_rcpt:
108108
require message = relay not permitted
109109
domains = +local_domains : +relay_to_domains
110110

111-
deny message = smtp auth requried
111+
deny message = smtp auth required
112112
sender_domains = +local_domains
113113
!authenticated = *
114114

install/rhel/whmcs-module.php

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ function vesta_CreateAccount($params) {
4343
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
4444
$answer = curl_exec($curl);
4545

46+
logModuleCall('vesta','CreateAccount_UserAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
47+
4648
// Enable ssh access
4749
if(($answer == 'OK') && ($params["configoption2"] == 'on')) {
4850
$postvars = array(
@@ -62,6 +64,8 @@ function vesta_CreateAccount($params) {
6264
curl_setopt($curl, CURLOPT_POST, true);
6365
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
6466
$answer = curl_exec($curl);
67+
68+
logModuleCall('vesta','CreateAccount_EnableSSH','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
6569
}
6670

6771
// Add domain
@@ -84,6 +88,8 @@ function vesta_CreateAccount($params) {
8488
curl_setopt($curl, CURLOPT_POST, true);
8589
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
8690
$answer = curl_exec($curl);
91+
92+
logModuleCall('vesta','CreateAccount_AddDomain','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
8793
}
8894
}
8995

@@ -92,8 +98,8 @@ function vesta_CreateAccount($params) {
9298
} else {
9399
$result = $answer;
94100
}
95-
return $result;
96101

102+
return $result;
97103
}
98104

99105
function vesta_TerminateAccount($params) {
@@ -122,14 +128,15 @@ function vesta_TerminateAccount($params) {
122128
$answer = curl_exec($curl);
123129
}
124130

131+
logModuleCall('vesta','TerminateAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
132+
125133
if($answer == 'OK') {
126134
$result = "success";
127135
} else {
128136
$result = $answer;
129137
}
130138

131139
return $result;
132-
133140
}
134141

135142
function vesta_SuspendAccount($params) {
@@ -158,12 +165,15 @@ function vesta_SuspendAccount($params) {
158165
$answer = curl_exec($curl);
159166
}
160167

168+
logModuleCall('vesta','SuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
169+
161170
if($answer == 'OK') {
162171
$result = "success";
163172
} else {
164173
$result = $answer;
165174
}
166175

176+
return $result;
167177
}
168178

169179
function vesta_UnsuspendAccount($params) {
@@ -192,12 +202,15 @@ function vesta_UnsuspendAccount($params) {
192202
$answer = curl_exec($curl);
193203
}
194204

205+
logModuleCall('vesta','UnsuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
206+
195207
if($answer == 'OK') {
196208
$result = "success";
197209
} else {
198210
$result = $answer;
199211
}
200212

213+
return $result;
201214
}
202215

203216
function vesta_ChangePassword($params) {
@@ -227,13 +240,15 @@ function vesta_ChangePassword($params) {
227240
$answer = curl_exec($curl);
228241
}
229242

243+
logModuleCall('vesta','ChangePassword','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
244+
230245
if($answer == 'OK') {
231246
$result = "success";
232247
} else {
233248
$result = $answer;
234249
}
250+
235251
return $result;
236-
237252
}
238253

239254
function vesta_ChangePackage($params) {
@@ -263,13 +278,15 @@ function vesta_ChangePackage($params) {
263278
$answer = curl_exec($curl);
264279
}
265280

281+
logModuleCall('vesta','ChangePackage','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
282+
266283
if($answer == 'OK') {
267284
$result = "success";
268285
} else {
269286
$result = $answer;
270287
}
271-
return $result;
272288

289+
return $result;
273290
}
274291

275292
function vesta_ClientArea($params) {

install/ubuntu/exim4.conf.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ acl_check_rcpt:
108108
require message = relay not permitted
109109
domains = +local_domains : +relay_to_domains
110110

111-
deny message = smtp auth requried
111+
deny message = smtp auth required
112112
sender_domains = +local_domains
113113
!authenticated = *
114114

install/ubuntu/whmcs-module.php

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ function vesta_CreateAccount($params) {
4343
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
4444
$answer = curl_exec($curl);
4545

46+
logModuleCall('vesta','CreateAccount_UserAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
47+
4648
// Enable ssh access
4749
if(($answer == 'OK') && ($params["configoption2"] == 'on')) {
4850
$postvars = array(
@@ -62,6 +64,8 @@ function vesta_CreateAccount($params) {
6264
curl_setopt($curl, CURLOPT_POST, true);
6365
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
6466
$answer = curl_exec($curl);
67+
68+
logModuleCall('vesta','CreateAccount_EnableSSH','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
6569
}
6670

6771
// Add domain
@@ -84,6 +88,8 @@ function vesta_CreateAccount($params) {
8488
curl_setopt($curl, CURLOPT_POST, true);
8589
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
8690
$answer = curl_exec($curl);
91+
92+
logModuleCall('vesta','CreateAccount_AddDomain','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
8793
}
8894
}
8995

@@ -92,8 +98,8 @@ function vesta_CreateAccount($params) {
9298
} else {
9399
$result = $answer;
94100
}
95-
return $result;
96101

102+
return $result;
97103
}
98104

99105
function vesta_TerminateAccount($params) {
@@ -122,14 +128,15 @@ function vesta_TerminateAccount($params) {
122128
$answer = curl_exec($curl);
123129
}
124130

131+
logModuleCall('vesta','TerminateAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
132+
125133
if($answer == 'OK') {
126134
$result = "success";
127135
} else {
128136
$result = $answer;
129137
}
130138

131139
return $result;
132-
133140
}
134141

135142
function vesta_SuspendAccount($params) {
@@ -158,12 +165,15 @@ function vesta_SuspendAccount($params) {
158165
$answer = curl_exec($curl);
159166
}
160167

168+
logModuleCall('vesta','SuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
169+
161170
if($answer == 'OK') {
162171
$result = "success";
163172
} else {
164173
$result = $answer;
165174
}
166175

176+
return $result;
167177
}
168178

169179
function vesta_UnsuspendAccount($params) {
@@ -192,12 +202,15 @@ function vesta_UnsuspendAccount($params) {
192202
$answer = curl_exec($curl);
193203
}
194204

205+
logModuleCall('vesta','UnsuspendAccount','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
206+
195207
if($answer == 'OK') {
196208
$result = "success";
197209
} else {
198210
$result = $answer;
199211
}
200212

213+
return $result;
201214
}
202215

203216
function vesta_ChangePassword($params) {
@@ -227,13 +240,15 @@ function vesta_ChangePassword($params) {
227240
$answer = curl_exec($curl);
228241
}
229242

243+
logModuleCall('vesta','ChangePassword','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
244+
230245
if($answer == 'OK') {
231246
$result = "success";
232247
} else {
233248
$result = $answer;
234249
}
250+
235251
return $result;
236-
237252
}
238253

239254
function vesta_ChangePackage($params) {
@@ -263,13 +278,15 @@ function vesta_ChangePackage($params) {
263278
$answer = curl_exec($curl);
264279
}
265280

281+
logModuleCall('vesta','ChangePackage','https://'.$params["serverhostname"].':8083/api/'.$postdata,$answer);
282+
266283
if($answer == 'OK') {
267284
$result = "success";
268285
} else {
269286
$result = $answer;
270287
}
271-
return $result;
272288

289+
return $result;
273290
}
274291

275292
function vesta_ClientArea($params) {

0 commit comments

Comments
 (0)