Compare commits

..

6 commits

17 changed files with 325 additions and 41 deletions

View file

@ -1,59 +1,77 @@
# This is the gitattributesdb database file.
# Do not manually edit this file - any changes will be overwritten.
LmdpdGhvb2tzL2dpdGF0dHJpYnV0ZXNkYg== 1757608819 1757607082 root:root 0755 - -
LmdpdGhvb2tzL2dpdGF0dHJpYnV0ZXNkYg== 1757608819 1757608819 root:root 0755 - -
LmdpdGhvb2tzL3Bvc3QtY2hlY2tvdXQ= 1757519106 1757519106 root:root 0755 - -
LmdpdGhvb2tzL3Bvc3QtbWVyZ2U= 1757519106 1757519106 root:root 0755 - -
LmdpdGhvb2tzL3ByZS1jb21taXQ= 1757519106 1757519106 root:root 0755 - -
LmdpdGlnbm9yZQ== 1757593248 1757519258 root:root 0644 - -
LmdpdGlnbm9yZQ== 1757761402 1757593248 root:root 0644 - -
LmdpdG1vZHVsZXM= 1757607701 1757607701 root:root 0644 - -
ZXRjLy5naXRpZ25vcmU= 1757611781 1757519519 root:root 0644 - -
ZXRjL2NvbmYuZC8uZ2l0aWdub3Jl 1757609410 1757591792 root:root 0644 - -
ZXRjL2NvbmYuZC9ib290bWlzYw== 1757591865 1753258583 root:root 0644 - -
ZXRjL2NvbmYuZC9ub2RlLWV4cG9ydGVy 1757592526 1746978132 root:root 0644 - -
ZXRjL2NvbmYuZC9zYW1iYQ== 1757592912 1748355660 root:root 0644 - -
ZXRjL2NvbmYuZC9zc2hk 1757593051 1748289885 root:root 0644 - -
ZXRjLy5naXRpZ25vcmU= 1757611781 1757611781 root:root 0644 - -
ZXRjL2NvbmYuZC8uZ2l0aWdub3Jl 1757609410 1757609410 root:root 0644 - -
ZXRjL2NvbmYuZC9ib290bWlzYw== 1757591865 1757591865 root:root 0644 - -
ZXRjL2NvbmYuZC9ub2RlLWV4cG9ydGVy 1757592526 1757592526 root:root 0644 - -
ZXRjL2NvbmYuZC9zYW1iYQ== 1757592912 1757592912 root:root 0644 - -
ZXRjL2NvbmYuZC9zc2hk 1757593051 1757593051 root:root 0644 - -
ZXRjL2NvbmYuZC90ZXJyYWZvcm0taHR0cC1iYWNrZW5k 1757595391 1757595391 root:root 0644 - -
ZXRjL2Nyb250YWJzL3Jvb3Q= 1757593504 1742908603 root:root 0600 - -
ZXRjL2dyb3Vw 1757594224 1757587383 root:root 0644 - -
ZXRjL2hvc3RuYW1l 1757594311 1742908603 root:root 0644 - -
ZXRjL2hvc3Rz 1757594362 1742908603 root:root 0644 - -
ZXRjL2Nyb250YWJzL3Jvb3Q= 1757593504 1757593504 root:root 0600 - -
ZXRjL2dyb3Vw 1757761113 1757594224 root:root 0644 - -
ZXRjL2hvc3RuYW1l 1757594311 1757594311 root:root 0644 - -
ZXRjL2hvc3Rz 1757594362 1757594362 root:root 0644 - -
ZXRjL2xvY2FsLmQvLmdpdGlnbm9yZQ== 1757595481 1757595481 root:root 0644 - -
ZXRjL2xvY2FsLmQvdGVycmFmb3JtLWh0dHAtYmFja2VuZC5zdGFydA== 1757595926 1757595926 root:root 0755 - -
ZXRjL25ldHdvcmsvLmdpdGlnbm9yZQ== 1757596572 1757596537 root:root 0644 - -
ZXRjL25ldHdvcmsvaW50ZXJmYWNlcw== 1757596330 1757596330 root:root 0644 - -
ZXRjL3Bhc3N3ZA== 1757594202 1757587706 root:root 0644 - -
ZXRjL3BlcmlvZGljL2RhaWx5L2Nyb25qb2ItZGVoeWRyYXRlZA== 1757596692 1757596692 root:root 0777 - -
ZXRjL3BlcmlvZGljL2RhaWx5L2Nyb25qb2ItdXBkYXRlLXBhY2thZ2VzLWxpc3Q= 1757596702 1757596702 root:root 0777 - -
ZXRjL3BlcmlvZGljL2RhaWx5L2Nyb25qb2Itd2Fybi1naXQtc3RhdHVz 1757596711 1757596711 root:root 0777 - -
ZXRjL3BrZ2xpc3Q= 1757609913 1757596720 root:root 0644 - -
ZXRjL25ldHdvcmsvLmdpdGlnbm9yZQ== 1757596572 1757596572 root:root 0644 - -
ZXRjL25ldHdvcmsvaW50ZXJmYWNlcw== 1757759982 1757596330 root:root 0644 - -
ZXRjL3Bhc3N3ZA== 1757761151 1757594202 root:root 0644 - -
ZXRjL3BlcmlvZGljL2RhaWx5L2Nyb25qb2ItZGVoeWRyYXRlZA== 1757708520 1757708520 root:root 0777 - -
ZXRjL3BlcmlvZGljL2RhaWx5L2Nyb25qb2ItdXBkYXRlLXBhY2thZ2VzLWxpc3Q= 1757708520 1757708520 root:root 0777 - -
ZXRjL3BlcmlvZGljL2RhaWx5L2Nyb25qb2Itd2Fybi1naXQtc3RhdHVz 1757708520 1757708520 root:root 0777 - -
ZXRjL3BrZ2xpc3Q= 1757609913 1757609913 root:root 0644 - -
ZXRjL3Jlc29sdi5jb25m 1757611605 1757611605 root:root 0644 - -
ZXRjL3J1bmxldmVscy9ib290Ly5naXRpZ25vcmU= 1757598667 1757598667 root:root 0644 - -
ZXRjL3J1bmxldmVscy9ib290L3JzeXNsb2c= 1757597614 1757597614 root:root 0777 - -
ZXRjL3J1bmxldmVscy9ib290L3JzeXNsb2c= 1757708520 1757708520 root:root 0777 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0Ly5naXRpZ25vcmU= 1757598703 1757598703 root:root 0644 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0L2FwYWNoZTI= 1757597877 1757597877 root:root 0777 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0L25vZGUtZXhwb3J0ZXI= 1757598252 1757598252 root:root 0777 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0L3BocC1mcG04Mw== 1757597971 1757597971 root:root 0777 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0L3NhbWJh 1757598258 1757598258 root:root 0777 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0L3NzaGQ= 1757598265 1757598265 root:root 0777 - -
ZXRjL3J1bmxldmVscy9zaHV0ZG93bi9zYW1iYQ== 1757598546 1757598546 root:root 0777 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0L2FwYWNoZTI= 1757708520 1757708520 root:root 0777 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0L25vZGUtZXhwb3J0ZXI= 1757708520 1757708520 root:root 0777 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0L3BocC1mcG04Mw== 1757708520 1757708520 root:root 0777 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0L3NhbWJh 1757708520 1757708520 root:root 0777 - -
ZXRjL3J1bmxldmVscy9kZWZhdWx0L3NzaGQ= 1757708520 1757708520 root:root 0777 - -
ZXRjL3J1bmxldmVscy9zaHV0ZG93bi9zYW1iYQ== 1757708520 1757708520 root:root 0777 - -
ZXRjL3NoYWRvdy5ncGc= 1757599010 1757599010 root:root 0644 - -
ZXRjL3NzaC8uZ2l0aWdub3Jl 1757606957 1757606957 root:root 0644 - -
ZXRjL3NzaC9zc2hfY29uZmln 1757606630 1748289885 root:root 0644 - -
ZXRjL3NzaC9zc2hkX2NvbmZpZw== 1757606896 1748289885 root:root 0644 - -
ZXRjL3N1ZG9lcnMuZC9kZWZhdWx0cw== 1757599359 1757599359 root:root 0644 - -
ZXRjL3N1ZG9lcnMuZC9yb290LWFjY2Vzcw== 1757600157 1757599955 root:root 0644 - -
b3B0L3NiaW4vY3JvbmpvYi1kZWh5ZHJhdGVk 1757531685 1757531121 root:root 0755 - -
ZXRjL3NzaC9zc2hfY29uZmln 1757606630 1757606630 root:root 0644 - -
ZXRjL3NzaC9zc2hkX2NvbmZpZw== 1757606896 1757606896 root:root 0644 - -
ZXRjL3N1ZG9lcnMuZC9kZWZhdWx0cw== 1757599359 1757599359 root:root 0640 - -
ZXRjL3N1ZG9lcnMuZC9yb290LWFjY2Vzcw== 1757600157 1757600157 root:root 0640 - -
aG9tZS8uZ2l0aWdub3Jl 1757762052 1757762052 root:root 0644 - -
aG9tZS9zeXNhZG1pbi8uYmFzaF9sb2dvdXQ= 1757582867 1757582867 sysadmin:users 0644 - -
aG9tZS9zeXNhZG1pbi8uYmFzaF9wcm9maWxl 1757584711 1757584711 sysadmin:users 0644 - -
aG9tZS9zeXNhZG1pbi8uYmFzaHJj 1757761708 1757586493 sysadmin:users 0644 - -
aG9tZS9zeXNhZG1pbi8uZ2l0Y29uZmln 1757582738 1757582738 sysadmin:users 0644 - -
aG9tZS9zeXNhZG1pbi8uZ2l0aWdub3Jl 1757600312 1757600312 sysadmin:users 0644 - -
aG9tZS9zeXNhZG1pbi8ubG9jYWwvc2hhcmUvbmFuby8uZ2l0aWdub3Jl 1757586210 1757586210 sysadmin:users 0644 - -
aG9tZS9zeXNhZG1pbi8ubmFub3Jj 1757585756 1757585756 sysadmin:users 0644 - -
aG9tZS9zeXNhZG1pbi8uc3NoLy5naXRpZ25vcmU= 1757593349 1757593349 sysadmin:users 0644 - -
aG9tZS9zeXNhZG1pbi8uc3NoL2F1dGhvcml6ZWRfa2V5cw== 1757763178 1757587611 sysadmin:users 0644 - -
b3B0L3NiaW4vY3JvbmpvYi1kZWh5ZHJhdGVk 1757531685 1757531685 root:root 0755 - -
b3B0L3NiaW4vY3JvbmpvYi11cGRhdGUtcGFja2FnZXMtbGlzdA== 1757531121 1757531121 root:root 0755 - -
b3B0L3NiaW4vY3JvbmpvYi13YXJuLWdpdC1zdGF0dXM= 1757591137 1757531121 root:root 0755 - -
b3B0L3NiaW4vY3JvbmpvYi13YXJuLWdpdC1zdGF0dXM= 1757591137 1757591137 root:root 0755 - -
b3B0L3NiaW4vZGVoeWRyYXRlZA== 1757531557 1757531557 root:root 0755 - -
b3B0L3NiaW4vdGVycmFmb3JtLWh0dHAtYmFja2VuZA== 1757590543 1757590373 root:root 0755 - -
b3B0L3NiaW4vdGVycmFmb3JtLWh0dHAtYmFja2VuZA== 1757590543 1757590543 root:root 0755 - -
cm9vdC8uYmFzaF9sb2dvdXQ= 1757582867 1757582867 root:root 0644 - -
cm9vdC8uYmFzaF9wcm9maWxl 1757584711 1757583130 root:root 0644 - -
cm9vdC8uYmFzaHJj 1757586493 1756308199 root:root 0644 - -
cm9vdC8uYmFzaF9wcm9maWxl 1757584711 1757584711 root:root 0644 - -
cm9vdC8uYmFzaHJj 1757586493 1757586493 root:root 0644 - -
cm9vdC8uZ2l0Y29uZmln 1757582738 1757582738 root:root 0644 - -
cm9vdC8uZ2l0aWdub3Jl 1757600312 1757582502 root:root 0644 - -
cm9vdC8uZ2l0aWdub3Jl 1757600312 1757600312 root:root 0644 - -
cm9vdC8ubG9jYWwvc2hhcmUvbmFuby8uZ2l0aWdub3Jl 1757586210 1757586210 root:root 0644 - -
cm9vdC8ubmFub3Jj 1757585756 1757585706 root:root 0644 - -
cm9vdC8ubmFub3Jj 1757585756 1757585756 root:root 0644 - -
cm9vdC8uc3NoLy5naXRpZ25vcmU= 1757593349 1757593349 root:root 0644 - -
cm9vdC8uc3NoL2F1dGhvcml6ZWRfa2V5cw== 1757587611 1757587611 root:root 0644 - -
ZXRjL2RvYXMuY29uZg== 1728635393 1728635393 root:root 0640 - -
ZXRjL2RvYXMuZA== 1757595612 1757595612 root:root 0750 - -
ZXRjL3NoYWRvdw== 1757761290 1757702629 root:shadow 0640 - -
ZXRjL3NoYWRvdy0= 1757702585 1757702585 root:shadow 0640 - -
ZXRjL3N1ZG9lcnM= 1753553353 1753553353 root:root 0440 - -
ZXRjL3N1ZG9lcnMuZC9kZWZhdWx0cw== 1757599359 1757599359 root:root 0640 - -
ZXRjL3N1ZG9lcnMuZC9yb290LWFjY2Vzcw== 1757600157 1757600157 root:root 0640 - -
aG9tZS9zeXNhZG1pbg== 1757761743 1757761412 sysadmin:users 0711 - -

