line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Spoor::LoginUnitFile; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
448
|
use v5.10; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
103
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
App::Spoor::LoginUnitFile |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 0.01 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 SYNOPSIS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
This package exists purely as a means of delivering the contents of the systemd unit file for the service that tails the |
23
|
|
|
|
|
|
|
CPanel login log. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 contents |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Returns the contents of the systemd unit file for the service responsible for tailing the CPanel login log. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub contents { |
34
|
9
|
|
|
9
|
1
|
1728
|
my $contents = <<'END_MESSAGE'; |
35
|
|
|
|
|
|
|
[Unit] |
36
|
|
|
|
|
|
|
Description=Spoor Login Follower Service |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
[Service] |
39
|
|
|
|
|
|
|
StartLimitInterval=0 |
40
|
|
|
|
|
|
|
Type=simple |
41
|
|
|
|
|
|
|
Restart=always |
42
|
|
|
|
|
|
|
RestartSec=1 |
43
|
|
|
|
|
|
|
User=root |
44
|
|
|
|
|
|
|
ExecStart=/usr/local/bin/spoor_log_follower login |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
[Install] |
47
|
|
|
|
|
|
|
WantedBy=multi-user.target |
48
|
|
|
|
|
|
|
END_MESSAGE |
49
|
|
|
|
|
|
|
|
50
|
9
|
|
|
|
|
50
|
return $contents; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 AUTHOR |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Rory McKinley, C<< <rorymckinley at capefox.co> >> |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 BUGS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Please report any bugs or feature requests to C<bug-. at rt.cpan.org>, or through |
60
|
|
|
|
|
|
|
the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=.>. I will be notified, and then you'll |
61
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SUPPORT |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
perldoc App::Spoor::LoginUnitFile |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
You can also look for information at: |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=over 4 |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=.> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L<http://annocpan.org/dist/.> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * CPAN Ratings |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
L<https://cpanratings.perl.org/d/.> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * Search CPAN |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
L<https://metacpan.org/release/.> |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=back |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Copyright 2019 Rory McKinley. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
97
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
98
|
|
|
|
|
|
|
copy of the full license at: |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
L<http://www.perlfoundation.org/artistic_license_2_0> |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Any use, modification, and distribution of the Standard or Modified |
103
|
|
|
|
|
|
|
Versions is governed by this Artistic License. By using, modifying or |
104
|
|
|
|
|
|
|
distributing the Package, you accept this license. Do not use, modify, |
105
|
|
|
|
|
|
|
or distribute the Package, if you do not accept this license. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
If your Modified Version has been derived from a Modified Version made |
108
|
|
|
|
|
|
|
by someone other than you, you are nevertheless required to ensure that |
109
|
|
|
|
|
|
|
your Modified Version complies with the requirements of this license. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This license does not grant you the right to use any trademark, service |
112
|
|
|
|
|
|
|
mark, tradename, or logo of the Copyright Holder. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
This license includes the non-exclusive, worldwide, free-of-charge |
115
|
|
|
|
|
|
|
patent license to make, have made, use, offer to sell, sell, import and |
116
|
|
|
|
|
|
|
otherwise transfer the Package with respect to any patent claims |
117
|
|
|
|
|
|
|
licensable by the Copyright Holder that are necessarily infringed by the |
118
|
|
|
|
|
|
|
Package. If you institute patent litigation (including a cross-claim or |
119
|
|
|
|
|
|
|
counterclaim) against any party alleging that the Package constitutes |
120
|
|
|
|
|
|
|
direct or contributory patent infringement, then this Artistic License |
121
|
|
|
|
|
|
|
to you shall terminate on the date that such litigation is filed. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER |
124
|
|
|
|
|
|
|
AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. |
125
|
|
|
|
|
|
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
126
|
|
|
|
|
|
|
PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY |
127
|
|
|
|
|
|
|
YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR |
128
|
|
|
|
|
|
|
CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR |
129
|
|
|
|
|
|
|
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, |
130
|
|
|
|
|
|
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=cut |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
1; # End of App::Spoor::LoginUnitFile |