-
Notifications
You must be signed in to change notification settings - Fork 5
/
intellihome-master
executable file
·34 lines (30 loc) · 1.05 KB
/
intellihome-master
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/perl
# PODNAME: intellihome-master
use lib './lib';
use IntelliHome::IntelliHomeNodeMaster;
use Getopt::Long;
use Carp::Always;
###################################################### GetOptions
my ( $install_plugin, $remove_plugin, $update_plugin, $foreground );
GetOptions(
"i|installplugin=s" => \$install_plugin,
"r|removeplugin=s" => \$remove_plugin,
"u|updateplugin=s" => \$update_plugin,
"f|foreground" => \$foreground,
"s|stop" => \$stop
) or die("Error in command line arguments\n");
######################################################
if ($install_plugin) {
IntelliHome::IntelliHomeNodeMaster->install_plugin($install_plugin);
}
elsif ($remove_plugin) {
IntelliHome::IntelliHomeNodeMaster->remove_plugin($remove_plugin);
}
elsif ($update_plugin) {
IntelliHome::IntelliHomeNodeMaster->update_plugin($update_plugin);
}
######################################################
if ( defined $stop ) {
IntelliHome::IntelliHomeNodeMaster->stop;
}
IntelliHome::IntelliHomeNodeMaster->start($foreground);