Utility shell scripts for easying usage or administration of GNU/Linux or, in some cases, any POSIX-compliant operating system. [Avatar: shellscript from Papirus (GPLv3)]
Find a file
2025-10-17 17:30:22 -03:00
.gitignore Add png-optimize, uffs-openconnect, etc. 2025-04-22 14:19:52 -03:00
apt_wrapper.sh Add png-optimize, uffs-openconnect, etc. 2025-04-22 14:19:52 -03:00
common-functions.sh Change nm-keep, traceroute-map 2025-08-25 22:20:33 -03:00
docker-services Fix docker-services; new uffs-vpnc 2025-09-08 21:16:55 -03:00
LICENSE.md Introducing common-functions.sh 2024-07-10 21:04:34 -03:00
LICENSE.pt.md New uffs-openconnect version. 2025-04-23 12:09:27 -03:00
nm-keep nm-keep: -q now only outputs when error; new --dots 2025-10-17 17:30:22 -03:00
ntfy-is-running.sh Add apt_wrapper.sh, ntfy-is-running.sh 2024-09-13 10:46:39 -03:00
png-optimize Rename png-optimize.sh to png-optimize and change it. 2025-06-05 13:28:21 -03:00
psgrep Add psgrep tool. 2024-10-01 22:19:16 -03:00
README.md Change README.md 2025-04-24 00:28:24 -03:00
traceroute-map Change nm-keep, traceroute-map 2025-08-25 22:20:33 -03:00
uffs-openconnect New uffs-openconnect version. 2025-04-23 12:09:27 -03:00
uffs-openconnect-local-resolvconf Rename png-optimize.sh to png-optimize and change it. 2025-06-05 13:28:21 -03:00
uffs-openconnect.conf New uffs-openconnect version. 2025-04-23 12:09:27 -03:00
uffs-openconnect_hipreport.sh New uffs-openconnect version. 2025-04-23 12:09:27 -03:00
uffs-vpnc Fix docker-services; new uffs-vpnc 2025-09-08 21:16:55 -03:00
zswap-stats Add zwap-stats 2025-06-05 13:29:30 -03:00

shell-utils

Utility shell scripts for easying usage or administration of GNU/Linux or, in some cases, any POSIX-compliant operating system.

Contents

apt_wrapper.sh

Script that can be symlinked to /usr/local/bin and sets the environment variable LD_PRELOAD to use the latest version of the libgnutls library found in /usr/local/lib before invoking the requested command apt or apt-get. It ensures that the specified command is executed with the desired library version. It is useful on very old machines when you try apt update with some https repository.

common-functions.sh

Defines common functions that can be loaded by other POSIX Shell scripts.

nm-keep

Checks an appointed host by pinging it every fixed interval and (re)opens a NetworkManager connection on fail.

ntfy-is-running.sh (unfinished) 🚧

Checks every X secs (default 5) if a process matching a pattern is running, otherwise sends notification to a ntfy.sh topic ID and ends.

png-optimize.sh

Optimizes PNG files using tools like pngquant, optipng, and pngcrush. By default, it does not reduce the color palette but automatically resizes images larger than 512x512 pixels unless --no-resize is specified.

psgrep

Shortcut to filter the output of command ps by some pattern.

uffs-openconnect

Asks for a password and connects to the proprietary PANGP VPN in a loop using OpenConnect.

Setting it up

Keep all uffs-openconnect* files together in a single directory. Make sure uffs-openconnect is executable (chmod a+rx uffs-openconnect) and create a symbolic link to it at /usr/local/bin (for all users) or your own ($HOME/bin). Example with ~/src/shell-utils:

ln -s ~/src/shell-utils/uffs-openconnect /usr/local/bin
uffs-openconnect --help

GPLv3 - Free Software - Free as in Freedom

Copyright © 2024,2025 Federal University of Fronteira Sul

This is Free Software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License ("GPLv3"), or (at your option) any later version.

These programs are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Notes

This project complies with Federal Law 14.063/2020 (Art. 16) by licensing its code under GPLv3. It guarantees all public entities the right to use, modify, and redistribute it, provided derivative works are distributed under the same license.

Context

Federal universities in Brazil are national semi-autonomous public entities (autarchies) under the Ministry of Education.

Software wholly developed by the government — including universities — must be regulated by an "open source" license that grants the Four Freedoms of Free Software to public institutions, aligning with Public Administration principles of Publicity and Efficiency.

As mandated by Law number 14063 (September 23, 2020), Article 16, head clause (official text in Portuguese):

Art. 16. Os sistemas de informação e de comunicação desenvolvidos exclusivamente por órgãos e entidades da administração direta, autárquica e fundacional dos Poderes e órgãos constitucionalmente autônomos dos entes federativos são regidos por licença de código aberto, permitida a sua utilização, cópia, alteração e distribuição sem restrições por todos os órgãos e entidades abrangidos por este artigo.

Unofficial translation:

Article 16. Information and communication systems created exclusively by direct, autarchic and foundational administration bodies and entities of the Branches [Executive, Legislative, Judicial] and constitutionally autonomous bodies of federation entities [Federal Union, states, municipalities] must be governed by open-source license, permitting unrestricted use, copying, modification and distribution by all bodies and entities covered by this article.

The GPLv3 satisfies this requirement as it is both a
Free Software license and an Open Source license, while ensuring that collaborative improvements remain freely accessible to all public institutions.