aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-01-27 18:20:30 +0100
committerAngelo Naselli <anaselli@linux.it>2014-01-27 18:20:30 +0100
commit1624ce382eb033c2cf3ef1fe6b9c41beb0b0a91b (patch)
tree1363e3d3bdcfa5b2ff3111a41b2c700a5a922140 /scripts
parentf519e47d15103514585a272c6308467ac41ce551 (diff)
downloadmanatools-1624ce382eb033c2cf3ef1fe6b9c41beb0b0a91b.tar
manatools-1624ce382eb033c2cf3ef1fe6b9c41beb0b0a91b.tar.gz
manatools-1624ce382eb033c2cf3ef1fe6b9c41beb0b0a91b.tar.bz2
manatools-1624ce382eb033c2cf3ef1fe6b9c41beb0b0a91b.tar.xz
manatools-1624ce382eb033c2cf3ef1fe6b9c41beb0b0a91b.zip
Project structure change
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/adminMouse13
-rwxr-xr-xscripts/adminService13
-rwxr-xr-xscripts/adminUser13
-rwxr-xr-xscripts/apanel.pl95
-rwxr-xr-xscripts/hostmanager36
-rwxr-xr-xscripts/mgaAddUser13
6 files changed, 183 insertions, 0 deletions
diff --git a/scripts/adminMouse b/scripts/adminMouse
new file mode 100755
index 00000000..40b86f4f
--- /dev/null
+++ b/scripts/adminMouse
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use lib qw(/usr/lib/libDrakX);
+
+use common qw(N);
+
+use AdminPanel::Module::AdminMouse;
+
+my $mouseMan = AdminPanel::Module::AdminMouse->new();
+
+$mouseMan->start();
+
+1;
diff --git a/scripts/adminService b/scripts/adminService
new file mode 100755
index 00000000..e46942e9
--- /dev/null
+++ b/scripts/adminService
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use strict;
+use lib qw(/usr/lib/libDrakX);
+
+use common qw(N);
+use AdminPanel::Module::Services;
+
+my $serviceMan = AdminPanel::Module::Services->new({icon => "/usr/share/mcc/themes/default/service-mdk.png",
+ name => N("Services and daemons"),});
+$serviceMan->start();
+
+1;
diff --git a/scripts/adminUser b/scripts/adminUser
new file mode 100755
index 00000000..2e72b5fc
--- /dev/null
+++ b/scripts/adminUser
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use lib qw(/usr/lib/libDrakX);
+
+use common qw(N);
+
+use AdminPanel::Module::Users;
+
+my $userMan = AdminPanel::Module::Users->new({icon => "/usr/share/icons/userdrake.png",
+ name => N("Mageia Users Management Tool"),});
+$userMan->start();
+
+1;
diff --git a/scripts/apanel.pl b/scripts/apanel.pl
new file mode 100755
index 00000000..750f3f13
--- /dev/null
+++ b/scripts/apanel.pl
@@ -0,0 +1,95 @@
+#!/usr/bin/perl
+# vim: set et ts=4 sw=4:
+# Copyright 2012 Steven Tucker
+# Copyright 2013 Matteo Pasotti
+# Copyright 2014 Angelo Naselli
+#
+# This file is part of AdminPanel
+#
+# AdminPanel is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# AdminPanel is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with AdminPanel. If not, see <http://www.gnu.org/licenses/>.
+
+use strict;
+use warnings;
+use diagnostics;
+use AdminPanel::Privileges;
+use FindBin;
+use lib "$FindBin::RealBin";
+use AdminPanel::SettingsReader;
+use AdminPanel::MainDisplay;
+use yui;
+
+my $cmdline = new yui::YCommandLine;
+
+usage() if($cmdline->find("--help") > 0 || $cmdline->find("-h") > 0);
+
+my $settings = getSettings();
+
+ask_for_authentication($settings->{priv_method}) if(require_root_capability());
+
+ my $mainWin = new AdminPanel::MainDisplay();
+while (1) {
+ my $launch = $mainWin->start();
+
+ if ($launch) {
+ $mainWin->destroy();
+ $launch->start();
+ }
+ else {
+ $mainWin->destroy();
+ last;
+ }
+ $mainWin->setupGui();
+}
+
+
+sub usage {
+ print "\n";
+ print "Usage apanel [options...]\n\n";
+ print "Options:\n";
+ print "\t--help | -h print this help\n";
+## anaselli: --name now is used only to add a path to /etc (e.g. --name mcc2 means /etc/mcc2)
+ # and it is overriden by --conf_dir, so it should be discussed better to understand
+ # if it is really needed any more.
+ # Window title is got from settings.conf (key title)
+ print "\t--name string specify the window title of the administration panel\n";
+ print "\t--conf_dir path specify the settings.conf file directory\n";
+ print "\n";
+ exit(0);
+}
+
+# adpanel settings
+sub getSettings {
+ my ($self) = @_;
+ # yui commandline parser
+ my $pos = $cmdline->find("--conf_dir");
+ my $confDir = "/etc/apanel";
+ if($pos > 0){
+ $confDir = $cmdline->arg($pos + 1);
+ }else{
+ $confDir = "/etc/apanel";
+ }
+ # configuration file name
+ my $fileName = "$confDir/settings.conf";
+ return new AdminPanel::SettingsReader($fileName);
+}
+
+=pod
+
+=head1 main
+
+ main launcher
+
+=cut
+
+1;
diff --git a/scripts/hostmanager b/scripts/hostmanager
new file mode 100755
index 00000000..006f5efd
--- /dev/null
+++ b/scripts/hostmanager
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+# Copyright 2013 Matteo Pasotti
+#
+# This file is part of hostmanager
+#
+# hostmanager is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# hostmanager is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with AdminPanel. If not, see <http://www.gnu.org/licenses/>.
+use Modern::Perl 2011;
+use autodie;
+use AdminPanel::Module::Hosts;
+
+use yui;
+
+my $wm_icon = "/usr/lib/libDrakX/icons/IC-Dhost-48.png";
+my $wm_name = "Manage hosts definitions";
+
+yui::YUI::app()->setApplicationTitle($wm_name);
+yui::YUI::app()->setApplicationIcon($wm_icon);
+
+my $hostMan = AdminPanel::Module::Hosts->new({
+ icon => $wm_icon,
+ name => $wm_name
+ });
+$hostMan->start();
+
+1;
diff --git a/scripts/mgaAddUser b/scripts/mgaAddUser
new file mode 100755
index 00000000..093da724
--- /dev/null
+++ b/scripts/mgaAddUser
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use lib qw(/usr/lib/libDrakX);
+
+use common qw(N);
+
+use AdminPanel::Module::Users;
+
+my $userMan = AdminPanel::Module::Users->new({icon => "/usr/share/icons/userdrake.png",
+ name => N("Mageia Add Users Tool"),});
+$userMan->addUserDialog(1);
+
+1;