rename *-daemon apps to be *-backend
Squashed commit of the following: commit39b438aa4bAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat May 6 16:40:11 2017 +0100 add release notes commitca4ea90d35Author: Oliver Gorwits <oliver@cpan.org> Date: Sat May 6 16:32:06 2017 +0100 update distmeta commit4e35b904b0Author: Oliver Gorwits <oliver@cpan.org> Date: Sat May 6 16:30:22 2017 +0100 rename files from Daemon to Backend commit86a605ba68Author: Oliver Gorwits <oliver@cpan.org> Date: Sat May 6 16:26:43 2017 +0100 rename daemon to backend in code commitffe8fc180fAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat May 6 16:15:57 2017 +0100 add daemon files which exec to backend equivalents commit53e041594eAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sat May 6 15:32:49 2017 +0100 rename netdisco-daemon to netdisco-backend
This commit is contained in:
@@ -134,10 +134,10 @@ Link some of the newly installed apps into a handy location:
|
||||
ln -s ~/perl5/bin/{localenv,netdisco-*} ~/bin/
|
||||
|
||||
Test the installation by running the following command, which should only
|
||||
produce a status message (it's just a test - you'll start the daemon properly,
|
||||
later on):
|
||||
produce a status message (it's just a test - you'll start the daemons
|
||||
properly, later on):
|
||||
|
||||
~/bin/netdisco-daemon status
|
||||
~/bin/netdisco-backend status
|
||||
|
||||
=head1 Configuration
|
||||
|
||||
@@ -167,8 +167,8 @@ details.
|
||||
|
||||
The database either needs configuring if new, or updating from the current
|
||||
release of Netdisco (1.x). You also need vendor MAC address prefixes (OUI
|
||||
data) and some MIBs if you want to run the daemon. The following script will
|
||||
take care of all this for you:
|
||||
data) and some MIBs if you want to run the backend daemon. The following
|
||||
script will take care of all this for you:
|
||||
|
||||
~/bin/netdisco-deploy
|
||||
|
||||
@@ -185,7 +185,7 @@ Run the following command to start the web-app server as a backgrounded daemon
|
||||
|
||||
Run the following command to start the job control daemon (port control, etc):
|
||||
|
||||
~/bin/netdisco-daemon start
|
||||
~/bin/netdisco-backend start
|
||||
|
||||
You should take care not to run this Netdisco daemon and the Netdisco 1.x
|
||||
daemon at the same time. Similarly, if you use the device discovery with
|
||||
@@ -207,6 +207,7 @@ Notes|App::Netdisco::Manual::ReleaseNotes>. Then, the process is as follows:
|
||||
|
||||
# upgrade Netdisco
|
||||
~/bin/localenv cpanm --notest App::Netdisco
|
||||
ln -s ~/perl5/bin/{localenv,netdisco-*} ~/bin/
|
||||
|
||||
# apply database schema updates
|
||||
~/bin/netdisco-deploy
|
||||
@@ -215,7 +216,7 @@ Notes|App::Netdisco::Manual::ReleaseNotes>. Then, the process is as follows:
|
||||
~/bin/netdisco-web restart
|
||||
|
||||
# restart job daemon (if you use it)
|
||||
~/bin/netdisco-daemon restart
|
||||
~/bin/netdisco-backend restart
|
||||
|
||||
=head1 Tips and Tricks
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package App::Netdisco::Daemon::Job;
|
||||
package App::Netdisco::Backend::Job;
|
||||
|
||||
use Moo;
|
||||
use namespace::clean;
|
||||
@@ -1,9 +1,9 @@
|
||||
package App::Netdisco::Daemon::Util;
|
||||
package App::Netdisco::Backend::Util;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
# support utilities for Daemon Actions
|
||||
# support utilities for Backend Actions
|
||||
|
||||
use base 'Exporter';
|
||||
our @EXPORT = ();
|
||||
@@ -1,9 +1,9 @@
|
||||
package App::Netdisco::Daemon::Worker::Common;
|
||||
package App::Netdisco::Backend::Worker::Common;
|
||||
|
||||
use Dancer qw/:moose :syntax :script/;
|
||||
|
||||
use Try::Tiny;
|
||||
use App::Netdisco::Util::Daemon;
|
||||
use App::Netdisco::Util::Backend;
|
||||
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
@@ -18,7 +18,7 @@ sub worker_body {
|
||||
my $wid = $self->wid;
|
||||
|
||||
while (1) {
|
||||
prctl sprintf 'netdisco-daemon: worker #%s poller: idle', $wid;
|
||||
prctl sprintf 'netdisco-backend: worker #%s poller: idle', $wid;
|
||||
|
||||
my $job = $self->{queue}->dequeue(1);
|
||||
next unless defined $job;
|
||||
@@ -26,7 +26,7 @@ sub worker_body {
|
||||
|
||||
try {
|
||||
$job->started(scalar localtime);
|
||||
prctl sprintf 'netdisco-daemon: worker #%s poller: working on #%s: %s',
|
||||
prctl sprintf 'netdisco-backend: worker #%s poller: working on #%s: %s',
|
||||
$wid, $job->job, $job->summary;
|
||||
info sprintf "pol (%s): starting %s job(%s) at %s",
|
||||
$wid, $action, $job->job, $job->started;
|
||||
@@ -50,7 +50,7 @@ sub close_job {
|
||||
my ($self, $job) = @_;
|
||||
my $now = scalar localtime;
|
||||
|
||||
prctl sprintf 'netdisco-daemon: worker #%s poller: wrapping up %s #%s: %s',
|
||||
prctl sprintf 'netdisco-backend: worker #%s poller: wrapping up %s #%s: %s',
|
||||
$self->wid, $job->action, $job->job, $job->status;
|
||||
info sprintf "pol (%s): wrapping up %s job(%s) - status %s at %s",
|
||||
$self->wid, $job->action, $job->job, $job->status, $now;
|
||||
@@ -1,8 +1,8 @@
|
||||
package App::Netdisco::Daemon::Worker::Interactive::DeviceActions;
|
||||
package App::Netdisco::Backend::Worker::Interactive::DeviceActions;
|
||||
|
||||
use App::Netdisco::Util::SNMP 'snmp_connect_rw';
|
||||
use App::Netdisco::Util::Device 'get_device';
|
||||
use App::Netdisco::Daemon::Util ':all';
|
||||
use App::Netdisco::Backend::Util ':all';
|
||||
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
@@ -1,9 +1,9 @@
|
||||
package App::Netdisco::Daemon::Worker::Interactive::PortActions;
|
||||
package App::Netdisco::Backend::Worker::Interactive::PortActions;
|
||||
|
||||
use App::Netdisco::Util::Port ':all';
|
||||
use App::Netdisco::Util::SNMP 'snmp_connect_rw';
|
||||
use App::Netdisco::Util::Device 'get_device';
|
||||
use App::Netdisco::Daemon::Util ':all';
|
||||
use App::Netdisco::Backend::Util ':all';
|
||||
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
@@ -1,9 +1,9 @@
|
||||
package App::Netdisco::Daemon::Worker::Manager;
|
||||
package App::Netdisco::Backend::Worker::Manager;
|
||||
|
||||
use Dancer qw/:moose :syntax :script/;
|
||||
|
||||
use List::Util 'sum';
|
||||
use App::Netdisco::Util::Daemon;
|
||||
use App::Netdisco::Util::Backend;
|
||||
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
@@ -35,12 +35,12 @@ sub worker_body {
|
||||
my $wid = $self->wid;
|
||||
|
||||
if (setting('workers')->{'no_manager'}) {
|
||||
prctl sprintf 'netdisco-daemon: worker #%s manager: inactive', $wid;
|
||||
prctl sprintf 'netdisco-backend: worker #%s manager: inactive', $wid;
|
||||
return debug "mgr ($wid): no need for manager... quitting"
|
||||
}
|
||||
|
||||
while (1) {
|
||||
prctl sprintf 'netdisco-daemon: worker #%s manager: gathering', $wid;
|
||||
prctl sprintf 'netdisco-backend: worker #%s manager: gathering', $wid;
|
||||
my $num_slots = 0;
|
||||
|
||||
$num_slots = parse_max_workers( setting('workers')->{tasks} )
|
||||
@@ -78,7 +78,7 @@ sub worker_body {
|
||||
}
|
||||
|
||||
debug "mgr ($wid): sleeping now...";
|
||||
prctl sprintf 'netdisco-daemon: worker #%s manager: idle', $wid;
|
||||
prctl sprintf 'netdisco-backend: worker #%s manager: idle', $wid;
|
||||
sleep( setting('workers')->{sleep_time} || 1 );
|
||||
}
|
||||
}
|
||||
18
lib/App/Netdisco/Backend/Worker/Poller.pm
Normal file
18
lib/App/Netdisco/Backend/Worker/Poller.pm
Normal file
@@ -0,0 +1,18 @@
|
||||
package App::Netdisco::Backend::Worker::Poller;
|
||||
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
|
||||
# main worker body
|
||||
with 'App::Netdisco::Backend::Worker::Common';
|
||||
|
||||
# add dispatch methods for poller tasks
|
||||
with 'App::Netdisco::Backend::Worker::Poller::Device',
|
||||
'App::Netdisco::Backend::Worker::Poller::Arpnip',
|
||||
'App::Netdisco::Backend::Worker::Poller::Macsuck',
|
||||
'App::Netdisco::Backend::Worker::Poller::Nbtstat',
|
||||
'App::Netdisco::Backend::Worker::Poller::Expiry',
|
||||
'App::Netdisco::Backend::Worker::Interactive::DeviceActions',
|
||||
'App::Netdisco::Backend::Worker::Interactive::PortActions';
|
||||
|
||||
1;
|
||||
@@ -1,4 +1,4 @@
|
||||
package App::Netdisco::Daemon::Worker::Poller::Arpnip;
|
||||
package App::Netdisco::Backend::Worker::Poller::Arpnip;
|
||||
|
||||
use App::Netdisco::Core::Arpnip 'do_arpnip';
|
||||
use App::Netdisco::Util::Device 'is_arpnipable';
|
||||
@@ -6,7 +6,7 @@ use App::Netdisco::Util::Device 'is_arpnipable';
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
|
||||
with 'App::Netdisco::Daemon::Worker::Poller::Common';
|
||||
with 'App::Netdisco::Backend::Worker::Poller::Common';
|
||||
|
||||
sub arpnip_action { \&do_arpnip }
|
||||
sub arpnip_filter { \&is_arpnipable }
|
||||
@@ -1,10 +1,10 @@
|
||||
package App::Netdisco::Daemon::Worker::Poller::Common;
|
||||
package App::Netdisco::Backend::Worker::Poller::Common;
|
||||
|
||||
use Dancer qw/:moose :syntax :script/;
|
||||
|
||||
use App::Netdisco::Util::SNMP 'snmp_connect';
|
||||
use App::Netdisco::Util::Device 'get_device';
|
||||
use App::Netdisco::Daemon::Util ':all';
|
||||
use App::Netdisco::Backend::Util ':all';
|
||||
use App::Netdisco::JobQueue qw/jq_queued jq_insert/;
|
||||
|
||||
use Dancer::Plugin::DBIC 'schema';
|
||||
@@ -1,11 +1,11 @@
|
||||
package App::Netdisco::Daemon::Worker::Poller::Device;
|
||||
package App::Netdisco::Backend::Worker::Poller::Device;
|
||||
|
||||
use Dancer qw/:moose :syntax :script/;
|
||||
|
||||
use App::Netdisco::Util::SNMP 'snmp_connect';
|
||||
use App::Netdisco::Util::Device qw/get_device is_discoverable/;
|
||||
use App::Netdisco::Core::Discover ':all';
|
||||
use App::Netdisco::Daemon::Util ':all';
|
||||
use App::Netdisco::Backend::Util ':all';
|
||||
use App::Netdisco::JobQueue qw/jq_queued jq_insert/;
|
||||
|
||||
use Dancer::Plugin::DBIC 'schema';
|
||||
@@ -1,9 +1,9 @@
|
||||
package App::Netdisco::Daemon::Worker::Poller::Expiry;
|
||||
package App::Netdisco::Backend::Worker::Poller::Expiry;
|
||||
|
||||
use Dancer qw/:moose :syntax :script/;
|
||||
use Dancer::Plugin::DBIC 'schema';
|
||||
|
||||
use App::Netdisco::Daemon::Util ':all';
|
||||
use App::Netdisco::Backend::Util ':all';
|
||||
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
@@ -1,4 +1,4 @@
|
||||
package App::Netdisco::Daemon::Worker::Poller::Macsuck;
|
||||
package App::Netdisco::Backend::Worker::Poller::Macsuck;
|
||||
|
||||
use App::Netdisco::Core::Macsuck 'do_macsuck';
|
||||
use App::Netdisco::Util::Device 'is_macsuckable';
|
||||
@@ -6,7 +6,7 @@ use App::Netdisco::Util::Device 'is_macsuckable';
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
|
||||
with 'App::Netdisco::Daemon::Worker::Poller::Common';
|
||||
with 'App::Netdisco::Backend::Worker::Poller::Common';
|
||||
|
||||
sub macsuck_action { \&do_macsuck }
|
||||
sub macsuck_filter { \&is_macsuckable }
|
||||
@@ -1,4 +1,4 @@
|
||||
package App::Netdisco::Daemon::Worker::Poller::Nbtstat;
|
||||
package App::Netdisco::Backend::Worker::Poller::Nbtstat;
|
||||
|
||||
use Dancer qw/:moose :syntax :script/;
|
||||
use Dancer::Plugin::DBIC 'schema';
|
||||
@@ -6,7 +6,7 @@ use Dancer::Plugin::DBIC 'schema';
|
||||
use App::Netdisco::Core::Nbtstat qw/nbtstat_resolve_async store_nbt/;
|
||||
use App::Netdisco::Util::Node 'is_nbtstatable';
|
||||
use App::Netdisco::Util::Device qw/get_device is_discoverable/;
|
||||
use App::Netdisco::Daemon::Util ':all';
|
||||
use App::Netdisco::Backend::Util ':all';
|
||||
|
||||
use NetAddr::IP::Lite ':lower';
|
||||
use Time::HiRes 'gettimeofday';
|
||||
@@ -14,7 +14,7 @@ use Time::HiRes 'gettimeofday';
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
|
||||
with 'App::Netdisco::Daemon::Worker::Poller::Common';
|
||||
with 'App::Netdisco::Backend::Worker::Poller::Common';
|
||||
|
||||
sub nbtstat_action { \&do_nbtstat }
|
||||
sub nbtstat_filter { \&is_nbtstatable }
|
||||
@@ -1,9 +1,9 @@
|
||||
package App::Netdisco::Daemon::Worker::Scheduler;
|
||||
package App::Netdisco::Backend::Worker::Scheduler;
|
||||
|
||||
use Dancer qw/:moose :syntax :script/;
|
||||
|
||||
use Algorithm::Cron;
|
||||
use App::Netdisco::Util::Daemon;
|
||||
use App::Netdisco::Util::Backend;
|
||||
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
@@ -39,7 +39,7 @@ sub worker_body {
|
||||
my $wid = $self->wid;
|
||||
|
||||
unless (setting('schedule')) {
|
||||
prctl sprintf 'netdisco-daemon: worker #%s scheduler: inactive', $wid;
|
||||
prctl sprintf 'netdisco-backend: worker #%s scheduler: inactive', $wid;
|
||||
return debug "sch ($wid): no need for scheduler... quitting"
|
||||
}
|
||||
|
||||
@@ -47,11 +47,11 @@ sub worker_body {
|
||||
# sleep until some point in the next minute
|
||||
my $naptime = 60 - (time % 60) + int(rand(45));
|
||||
|
||||
prctl sprintf 'netdisco-daemon: worker #%s scheduler: idle', $wid;
|
||||
prctl sprintf 'netdisco-backend: worker #%s scheduler: idle', $wid;
|
||||
debug "sched ($wid): sleeping for $naptime seconds";
|
||||
|
||||
sleep $naptime;
|
||||
prctl sprintf 'netdisco-daemon: worker #%s scheduler: queueing', $wid;
|
||||
prctl sprintf 'netdisco-backend: worker #%s scheduler: queueing', $wid;
|
||||
|
||||
# NB next_time() returns the next *after* win_start
|
||||
my $win_start = time - (time % 60) - 1;
|
||||
@@ -1,18 +0,0 @@
|
||||
package App::Netdisco::Daemon::Worker::Poller;
|
||||
|
||||
use Role::Tiny;
|
||||
use namespace::clean;
|
||||
|
||||
# main worker body
|
||||
with 'App::Netdisco::Daemon::Worker::Common';
|
||||
|
||||
# add dispatch methods for poller tasks
|
||||
with 'App::Netdisco::Daemon::Worker::Poller::Device',
|
||||
'App::Netdisco::Daemon::Worker::Poller::Arpnip',
|
||||
'App::Netdisco::Daemon::Worker::Poller::Macsuck',
|
||||
'App::Netdisco::Daemon::Worker::Poller::Nbtstat',
|
||||
'App::Netdisco::Daemon::Worker::Poller::Expiry',
|
||||
'App::Netdisco::Daemon::Worker::Interactive::DeviceActions',
|
||||
'App::Netdisco::Daemon::Worker::Interactive::PortActions';
|
||||
|
||||
1;
|
||||
@@ -3,7 +3,7 @@ package App::Netdisco::JobQueue::PostgreSQL;
|
||||
use Dancer qw/:moose :syntax :script/;
|
||||
use Dancer::Plugin::DBIC 'schema';
|
||||
|
||||
use App::Netdisco::Daemon::Job;
|
||||
use App::Netdisco::Backend::Job;
|
||||
use Net::Domain 'hostfqdn';
|
||||
use Module::Load ();
|
||||
use Try::Tiny;
|
||||
@@ -38,7 +38,7 @@ sub _getsome {
|
||||
|
||||
my @returned = ();
|
||||
while (my $job = $rs->next) {
|
||||
push @returned, App::Netdisco::Daemon::Job->new({ $job->get_columns });
|
||||
push @returned, App::Netdisco::Backend::Job->new({ $job->get_columns });
|
||||
}
|
||||
return @returned;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ sub jq_locked {
|
||||
->search({status => "queued-$fqdn"});
|
||||
|
||||
while (my $job = $rs->next) {
|
||||
push @returned, App::Netdisco::Daemon::Job->new({ $job->get_columns });
|
||||
push @returned, App::Netdisco::Backend::Job->new({ $job->get_columns });
|
||||
}
|
||||
return @returned;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ App::Netdisco::Manual::Deployment - Tips and Tricks for Deployment
|
||||
The Netdisco applications will generate RC scripts suitable for Linux systems:
|
||||
|
||||
bin/netdisco-web get_init_file
|
||||
bin/netdisco-daemon get_init_file
|
||||
bin/netdisco-backend get_init_file
|
||||
|
||||
On C<systemd>-based systems please see L<our systemd
|
||||
guide|App::Netdisco::Manual::Systemd>.
|
||||
|
||||
@@ -51,14 +51,14 @@ directory
|
||||
You might also want to set C<check_userlog> to C<false> in your config to
|
||||
quieten some of the web client callbacks.
|
||||
|
||||
For the daemon, it's very similar:
|
||||
For the backend daemon, it's very similar:
|
||||
|
||||
DBIC_TRACE=1 ~/bin/localenv bin/netdisco-daemon-fg
|
||||
DBIC_TRACE=1 ~/bin/localenv bin/netdisco-backend-fg
|
||||
|
||||
You can point at a different database without editing C<deployment.yml>:
|
||||
|
||||
NETDISCO_DBNAME=testdb DBIC_TRACE=1 ~/bin/localenv plackup -R share,lib -p 5001 bin/netdisco-web-fg
|
||||
NETDISCO_DBNAME=testdb DBIC_TRACE=1 ~/bin/localenv bin/netdisco-daemon-fg
|
||||
NETDISCO_DBNAME=testdb DBIC_TRACE=1 ~/bin/localenv bin/netdisco-backend-fg
|
||||
|
||||
It's recommended to delete the "C<~/perl5/lib/perl5/App/Netdisco>"
|
||||
directory to avoid accidentally picking up old Netdisco code. For working on
|
||||
@@ -398,7 +398,7 @@ database connection management features mentioned above.
|
||||
|
||||
The job daemon is backwards compatible with the old Netdisco database job
|
||||
requests table. All code for the job daemon lives under the
|
||||
L<App::Netdisco::Daemon> namespace and like the rest of Netdisco is broken
|
||||
L<App::Netdisco::Backend> namespace and like the rest of Netdisco is broken
|
||||
down into manageable chunks.
|
||||
|
||||
=head2 Running the Job Daemon
|
||||
@@ -407,10 +407,10 @@ Like the web application, the job daemon is fully self contained and runs via
|
||||
two simple scripts shipped with the distribution - one for foreground and one
|
||||
for background execution (see the user docs for instructions).
|
||||
|
||||
The C<netdisco-daemon> script uses L<Daemon::Control> to daemonize so you can
|
||||
The C<netdisco-backend> script uses L<Daemon::Control> to daemonize so you can
|
||||
fire-and-forget the Netdisco job daemon without much trouble at all. This
|
||||
script in turn calls C<netdisco-daemon-fg> which is the real application, that
|
||||
runs in the foreground if called on its own.
|
||||
script in turn calls C<netdisco-backend-fg> which is the real application,
|
||||
that runs in the foreground if called on its own.
|
||||
|
||||
=head2 Daemon Engineering
|
||||
|
||||
|
||||
@@ -35,6 +35,22 @@ deploy script for App::Netdisco will make some schema changes to the database,
|
||||
but they are backwards compatible.
|
||||
|
||||
=back
|
||||
=head1 2.036000
|
||||
|
||||
=head2 Health Advice
|
||||
|
||||
In this release the apps C<netdisco-daemon> and C<netdisco-daemon-fg> have
|
||||
been renamed to C<netdisco-backend> and C<netdisco-backend-fg> respectively.
|
||||
|
||||
This better reflects the function of the two programs. If you still have
|
||||
scripts using C<netdisco-daemon> or C<netdisco-daemon-fg> commands, they
|
||||
should continue to work, as these apps still exist and simply exec() to the
|
||||
new scripts on start.
|
||||
|
||||
However, it would be best if you replace any custom management config to
|
||||
point to the new app names, going forward. Remember to do this on upgrade:
|
||||
|
||||
ln -s ~/perl5/bin/{localenv,netdisco-*} ~/bin/
|
||||
|
||||
=head1 2.035007
|
||||
|
||||
|
||||
@@ -10,21 +10,21 @@ instructions apply to your local installation and use at your own risk.
|
||||
|
||||
=head1 Files
|
||||
|
||||
=head2 C<< /etc/systemd/system/netdisco-daemon.service >>
|
||||
=head2 C<< /etc/systemd/system/netdisco-backend.service >>
|
||||
|
||||
This should be set mode 644 and owned by user and group C<root>.
|
||||
|
||||
[Unit]
|
||||
Description=Netdisco Daemon Service
|
||||
AssertFileIsExecutable=/home/netdisco/bin/netdisco-daemon
|
||||
Description=Netdisco Backend Service
|
||||
AssertFileIsExecutable=/home/netdisco/bin/netdisco-backend
|
||||
After=syslog.target network-online.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
User=netdisco
|
||||
Group=netdisco
|
||||
ExecStart=/home/netdisco/bin/netdisco-daemon start
|
||||
ExecStop=/home/netdisco/bin/netdisco-daemon stop
|
||||
ExecStart=/home/netdisco/bin/netdisco-backend start
|
||||
ExecStop=/home/netdisco/bin/netdisco-backend stop
|
||||
Restart=on-failure
|
||||
RestartSec=60
|
||||
|
||||
@@ -38,7 +38,7 @@ This should be set mode 644 and owned by user and group C<root>.
|
||||
[Unit]
|
||||
Description=Netdisco Web Service
|
||||
AssertFileIsExecutable=/home/netdisco/bin/netdisco-web
|
||||
After=syslog.target network-online.target netdisco-daemon.service
|
||||
After=syslog.target network-online.target netdisco-backend.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
@@ -56,15 +56,15 @@ This should be set mode 644 and owned by user and group C<root>.
|
||||
|
||||
To enable Netdisco in systemd:
|
||||
|
||||
systemctl enable netdisco-daemon.service
|
||||
systemctl enable netdisco-backend.service
|
||||
systemctl enable netdisco-web.service
|
||||
|
||||
To start Netdisco:
|
||||
|
||||
systemctl start netdisco-daemon.service
|
||||
systemctl start netdisco-backend.service
|
||||
systemctl start netdisco-web.service
|
||||
|
||||
May also need to run C<systemctl daemon-reload> depending on the order you do
|
||||
these steps.
|
||||
May also need to run C<systemctl netdisco-backend reload> depending on the
|
||||
order you do these steps.
|
||||
|
||||
=cut
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package App::Netdisco::Util::Daemon;
|
||||
package App::Netdisco::Util::Backend;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
Reference in New Issue
Block a user