From a63fa3663362618d83c9e812e83d6593882fa0b8 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 16 Apr 2024 01:47:01 -0400 Subject: [PATCH] license headers --- README | 24 ++++++++++++++++++++++++ failmail | 10 +++++++++- log-once | 21 +++++++++++++++++++++ logmail | 10 +++++++++- logq | 10 +++++++++- logq-function | 10 +++++++++- setup | 10 +++++++++- sysd-mail-once | 10 +++++++++- sysd-prom-fail | 10 +++++++++- sysd-prom-fail-install | 10 +++++++++- 10 files changed, 117 insertions(+), 8 deletions(-) diff --git a/README b/README index e7fab7e..89a3a56 100644 --- a/README +++ b/README @@ -1,3 +1,24 @@ +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + Log output, conditionally email or print it The main documentation is availiable via --help and near the top of the @@ -5,3 +26,6 @@ bash script files which sit next to this file. Please email me if you have a patches, bugs, feedback, or republish this somewhere else: Ian Kelling . + +All files in this repo are licensed under the Apache License, Version +2.0, as specified at the start of the file. diff --git a/failmail b/failmail index c420465..6bb1e94 100755 --- a/failmail +++ b/failmail @@ -1,5 +1,12 @@ #!/bin/bash -# Copyright (C) 2016 Ian Kelling +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,6 +20,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + case $1 in -h|--help) cat <<'EOF' diff --git a/log-once b/log-once index 5ada71b..8cfe388 100755 --- a/log-once +++ b/log-once @@ -1,4 +1,25 @@ #!/bin/bash +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Copyright (C) 2019 Ian Kelling # Log errors once or so instead of many times. diff --git a/logmail b/logmail index bece0ae..ba36a9e 100755 --- a/logmail +++ b/logmail @@ -1,5 +1,12 @@ #!/bin/bash -# Copyright (C) 2016 Ian Kelling +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,6 +20,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + case $1 in -h|--help) cat <<'EOF' diff --git a/logq b/logq index 08b059d..ae7a26e 100755 --- a/logq +++ b/logq @@ -1,5 +1,12 @@ #!/bin/bash -# Copyright (C) 2014-2016 Ian Kelling +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,6 +20,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + # This file is exactly the same as logq-function except the last line # to make it into a script. logq () { diff --git a/logq-function b/logq-function index 2ae5dae..a18319f 100644 --- a/logq-function +++ b/logq-function @@ -1,5 +1,12 @@ #!/bin/bash -# Copyright (C) 2014-2016 Ian Kelling +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,6 +19,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + logq () { local help="Usage: logq [-h|--help] COMMAND [ARG...] diff --git a/setup b/setup index 9044d45..eefb056 100755 --- a/setup +++ b/setup @@ -1,5 +1,12 @@ #!/bin/bash -# Copyright (C) 2017 Ian Kelling +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,6 +20,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR diff --git a/sysd-mail-once b/sysd-mail-once index 659fa92..2c9d026 100755 --- a/sysd-mail-once +++ b/sysd-mail-once @@ -1,5 +1,12 @@ #!/bin/bash -# Copyright (C) 2016 Ian Kelling +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,6 +21,7 @@ # limitations under the License. + set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR diff --git a/sysd-prom-fail b/sysd-prom-fail index 0781ff4..d8a2c0a 100755 --- a/sysd-prom-fail +++ b/sysd-prom-fail @@ -1,5 +1,12 @@ #!/bin/bash -# Copyright (C) 2022 Ian Kelling +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,6 +21,7 @@ # limitations under the License. + # requires 1.4.0 to run with multiple units due to bug before that: # https://github.com/prometheus/node_exporter/pull/2475 diff --git a/sysd-prom-fail-install b/sysd-prom-fail-install index f25510e..5d24fa8 100755 --- a/sysd-prom-fail-install +++ b/sysd-prom-fail-install @@ -1,5 +1,12 @@ #!/bin/bash -# Copyright (C) 2022 Ian Kelling +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,6 +20,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + # usage: since this is a counter, in prometheus alert manager you will # need to test something like: rate(node_systemd_unit_result_fail_count[30m]) > 0 -- 2.30.2