7
.gitattributesdb-extra Normal file
View file

@ -0,0 +1,7 @@
ZXRjL2RvYXMuY29uZg==
ZXRjL2RvYXMuZA==
ZXRjL3NoYWRvdw==
ZXRjL3NoYWRvdy0=
ZXRjL3N1ZG9lcnM=
ZXRjL3N1ZG9lcnMuZC8q
aG9tZS9zeXNhZG1pbg==

@ -1 +1 @@
Subproject commit 50a5ff15735ab08e83e14be27c7491ba15036c99
Subproject commit 6f956ff56af0a65b6dd8f84aa845031c22998c61

1
.gitignore vendored
View file

@ -5,7 +5,6 @@
/bin/
/dev/
/home/
/lib/
/media/
/mnt/

View file

@ -37,4 +37,3 @@ klogd:x:101:klogd
apache:x:102:apache
prometheus:x:103:prometheus
thb:x:500:thb
sysadmin:x:1000:sysadmin

View file

@ -3,3 +3,12 @@ iface eth0 inet static
address 5.101.171.215/28
gateway 5.101.171.209
mtu 9000
iface eth0 inet6 static
address 2a01:a500:2981:1::d7/64
gateway 2a01:a500:2981:1:ff:ff:ff:ff
mtu 9000
auto eth1
iface eth1 inet static
address 10.254.0.215/24
mtu 9000

