-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packaging: add debian scripts and manpage
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: ringlog | ||
Version: @VERSION@ | ||
Section: utils | ||
Priority: optional | ||
Architecture: amd64 | ||
Maintainer: Andi Hechtbauer <[email protected]> | ||
Description: pipe-friendly utility to manage log files by capping size or line count | ||
Installed-Size: 2200237 | ||
Depends: libc6 (>= 2.31), systemd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
# postinst script for ringlog | ||
|
||
# Install the man page | ||
if [ -f debian/ringlog.1 ]; then | ||
install -m 644 debian/ringlog.1 /usr/share/man/man1/ringlog.1 | ||
mandb -q || true | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.TH RINGLOG 1 "December 2024" "ringlog 1.0" "User Commands" | ||
.SH NAME | ||
ringlog – pipe-friendly utility to manage log files by capping size or line count. | ||
|
||
.SH SYNOPSIS | ||
.B ringlog | ||
.RI [ options ] | ||
|
||
.SH DESCRIPTION | ||
.B ringlog | ||
is a utility designed to cap log file size or line count while being pipe-friendly. It reads input from stdin and writes to a specified log file, ensuring the log does not grow beyond a defined size or number of lines. | ||
|
||
.SH OPTIONS | ||
.TP | ||
.B \-s <max_size_bytes> | ||
Maximum size of the log file in bytes. | ||
.TP | ||
.B \-l <max_lines> | ||
Maximum number of lines in the log file. | ||
.TP | ||
.B \-f <log_file> | ||
Path to the log file where the input will be appended. | ||
.TP | ||
.B \-v | ||
Enable verbose output. Prints information about log actions to stderr. | ||
|
||
.SH USAGE | ||
.B ringlog | ||
is primarily used to cap log output from scripts or cron jobs to ensure log files remain manageable. | ||
|
||
Example usage: | ||
|
||
.nf | ||
./my_script.sh | ringlog -l 1000 -f /var/log/my_log.log | ||
.fi | ||
|
||
.SH AUTHOR Written by anti-spin. | ||
|
||
.SH LICENSE MIT License. |