| 1 | #!/usr/local/bin/perl | ||
| 2 | # PODNAME: tapper-installer-client | ||
| 3 | # ABSTRACT: cmdline frontend to Installer.simnow | ||
| 4 | |||
| 5 | use warnings; | ||
| 6 | use strict; | ||
| 7 | use Log::Log4perl; | ||
| 8 | use Daemon::Daemonize qw/:all/; | ||
| 9 | use Tapper::Config; | ||
| 10 | |||
| 11 | use Tapper::Installer::Base; | ||
| 12 | |||
| 13 | BEGIN { | ||
| 14 | Tapper::Config::_switch_context; # reload config | ||
| 15 | my $l4p_cfg = Tapper::Config->subconfig->{files}{log4perl_cfg}; | ||
| 16 | Log::Log4perl::init($l4p_cfg); | ||
| 17 | } | ||
| 18 | |||
| 19 | # don't use the config of the last simnow session | ||
| 20 | system("rm","/etc/tapper") if -e "/etc/tapper"; | ||
| 21 | |||
| 22 | |||
| 23 | Daemon::Daemonize->daemonize(close => "std"); | ||
| 24 | |||
| 25 | |||
| 26 | my $client = Tapper::Installer::Base->new(); | ||
| 27 | $client->system_install("simnow"); | ||
| 28 | |||
| 29 | __END__ |