9 Star 27 Fork 0

Gitee 极速下载/Webmin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/webmin/webmin
克隆/下载
run-uninstalls.pl 1010 Bytes
一键复制 编辑 原始数据 按行查看 历史
Jamie Cameron 提交于 2021-12-29 13:00 +08:00 . Uninstall scripts can exist for themes too
#!/usr/local/bin/perl
# run-uninstalls.pl
# Run all the uninstall.pl scripts in module directories
use lib '.';
BEGIN { push(@INC, "."); };
$no_acl_check++;
use WebminCore;
&init_config();
@themes = &list_themes();
if (@ARGV > 0) {
# Running for specified modules
foreach $a (@ARGV) {
local %minfo = &get_module_info($a);
if (!%minfo) {
# Try for a theme
($tinfo) = grep { $_->{'dir'} eq $a } @themes;
if ($tinfo) {
push(@mods, $tinfo);
}
}
else {
push(@mods, \%minfo);
}
}
}
else {
# Running on all modules and themes
@mods = ( &get_all_module_infos(), @themes );
}
foreach $m (@mods) {
$mdir = &module_root_directory($m->{'dir'});
if (&check_os_support($m) &&
-r "$mdir/uninstall.pl") {
# Call this module's uninstall function
eval {
$main::error_must_die = 1;
&foreign_require($m->{'dir'}, "uninstall.pl");
&foreign_call($m->{'dir'}, "module_uninstall");
};
if ($@) {
print STDERR "$m->{'dir'}/uninstall.pl failed : $@\n";
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Perl
1
https://gitee.com/mirrors/webmin.git
git@gitee.com:mirrors/webmin.git
mirrors
webmin
Webmin
master

搜索帮助