View file

@ -19,4 +19,4 @@ klogd:x:100:101:klogd:/dev/null:/sbin/nologin
apache:x:101:102:apache:/var/www:/sbin/nologin
prometheus:x:102:103:prometheus:/var/lib/prometheus:/sbin/nologin
thb:x:500:500:terraform http backend:/var/lib/terraform-http-backend:/sbin/nologin
sysadmin:x:1000:1000:Systems' Administrator:/home/sysadmin:/bin/bash
sysadmin:x:1000:100:Systems' Administrator:/home/sysadmin:/bin/bash

2
home/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/*/
!/sysadmin/

View file

@ -0,0 +1,14 @@
#!/bin/bash - not strictly necessary, but helps nano with syntax highlighting.
# Clear the screen/console on logout.
if (( SHLVL == 1 )); then
if [[ -x /usr/bin/clear_console ]]; then
/usr/bin/clear_console -q
elif [[ -x /usr/bin/clear ]]; then
/usr/bin/clear
elif [[ -x /usr/bin/tput ]]; then
/usr/bin/tput clear
else
echo -ne "\e[2J"
fi
fi

View file

@ -0,0 +1,19 @@
#!/bin/bash - not strictly necessary, but helps nano with syntax highlighting.
# Bash shell environmental set up.
export LANG="en_GB.UTF-8"
export LC_COLLATE="POSIX" # 'C' causes issues with some applications
export PATH="/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
hash less >/dev/null 2>&1 && export PAGER="less"
hash nano >/dev/null 2>&1 && export EDITOR="nano" && export VISUAL="$EDITOR"
[[ -d "$HOME/files/bin" ]] && export PATH="$HOME/files/bin:$PATH"
[[ -d "$HOME/.local/bin" ]] && export PATH="$HOME/.local/bin:$PATH"
[[ -d "$HOME/bin" ]] && export PATH="$HOME/bin:$PATH"
for FILE in "$HOME"/.bash_profile.d/*; do
[[ -x "$FILE" ]] && source "$FILE"
done
unset FILE
[[ -f "$HOME/.bashrc" ]] && . "$HOME/.bashrc"

52
home/sysadmin/.bashrc Normal file
View file

@ -0,0 +1,52 @@
#!/bin/bash - not strictly necessary, but helps nano with syntax highlighting.
# Bash specific configuration.
prompt_user_colour() {
# Determine the colour of the username in the prompt.
if [[ "$(whoami)" == "root" ]]; then
printf "%s" "1;31m" # Bright Red.
elif [[ "$(whoami)" == "tadgy" ]]; then
printf "%s" "1;32m" # Bright Green.
else
printf "%s" "1;36m" # Bright Cyan.
fi
return 0
}
shopt -s cdspell checkhash checkjobs checkwinsize cmdhist dirspell histappend no_empty_cmd_completion
HISTCONTROL="ignoredups"
HISTFILE="$HOME/.bash_history-${HOSTNAME%%.*}"
HISTFILESIZE=1000000
HISTIGNORE="bg:bg *:fg:fg *:jobs:exit:clear:history"
HISTSIZE=1000000
HISTTIMEFORMAT="%d/%m/%y %H:%M:%S "
IGNOREEOF=0
PROMPT_DIRTRIM=2
PS1='[\[\033[$(__prompt_user_colour)\]\u\[\033[0m\]@\[\033[1;33m\]\h\[\033[0m\]] \[\033[1;34m\]\w\[\033[0m\] ->'
history -a
history -r
hash grep >/dev/null 2>&1 && { alias egrep='grep -E'; alias fgrep='grep -F'; }
hash ps grep >/dev/null 2>&1 && psgrep() {
if [[ -n "$1" ]]; then
# shellcheck disable=SC2009
ps | command grep -E -- "(.*RSS.*|$1)" | command grep -F -v '(.*RSS.*|'
else
printf "%s: %s\\n" "Usage" "${FUNCNAME[0]} <something>" >&2
return 1
fi
}
hash ls >/dev/null 2>&1 && alias ls='ls -Fv --color=always'
hash nc >/dev/null 2>&1 && alias pastebin='nc termbin.com 9999'
echo -ne "\e[2q"
echo -ne "\e]12;#00FF00"
for FILE in "$HOME"/.bashrc.d/*; do
[[ -x "$FILE" ]] && source "$FILE"
done
unset FILE

27
home/sysadmin/.gitconfig Normal file
View file

@ -0,0 +1,27 @@
[user]
name = Darren 'Tadgy' Austin
email = darren@afterdark.org.uk
[color]
branch = auto
diff = auto
grep = auto
interactive = auto
showBranch = auto
status = auto
ui = auto
[credential]
username = tadgy
helper = cache --timeout 2592000
[commit]
verbose = 1
[push]
autoSetupRemote = true
[alias]
c = commit
co = checkout
d = diff
lsut = ls-files --others --exclude-standard --directory --error-unmatch -- ':/*'
p = push
s = status
[init]
defaultBranch = master

8
home/sysadmin/.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
/*
!/.*
!/.*/
!/.*/**
/.bash_history*
/.gnupg/
/.nano_history

View file

@ -0,0 +1 @@
/search_history

125
home/sysadmin/.nanorc Normal file
View file

@ -0,0 +1,125 @@
## When soft line wrapping is enabled, make it wrap lines at blank characters.
set atblanks
## Use auto-indentation.
set autoindent
## When saving a file, create a backup file by adding a tilde (~).
# set backup
## Automatically hard-wrap the current line when it becomes overlong.
# set breaklonglines
## Do case-sensitive searches by default.
# set casesensitive
## Do not use the line below the title bar.
# set emptyline
## Set the line length for wrapping text and justifying paragraphs.
set fill -2
## Draw a vertical stripe at the given column
#set guidestripe 190
## Remember the used search/replace strings for the next session.
set historylog
## Display a "scrollbar" on the righthand side of the edit window.
# set indicator
## Scroll the buffer contents per half-screen instead of per line.
# set jumpyscrolling
## Display line numbers to the left of the text area.
set linenumbers
## Enable vim-style lock-files.
set locking
## Use libmagic for syntax highlighting suggestions.
# set magic
## Don't display the helpful shortcut lists at the bottom of the screen.
set nohelp
## Don't add newlines to the ends of files.
# set nonewlines
## Save the cursor position of files between editing sessions.
# set positionlog
## Do quick statusbar blanking.
set quickblank
## Do extended regular expression searches by default.
# set regexp
## Make the Home key smarter.
set smarthome
## Enable soft line wrapping (AKA full-line display).
set softwrap
## Use this spelling checker instead of the internal one.
# set speller "aspell -x -c"
## Show flags in the title bar.
set stateflags
## When justifying text, trailing whitespace will automatically be removed.
set trimblanks
## The two characters used to indicate the presence of tabs and spaces.
set whitespace »·
## Detect word boundaries more accurately by treating punctuation
## characters as parts of words.
set wordbounds
## Let an unmodified Backspace or Delete erase the marked region, without
## affecting the cut-buffer.
# set zap
## Paint the interface elements of nano.
set errorcolor brightwhite,red
set functioncolor magenta
set keycolor brightwhite
set numbercolor brightwhite,magenta
set promptcolor brightwhite,magenta
set scrollercolor brightwhite,magenta
set selectedcolor brightwhite,blue
set spotlightcolor black,yellow
set statuscolor brightwhite,magenta
set stripecolor ,magenta
set titlecolor brightwhite,magenta
## Include all existing syntax highlight definitions.
# include "/usr/share/nano/*.nanorc"
## Key bindings.
## The following five functions are not bound to any key by default.
## You may wish to choose different keys than the ones suggested here.
# bind ^S savefile main
# bind M-Q findprevious main
# bind M-W findnext main
# bind M-B cutwordleft main
# bind M-N cutwordright main
## Set this if your Backspace key sends Del most of the time.
# bind Del backspace all
# Unbind the ^J (justification) shortcut as it's annoying.
unbind ^J main
# Allow ^Z to suspend nano.
bind ^Z suspend main
# Allow marking using ^Space.
bind ^Space mark main
# Select buffers.
bind M-9 nextbuf main
bind M-0 prevbuf main
# Use anchors.
bind Ins anchor main
bind M-, prevanchor main
bind M-. nextanchor main

2
home/sysadmin/.ssh/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/known_hosts
/known_hosts.old

View file

@ -0,0 +1,2 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF6Gx1rYhHHsbFCG2rsIaunvunacO0vUQK9O50gfhz9c Slackware UK Systems' Administrator <sysadmin@slackware.uk>
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICsx4EY4vbDt0TXGZsW9UjOxj+s/mVeytJ7lW5rAu0gS Darren 'Tadgy' Austin <darren@afterdark.org.uk>