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