Skip to content

Commit 43fff54

Browse files
added socat localhost proxy
1 parent 2c57c21 commit 43fff54

File tree

138 files changed

+1113
-449
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+1113
-449
lines changed

5.1.0/config.inc.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,23 @@
9999
}
100100
}
101101

102-
// Update $site_URL using VT_SITE_URL envrionment varible
102+
// Update $site_URL using VT_SITE_URL environment variable
103103
$site_URL = 'http'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/';
104104

105+
// Store $site_URL on /tmp for system services
106+
if ($_SERVER['HTTP_HOST']) {
107+
$site_URL_file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'vtiger_site_URL';
108+
if (!file_exists($site_URL_file) || filemtime($site_URL_file) + 3600 < time()) {
109+
file_put_contents($site_URL_file, $site_URL);
110+
$port = parse_url('http://'.$_SERVER['HTTP_HOST'], PHP_URL_PORT);
111+
if ($_SERVER['HTTPS'] === 'on' && $port != 443) {
112+
file_put_contents(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'https_localhost_proxy', 'tcp-listen:'.$port.',reuseaddr,fork tcp:localhost:443');
113+
} elseif ($port != 80) {
114+
file_put_contents(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'http_localhost_proxy', 'tcp-listen:'.$port.',reuseaddr,fork tcp:localhost:80');
115+
}
116+
}
117+
}
118+
105119
// url for customer portal (Example: http://vtiger.com/portal)
106120
$PORTAL_URL = $site_URL.'/customerportal';
107121

5.1.0/crontab

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2-
* * * * * root date +\%s > /run/crond.ts
3-
* * * * * root vtiger-cron.sh
2+
* * * * * root vtiger-cron.sh ts
3+
* * * * * root vtiger-cron.sh vtiger
4+
* * * * * root vtiger-cron.sh localhost_proxy

5.1.0/vtiger-cron.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,18 @@ source /run/crond.env
66
log_file=cron.log
77
log_dir=/var/www/html/logs
88

9-
/var/www/html/cron/vtigercron.sh >> ${log_dir}/${log_file} 2>&1
10-
find "${log_dir}/" -iname "${log_file}" -size +1M -exec mv {} {}.$(date +%s) \;
9+
case "$1" in
10+
ts)
11+
date +%s > /run/crond.ts
12+
;;
13+
vtiger)
14+
echo "====[ vtiger cron ]===="
15+
/var/www/html/cron/vtigercron.sh >> ${log_dir}/${log_file} 2>&1
16+
find "${log_dir}/" -iname "${log_file}" -size +1M -exec mv {} {}.$(date +%s) \;
17+
;;
18+
localhost_proxy)
19+
echo "====[ localhost proxy ]===="
20+
if [[ -f /tmp/http_localhost_proxy ]]; then socat $(cat /tmp/http_localhost_proxy) & fi
21+
if [[ -f /tmp/https_localhost_proxy ]]; then socat $(cat /tmp/https_localhost_proxy) & fi
22+
;;
23+
esac

5.1.0/vtiger-install.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@
122122
[
123123
'__vtrftk' => $vtrftk,
124124
'packages[Tools]' => 'on',
125-
'packages[Sales]' => '',
126-
'packages[Marketing]' => '',
127-
'packages[Support]' => '',
128-
'packages[Inventory]' => '',
129-
'packages[Project]' => '',
125+
'packages[Sales]' => 'on',
126+
'packages[Marketing]' => 'on',
127+
'packages[Support]' => 'on',
128+
'packages[Inventory]' => 'on',
129+
'packages[Project]' => 'on',
130130
],
131131
['__vtrftk']
132132
);

