Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Zvonimir
ISPConfig 3
Commits
fea5e7cb
Commit
fea5e7cb
authored
Aug 22, 2012
by
tbrehm
Browse files
Added unmount commands when website gets deleted in apache2_plugin.inc.php
parent
58053eae
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/apache2_plugin.inc.php
View file @
fea5e7cb
...
...
@@ -1460,6 +1460,23 @@ class apache2_plugin {
}
else
{
$apache_chrooted
=
false
;
}
//* Remove the mounts
$log_folder
=
'log'
;
if
(
$data
[
'old'
][
'type'
]
==
'vhostsubdomain'
)
{
$tmp
=
$app
->
db
->
queryOneRecord
(
'SELECT `domain` FROM web_domain WHERE domain_id = '
.
intval
(
$data
[
'old'
][
'parent_domain_id'
]));
$subdomain_host
=
preg_replace
(
'/^(.*)\.'
.
preg_quote
(
$tmp
[
'domain'
],
'/'
)
.
'$/'
,
'$1'
,
$data
[
'old'
][
'domain'
]);
if
(
$subdomain_host
==
''
)
$subdomain_host
=
'web'
.
$data
[
'old'
][
'domain_id'
];
$web_folder
=
$data
[
'old'
][
'web_folder'
];
$log_folder
.
=
'/'
.
$subdomain_host
;
unset
(
$tmp
);
}
exec
(
'umount '
.
escapeshellarg
(
$data
[
'old'
][
'document_root'
]
.
'/'
.
$log_folder
));
//* remove mountpoint from fstab
$fstab_line
=
'/var/log/ispconfig/httpd/'
.
$data
[
'old'
][
'domain'
]
.
' '
.
$data
[
'old'
][
'document_root'
]
.
'/'
.
$log_folder
.
' none bind 0 0'
;
$app
->
system
->
removeLine
(
'/etc/fstab'
,
$fstab_line
);
if
(
$data
[
'old'
][
'type'
]
!=
'vhost'
&&
$data
[
'old'
][
'type'
]
!=
'vhostsubdomain'
&&
$data
[
'old'
][
'parent_domain_id'
]
>
0
)
{
//* This is a alias domain or subdomain, so we have to update the website instead
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment