Code Monkey home page Code Monkey logo

captain-contraption's Introduction

captain-contraption

A set of useful tools for managing a Linux system.

Overview

I could have named this project admin-tools, but that would have been too boring. Fortunately, an online thesaurus helped me derive a better name. Of all the possible synonyms for admin and tools, I thought captain and contraption made the funniest project name. That's all there is to the name.

captain_contraption is my attempt to formalize and share some of the scripts I have used over the years. This is really an eclectic mix of scripts with no real overarching plan. I hope these will be useful when you are managing the contraptions (computers) over which you are the captain (admin). Of course, please feel free to help me grow this project.

Contents

nft-edit

nft-edit is a simple wrapper to reduce the tedium of editing, checking, and reloading firewall rules. It loads the rules in your preferred text editor. When you exit your editor, it checks the rules for errors. If no errors are found, it loads the new rules, and prints them for visual inspection.

mutate

To prevent accidental overwrites or deletions, immutable files are useful. However, running chattr twice is tedious. This script takes the file to edit as a commandline argument and opens it in your preferred text editor. If the immutable attribute is set, the script will clear it before editing and set it after editing. If the file is not immutable, then the file is left immutable. In this way, this script can be an all-purpose synonym for your preferred text editor.

aide-init, aide-update, aide-check

These scripts simplify rotating databases, etc. when running aide.

  • aide-init creates a new database and rotates any existing database (e.g., aide.db.gz -> aide.db.old.gz).
  • aide-update reports changed files, creates a new database, and rotates databases (e.g., aide.db.gz -> aide.db.old.gz and aide.db.new.gz -> aide.db.gz).
  • aide-check only reports changed files. No changes to databases.

iface-restart

Restarts an interface that is controlled by Network Manager (using nmcli) with a three-second pause between down and up operations.

find-removed-packages

The Apt package manager will not automatically remove generated data and altered config files. This is good; however, sometimes you really want to remove everything. This simple tool will list the packages that have residual files. Those packages may be then manually removed using the apt purge command.

captain-contraption's People

Contributors

tonywalker1 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.