new scripts which self-localenv, and a daemon web server
This commit is contained in:
@@ -3,7 +3,12 @@
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use Daemon::Control;
|
||||
BEGIN {
|
||||
eval "use Daemon::Control";
|
||||
if ($@) {
|
||||
exec("$ENV{HOME}/bin/localenv", $0, @ARGV);
|
||||
}
|
||||
}
|
||||
|
||||
my $program = "$ENV{HOME}/bin/netdisco-daemon-fg";
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ say ' * Internet access';
|
||||
say ' * Database added to PostgreSQL for Netdisco';
|
||||
say ' * User added to PostgreSQL with rights to the Netdisco Database';
|
||||
say ' * "environments/development.yml" file configured with Database dsn/user/pass';
|
||||
say ' * A full backup of any existing Netdisco database data';
|
||||
say '';
|
||||
say 'You will be asked to confirm all changes to your system.';
|
||||
say '';
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin/../lib";
|
||||
use App::Netdisco;
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use Dancer;
|
||||
use App::Netdisco::Web;
|
||||
dance;
|
||||
BEGIN {
|
||||
eval "use Daemon::Control";
|
||||
if ($@) {
|
||||
exec("$ENV{HOME}/bin/localenv", $0, @ARGV);
|
||||
}
|
||||
}
|
||||
|
||||
Daemon::Control->new({
|
||||
name => 'Netdisco Web',
|
||||
program => 'plackup',
|
||||
program_args => ["$ENV{HOME}/bin/netdisco-web-fg"],
|
||||
pid_file => "$ENV{HOME}/netdisco-web.pid",
|
||||
})->run;
|
||||
|
||||
9
Netdisco/bin/netdisco-web-fg
Executable file
9
Netdisco/bin/netdisco-web-fg
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin/../lib";
|
||||
use App::Netdisco;
|
||||
|
||||
use Dancer;
|
||||
use App::Netdisco::Web;
|
||||
dance;
|
||||
Reference in New Issue
Block a user