Skip to content
GitLab
Explore
Sign in
Register
Judah - MW
ISPConfig 3
Compare revisions
4e36ffb3f8ec668d787e85686cc138ada6050e25 to cbea27eabd3b1f8261cc4461570f13308d546bf0
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/z_php_fpm_incron_reload_plugin.inc.php
View file @
cbea27ea
...
...
@@ -106,7 +106,7 @@ class z_php_fpm_incron_reload_plugin {
$app
->
uses
(
'getconf'
);
$serverConfig
=
$app
->
getconf
->
get_server_config
(
$conf
[
'server_id'
],
'web'
);
return
$serverConfig
[
'php_fpm_incron_reload'
]
===
'y'
;
return
(
isset
(
$serverConfig
[
'php_fpm_incron_reload'
])
&&
$serverConfig
[
'php_fpm_incron_reload'
]
===
'y'
)
;
}
private
function
createIncronConfiguration
(
$triggerFile
,
$systemUser
,
$fastcgiPhpVersion
)
{
...
...
server/scripts/handle_mailbox_soft_deleted.sh
deleted
100644 → 0
View file @
4e36ffb3
#!/bin/bash
# Archive directories for deleted mailboxes.
delay_days
=
7
# Test if there is something to do... to avoid 'No such file or directory' from find later.
ls
/var/vmail/
*
/[a-z0-9.-]
*
-deleted-
[
0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]
>
/dev/null 2>&1
if
[
$?
!=
0
]
;
then
exit
0
;
fi
function
remove_soft_deleted_mailbox
{
dir
=
$1
echo
"Purging
$dir
"
rm
-r
"
$dir
"
}
function
compress_soft_deleted_mailbox
{
dir
=
$1
backupfile
=
"
${
dir
}
.tar.bz2"
# Test if backup file already exists
if
[
-f
$backupfile
]
;
then
# Skip
echo
"ERROR: Backupfile(
$backupfile
) exists!"
>
&2
continue
fi
echo
"Compressing for
$dir
"
tar
cvfj
"
$backupfile
"
--remove-files
"
$dir
"
2>
>(
grep
-v
"tar: Removing leading"
>
&2
)
}
# List deleted mailboxs to archive
# -mtime +7 ===> Only mailboxes deleted more then 7 days ago
# Test that the last dir component matches e.g. xxx-deleted-20220101094242 (14 digits)
# command: xxx-`date "+%Y%m%d%H%M%S"`
find /var/vmail/
*
/[a-z0-9.-]
*
-deleted-
[
0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]
-maxdepth
0
-type
d
-mtime
+
$delay_days
|
while
read
line
;
do
# example $line: "/var/vmail/example.com/info-20220101094242"
dir
=
$line
# Uncomment the desired cleanup method below, or be creative and create your own.
remove_soft_deleted_mailbox
$dir
#compress_soft_deleted_mailbox $dir
done
server/server.php
View file @
cbea27ea
...
...
@@ -94,7 +94,7 @@ if ($app->dbmaster->testConnection()) {
// retrieve admin email address for notifications
$sys_ini
=
$app
->
db
->
queryOneRecord
(
"SELECT * FROM sys_ini WHERE sysini_id = 1"
);
$conf
[
'sys_ini'
]
=
$app
->
ini_parser
->
parse_ini_string
(
stripslashes
(
$sys_ini
[
'config'
]));
$conf
[
'admin_mail'
]
=
$conf
[
'sys_ini'
][
'mail'
][
'admin_mail'
];
$conf
[
'admin_mail'
]
=
(
isset
(
$conf
[
'sys_ini'
][
'mail'
][
'admin_mail'
]
)
?
$conf
[
'sys_ini'
][
'mail'
][
'admin_mail'
]
:
''
)
;
unset
(
$sys_ini
);
/*
...
...
@@ -170,9 +170,9 @@ if ($app->db->testConnection() && $app->dbmaster->testConnection()) {
$app
->
modules
->
loadModules
(
'all'
);
//** Load the plugins that are in the plugins-enabled folder
$app
->
plugins
->
loadPlugins
(
'all'
);
$app
->
plugins
->
raiseAction
(
'server_plugins_loaded'
,
''
);
if
(
$tmp_num_records
>
0
)
{
$app
->
log
(
"Found
$tmp_num_records
changes, starting update process."
,
LOGLEVEL_DEBUG
);
//** Go through the sys_datalog table and call the processing functions
...
...
server/server.sh
View file @
cbea27ea
...
...
@@ -15,14 +15,14 @@ if [ -f /usr/local/ispconfig/server/lib/php.ini ]; then
fi
cd
/usr/local/ispconfig/server
/usr/bin/
php
-q
\
$(
which
php
)
-q
\
-d
disable_classes
=
\
-d
disable_functions
=
\
-d
open_basedir
=
\
/usr/local/ispconfig/server/server.php
cd
/usr/local/ispconfig/security
/usr/bin/
php
-q
\
$(
which
php
)
-q
\
-d
disable_classes
=
\
-d
disable_functions
=
\
-d
open_basedir
=
\
...
...
Prev
1
…
40
41
42
43
44
Next