| Server IP : 104.21.25.180 / Your IP : 162.159.115.41 Web Server : Apache/2.4.37 System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : ricodeal ( 1046) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/libexec/webmin/virtualmin-sqlite/ |
Upload File : |
# Functions for the SQLite database
use strict;
use warnings;
our %text;
our $module_name;
BEGIN { push(@INC, ".."); };
eval "use WebminCore;";
&init_config();
sub databases_in_dir
{
my @rv;
opendir(DIR, $_[0]);
while(my $f = readdir(DIR)) {
if ($f =~ /^(\S+)\.sqlite$/) {
push(@rv, { 'name' => $1,
'type' => $module_name,
'file' => "$_[0]/$f",
'desc' => $text{'db_name'} });
}
}
closedir(DIR);
return @rv;
}
# get_sqlite_command()
# Returns the command for sqlite, favouring sqlite and then falling back to
# sqlite2 and 3. Returns undef if none was found.
sub get_sqlite_command
{
foreach my $c ("sqlite", "sqlite4", "sqlite3", "sqlite2", "sqlite1") {
my $p = &has_command($c);
return $p if ($p);
}
return undef;
}
1;