5.1.0/vtiger-install.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,8 @@ if [[ $@ == *'--remove-mysql'* ]]; then
8282
apt-get --yes autoremove --purge && apt-get autoclean
8383
deluser --remove-home mysql && true
8484
delgroup mysql && true
85-
rm -rf /etc/apparmor.d/abstractions/mysql
86-
rm -rf /etc/apparmor.d/cache/usr.sbin.mysqld
87-
rm -rf /etc/mysql
88-
rm -rf /var/lib/mysql
89-
rm -rf /var/log/mysql*
90-
rm -rf /var/log/upstart/mysql.log*
91-
rm -rf /var/run/mysqld
85+
rm -rf \
86+
/etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql \
87+
/var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld \
88+
/tmp/* /var/tmp/* /var/lib/apt/lists/*
9289
fi

5.2.0-RC/config.inc.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,23 @@
9999
}
100100
}
101101

102-
// Update $site_URL using VT_SITE_URL envrionment varible
102+
// Update $site_URL using VT_SITE_URL environment variable
103103
$site_URL = 'http'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/';
104104

105+
// Store $site_URL on /tmp for system services
106+
if ($_SERVER['HTTP_HOST']) {
107+
$site_URL_file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'vtiger_site_URL';
108+
if (!file_exists($site_URL_file) || filemtime($site_URL_file) + 3600 < time()) {
109+
file_put_contents($site_URL_file, $site_URL);
110+
$port = parse_url('http://'.$_SERVER['HTTP_HOST'], PHP_URL_PORT);
111+
if ($_SERVER['HTTPS'] === 'on' && $port != 443) {
112+
file_put_contents(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'https_localhost_proxy', 'tcp-listen:'.$port.',reuseaddr,fork tcp:localhost:443');
113+
} elseif ($port != 80) {
114+
file_put_contents(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'http_localhost_proxy', 'tcp-listen:'.$port.',reuseaddr,fork tcp:localhost:80');
115+
}
116+
}
117+
}
118+
105119
// url for customer portal (Example: http://vtiger.com/portal)
106120
$PORTAL_URL = $site_URL.'/customerportal';
107121

5.2.0-RC/crontab

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2-
* * * * * root date +\%s > /run/crond.ts
3-
* * * * * root vtiger-cron.sh
2+
* * * * * root vtiger-cron.sh ts
3+
* * * * * root vtiger-cron.sh vtiger
4+
* * * * * root vtiger-cron.sh localhost_proxy

5.2.0-RC/vtiger-cron.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,18 @@ source /run/crond.env
66
log_file=cron.log
77
log_dir=/var/www/html/logs
88

9-
/var/www/html/cron/vtigercron.sh >> ${log_dir}/${log_file} 2>&1
10-
find "${log_dir}/" -iname "${log_file}" -size +1M -exec mv {} {}.$(date +%s) \;
9+
case "$1" in
10+
ts)
11+
date +%s > /run/crond.ts
12+
;;
13+
vtiger)
14+
echo "====[ vtiger cron ]===="
15+
/var/www/html/cron/vtigercron.sh >> ${log_dir}/${log_file} 2>&1
16+
find "${log_dir}/" -iname "${log_file}" -size +1M -exec mv {} {}.$(date +%s) \;
17+
;;
18+
localhost_proxy)
19+
echo "====[ localhost proxy ]===="
20+
if [[ -f /tmp/http_localhost_proxy ]]; then socat $(cat /tmp/http_localhost_proxy) & fi
21+
if [[ -f /tmp/https_localhost_proxy ]]; then socat $(cat /tmp/https_localhost_proxy) & fi
22+
;;
23+
esac

5.2.0-RC/vtiger-install.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@
122122
[
123123
'__vtrftk' => $vtrftk,
124124
'packages[Tools]' => 'on',
125-
'packages[Sales]' => '',
126-
'packages[Marketing]' => '',
127-
'packages[Support]' => '',
128-
'packages[Inventory]' => '',
129-
'packages[Project]' => '',
125+
'packages[Sales]' => 'on',
126+
'packages[Marketing]' => 'on',
127+
'packages[Support]' => 'on',
128+
'packages[Inventory]' => 'on',
129+
'packages[Project]' => 'on',
130130
],
131131
['__vtrftk']
132132
);

5.2.0-RC/vtiger-install.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,8 @@ if [[ $@ == *'--remove-mysql'* ]]; then
8282
apt-get --yes autoremove --purge && apt-get autoclean
8383
deluser --remove-home mysql && true
8484
delgroup mysql && true
85-
rm -rf /etc/apparmor.d/abstractions/mysql
86-
rm -rf /etc/apparmor.d/cache/usr.sbin.mysqld
87-
rm -rf /etc/mysql
88-
rm -rf /var/lib/mysql
89-
rm -rf /var/log/mysql*
90-
rm -rf /var/log/upstart/mysql.log*
91-
rm -rf /var/run/mysqld
85+
rm -rf \
86+
/etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql \
87+
/var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld \
88+
/tmp/* /var/tmp/* /var/lib/apt/lists/*
9289
fi

5.2.0-VB1/config.inc.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,23 @@
9999
}
100100
}
101101

102-
// Update $site_URL using VT_SITE_URL envrionment varible
102+
// Update $site_URL using VT_SITE_URL environment variable
103103
$site_URL = 'http'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/';
104104

105+
// Store $site_URL on /tmp for system services
106+
if ($_SERVER['HTTP_HOST']) {
107+
$site_URL_file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'vtiger_site_URL';
108+
if (!file_exists($site_URL_file) || filemtime($site_URL_file) + 3600 < time()) {
109+
file_put_contents($site_URL_file, $site_URL);
110+
$port = parse_url('http://'.$_SERVER['HTTP_HOST'], PHP_URL_PORT);
111+
if ($_SERVER['HTTPS'] === 'on' && $port != 443) {
112+
file_put_contents(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'https_localhost_proxy', 'tcp-listen:'.$port.',reuseaddr,fork tcp:localhost:443');
113+
} elseif ($port != 80) {
114+
file_put_contents(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'http_localhost_proxy', 'tcp-listen:'.$port.',reuseaddr,fork tcp:localhost:80');
115+
}
116+
}
117+
}
118+
105119
// url for customer portal (Example: http://vtiger.com/portal)
106120
$PORTAL_URL = $site_URL.'/customerportal';
107121

5.2.0-VB1/crontab

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2-
* * * * * root date +\%s > /run/crond.ts
3-
* * * * * root vtiger-cron.sh
2+
* * * * * root vtiger-cron.sh ts
3+
* * * * * root vtiger-cron.sh vtiger
4+
* * * * * root vtiger-cron.sh localhost_proxy

5.2.0-VB1/vtiger-cron.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,18 @@ source /run/crond.env
66
log_file=cron.log
77
log_dir=/var/www/html/logs
88

9-
/var/www/html/cron/vtigercron.sh >> ${log_dir}/${log_file} 2>&1
10-
find "${log_dir}/" -iname "${log_file}" -size +1M -exec mv {} {}.$(date +%s) \;
9+
case "$1" in
10+
ts)
11+
date +%s > /run/crond.ts
12+
;;
13+
vtiger)
14+
echo "====[ vtiger cron ]===="
15+
/var/www/html/cron/vtigercron.sh >> ${log_dir}/${log_file} 2>&1
16+
find "${log_dir}/" -iname "${log_file}" -size +1M -exec mv {} {}.$(date +%s) \;
17+
;;
18+
localhost_proxy)
19+
echo "====[ localhost proxy ]===="
20+
if [[ -f /tmp/http_localhost_proxy ]]; then socat $(cat /tmp/http_localhost_proxy) & fi
21+
if [[ -f /tmp/https_localhost_proxy ]]; then socat $(cat /tmp/https_localhost_proxy) & fi
22+
;;
23+
esac

5.2.0-VB1/vtiger-install.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@
122122
[
123123
'__vtrftk' => $vtrftk,
124124
'packages[Tools]' => 'on',
125-
'packages[Sales]' => '',
126-
'packages[Marketing]' => '',
127-
'packages[Support]' => '',
128-
'packages[Inventory]' => '',
129-
'packages[Project]' => '',
125+
'packages[Sales]' => 'on',
126+
'packages[Marketing]' => 'on',
127+
'packages[Support]' => 'on',
128+
'packages[Inventory]' => 'on',
129+
'packages[Project]' => 'on',
130130
],
131131
['__vtrftk']
132132
);

5.2.0-VB1/vtiger-install.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,8 @@ if [[ $@ == *'--remove-mysql'* ]]; then
8282
apt-get --yes autoremove --purge && apt-get autoclean
8383
deluser --remove-home mysql && true
8484
delgroup mysql && true
85-
rm -rf /etc/apparmor.d/abstractions/mysql
86-
rm -rf /etc/apparmor.d/cache/usr.sbin.mysqld
87-
rm -rf /etc/mysql
88-
rm -rf /var/lib/mysql
89-
rm -rf /var/log/mysql*
90-
rm -rf /var/log/upstart/mysql.log*
91-
rm -rf /var/run/mysqld
85+
rm -rf \
86+
/etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql \
87+
/var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld \
88+
/tmp/* /var/tmp/* /var/lib/apt/lists/*
9289
fi

5.2.0-VB2/config.inc.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,23 @@
9999
}
100100
}
101101

102-
// Update $site_URL using VT_SITE_URL envrionment varible
102+
// Update $site_URL using VT_SITE_URL environment variable
103103
$site_URL = 'http'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/';
104104

105+
// Store $site_URL on /tmp for system services
106+
if ($_SERVER['HTTP_HOST']) {
107+
$site_URL_file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'vtiger_site_URL';
108+
if (!file_exists($site_URL_file) || filemtime($site_URL_file) + 3600 < time()) {
109+
file_put_contents($site_URL_file, $site_URL);
110+
$port = parse_url('http://'.$_SERVER['HTTP_HOST'], PHP_URL_PORT);
111+
if ($_SERVER['HTTPS'] === 'on' && $port != 443) {
112+
file_put_contents(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'https_localhost_proxy', 'tcp-listen:'.$port.',reuseaddr,fork tcp:localhost:443');
113+
} elseif ($port != 80) {
114+
file_put_contents(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'http_localhost_proxy', 'tcp-listen:'.$port.',reuseaddr,fork tcp:localhost:80');
115+
}
116+
}
117+
}
118+
105119
// url for customer portal (Example: http://vtiger.com/portal)
106120
$PORTAL_URL = $site_URL.'/customerportal';
107121

5.2.0-VB2/crontab

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2-
* * * * * root date +\%s > /run/crond.ts
3-
* * * * * root vtiger-cron.sh
2+
* * * * * root vtiger-cron.sh ts
3+
* * * * * root vtiger-cron.sh vtiger
4+
* * * * * root vtiger-cron.sh localhost_proxy

5.2.0-VB2/vtiger-cron.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,18 @@ source /run/crond.env
66
log_file=cron.log
77
log_dir=/var/www/html/logs
88

9-
/var/www/html/cron/vtigercron.sh >> ${log_dir}/${log_file} 2>&1
10-
find "${log_dir}/" -iname "${log_file}" -size +1M -exec mv {} {}.$(date +%s) \;
9+
case "$1" in
10+
ts)
11+
date +%s > /run/crond.ts
12+
;;
13+
vtiger)
14+
echo "====[ vtiger cron ]===="
15+
/var/www/html/cron/vtigercron.sh >> ${log_dir}/${log_file} 2>&1
16+
find "${log_dir}/" -iname "${log_file}" -size +1M -exec mv {} {}.$(date +%s) \;
17+
;;
18+
localhost_proxy)
19+
echo "====[ localhost proxy ]===="
20+
if [[ -f /tmp/http_localhost_proxy ]]; then socat $(cat /tmp/http_localhost_proxy) & fi
21+
if [[ -f /tmp/https_localhost_proxy ]]; then socat $(cat /tmp/https_localhost_proxy) & fi
22+
;;
23+
esac

5.2.0-VB2/vtiger-install.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@
122122
[
123123
'__vtrftk' => $vtrftk,
124124
'packages[Tools]' => 'on',
125-
'packages[Sales]' => '',
126-
'packages[Marketing]' => '',
127-
'packages[Support]' => '',
128-
'packages[Inventory]' => '',
129-
'packages[Project]' => '',
125+
'packages[Sales]' => 'on',
126+
'packages[Marketing]' => 'on',
127+
'packages[Support]' => 'on',
128+
'packages[Inventory]' => 'on',
129+
'packages[Project]' => 'on',
130130
],
131131
['__vtrftk']
132132
);

5.2.0-VB2/vtiger-install.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,8 @@ if [[ $@ == *'--remove-mysql'* ]]; then
8282
apt-get --yes autoremove --purge && apt-get autoclean
8383
deluser --remove-home mysql && true
8484
delgroup mysql && true
85-
rm -rf /etc/apparmor.d/abstractions/mysql
86-
rm -rf /etc/apparmor.d/cache/usr.sbin.mysqld
87-
rm -rf /etc/mysql
88-
rm -rf /var/lib/mysql
89-
rm -rf /var/log/mysql*
90-
rm -rf /var/log/upstart/mysql.log*
91-
rm -rf /var/run/mysqld
85+
rm -rf \
86+
/etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql \
87+
/var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld \
88+
/tmp/* /var/tmp/* /var/lib/apt/lists/*
9289
fi

5.2.0/config.inc.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,23 @@
9999
}
100100
}
101101

102-
// Update $site_URL using VT_SITE_URL envrionment varible
102+
// Update $site_URL using VT_SITE_URL environment variable
103103
$site_URL = 'http'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/';
104104

105+
// Store $site_URL on /tmp for system services
106+
if ($_SERVER['HTTP_HOST']) {
107+
$site_URL_file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'vtiger_site_URL';
108+
if (!file_exists($site_URL_file) || filemtime($site_URL_file) + 3600 < time()) {
109+
file_put_contents($site_URL_file, $site_URL);
110+
$port = parse_url('http://'.$_SERVER['HTTP_HOST'], PHP_URL_PORT);
111+
if ($_SERVER['HTTPS'] === 'on' && $port != 443) {
112+
file_put_contents(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'https_localhost_proxy', 'tcp-listen:'.$port.',reuseaddr,fork tcp:localhost:443');
113+
} elseif ($port != 80) {
114+
file_put_contents(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'http_localhost_proxy', 'tcp-listen:'.$port.',reuseaddr,fork tcp:localhost:80');
115+
}
116+
}
117+
}
118+
105119
// url for customer portal (Example: http://vtiger.com/portal)
106120
$PORTAL_URL = $site_URL.'/customerportal';
107121

5.2.0/crontab

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2-
* * * * * root date +\%s > /run/crond.ts
3-
* * * * * root vtiger-cron.sh
2+
* * * * * root vtiger-cron.sh ts
3+
* * * * * root vtiger-cron.sh vtiger
4+
* * * * * root vtiger-cron.sh localhost_proxy

5.2.0/vtiger-cron.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,18 @@ source /run/crond.env
66
log_file=cron.log
77
log_dir=/var/www/html/logs
88

9-
/var/www/html/cron/vtigercron.sh >> ${log_dir}/${log_file} 2>&1
10-
find "${log_dir}/" -iname "${log_file}" -size +1M -exec mv {} {}.$(date +%s) \;
9+
case "$1" in
10+
ts)
11+
date +%s > /run/crond.ts
12+
;;
13+
vtiger)
14+
echo "====[ vtiger cron ]===="
15+
/var/www/html/cron/vtigercron.sh >> ${log_dir}/${log_file} 2>&1
16+
find "${log_dir}/" -iname "${log_file}" -size +1M -exec mv {} {}.$(date +%s) \;
17+
;;
18+
localhost_proxy)
19+
echo "====[ localhost proxy ]===="
20+
if [[ -f /tmp/http_localhost_proxy ]]; then socat $(cat /tmp/http_localhost_proxy) & fi
21+
if [[ -f /tmp/https_localhost_proxy ]]; then socat $(cat /tmp/https_localhost_proxy) & fi
22+
;;
23+
esac

0 commit comments

Comments
 (0)