shell scripts for administering linux machines
| bin | ||
| env | ||
| README.md | ||
| TODO.md | ||
these are my shell scripts for making the command line a little easier bc typing is hard
setup
- clone this repo
- add the following to your
.profileor equivalent:
and change the value in the first line to the real path.AS_PATH=/path/to/admin-scripts PATH="$AS_PATH/bin:$PATH" . "$AS_PATH/env" - set any environment variables you want from the table below.
environment variables you can use
| name | description | default |
|---|---|---|
COMPOSE_ROOT |
path where dc will do its work |
/opt/compose |
S_INIT |
manually override the init system s assumes |
`` |
scenarios
systemd, openrc
s <service_name> <action>- action can be one of: edit, logs, off, on, restart, start, status. stop
docker
- keep multiple separate docker compose files in their own dirs
- update them all with
update-compose dc <stack> <command>works the same ass
update-*
update, upgrade, and collect garbage (depending on the type of service)
- apt - for debian and its derivatives*.
- compose - update stacks in
$COMPOSE_ROOT - caddy* - iterates
$CADDY_ROOT's subdirs, pulls git repos, and runsbuild.shif it exists. then restarts caddy.
* untested