From 2fd172fcb1cfc719a2d4f85c9dcc79c867219704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Sch=C3=A4ferdiek?= Date: Mon, 13 Jun 2022 11:31:59 +0200 Subject: [PATCH] Add man pages and separate properly between global systemd and user systemd services and timers --- README.md | 25 +++++++++--- _man/.gitignore | 2 + _man/Gemfile | 4 ++ _man/Gemfile.lock | 19 ++++++++++ _man/README.md | 14 +++++++ _man/src/dotfiles-system.1.ronn | 20 ++++++++++ {dist => _pkg}/.gitignore | 0 {dist => _pkg}/PKGBUILD | 2 +- etc/systemd/system/borgmatic-check@.service | 4 +- etc/systemd/system/borgmatic-check@.timer | 2 +- etc/systemd/system/borgmatic-create@.service | 4 +- etc/systemd/system/borgmatic-create@.timer | 2 +- etc/systemd/system/borgmatic-prune@.service | 4 +- etc/systemd/system/borgmatic-prune@.timer | 2 +- etc/systemd/system/borgmatic@.service | 4 +- etc/systemd/system/borgmatic@.timer | 2 +- etc/systemd/system/restic-check@.service | 6 +-- etc/systemd/system/restic-check@.timer | 2 +- etc/systemd/system/restic-create@.service | 6 +-- etc/systemd/system/restic-create@.timer | 2 +- etc/systemd/system/restic-prune@.service | 6 +-- etc/systemd/system/restic-prune@.timer | 2 +- etc/systemd/user/restic-check@.service | 6 +-- etc/systemd/user/restic-check@.timer | 2 +- etc/systemd/user/restic-create@.service | 10 ++--- etc/systemd/user/restic-create@.timer | 2 +- etc/systemd/user/restic-prune@.service | 6 +-- etc/systemd/user/restic-prune@.timer | 2 +- usr/local/bin/ssh-keygen-rsa | 2 +- .../check_updates/.check_updates.conf.example | 0 .../.disk_space_alert.conf.example | 0 .../docker_check/.docker_check.conf.example | 0 .../docker_check/docker_check.list.example | 0 .../.docker_compose_update.conf | 0 .../dynv6/.dynv6.conf.example | 0 .../.memory_usage_alert.conf.example | 0 .../restic/mybackup/check.sh} | 0 .../restic/mybackup/create.sh} | 0 .../restic/mybackup/env} | 0 .../restic/mybackup/exclude} | 0 .../restic/mybackup/include} | 0 .../restic/mybackup/prune.sh} | 0 .../.smartctl_tests_long.conf.example | 0 .../systemd_check/.systemd_check.conf.example | 0 .../systemd_check/.systemd_check.list.example | 0 .../.systemd_failure_notify.conf.example | 0 usr/share/man/man1/dotfiles-system.1 | 38 +++++++++++++++++++ 47 files changed, 157 insertions(+), 45 deletions(-) create mode 100644 _man/.gitignore create mode 100644 _man/Gemfile create mode 100644 _man/Gemfile.lock create mode 100644 _man/README.md create mode 100644 _man/src/dotfiles-system.1.ronn rename {dist => _pkg}/.gitignore (100%) rename {dist => _pkg}/PKGBUILD (96%) rename usr/share/doc/{ => dotfiles-system}/check_updates/.check_updates.conf.example (100%) rename usr/share/doc/{ => dotfiles-system}/disk_space_alert/.disk_space_alert.conf.example (100%) rename usr/share/doc/{ => dotfiles-system}/docker_check/.docker_check.conf.example (100%) rename usr/share/doc/{ => dotfiles-system}/docker_check/docker_check.list.example (100%) rename usr/share/doc/{ => dotfiles-system}/docker_compose_update/.docker_compose_update.conf (100%) rename usr/share/doc/{ => dotfiles-system}/dynv6/.dynv6.conf.example (100%) rename usr/share/doc/{ => dotfiles-system}/memory_usage_alert/.memory_usage_alert.conf.example (100%) rename usr/share/doc/{restic/mybackup-check.sh => dotfiles-system/restic/mybackup/check.sh} (100%) rename usr/share/doc/{restic/mybackup-create.sh => dotfiles-system/restic/mybackup/create.sh} (100%) rename usr/share/doc/{restic/mybackup.env => dotfiles-system/restic/mybackup/env} (100%) rename usr/share/doc/{restic/mybackup.exclude => dotfiles-system/restic/mybackup/exclude} (100%) rename usr/share/doc/{restic/mybackup.include => dotfiles-system/restic/mybackup/include} (100%) rename usr/share/doc/{restic/mybackup-prune.sh => dotfiles-system/restic/mybackup/prune.sh} (100%) rename usr/share/doc/{ => dotfiles-system}/smartctl_tests_long/.smartctl_tests_long.conf.example (100%) rename usr/share/doc/{ => dotfiles-system}/systemd_check/.systemd_check.conf.example (100%) rename usr/share/doc/{ => dotfiles-system}/systemd_check/.systemd_check.list.example (100%) rename usr/share/doc/{ => dotfiles-system}/systemd_failure_notify/.systemd_failure_notify.conf.example (100%) create mode 100644 usr/share/man/man1/dotfiles-system.1 diff --git a/README.md b/README.md index 141e7b8..45145fd 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,28 @@ # README -A collection of scripts and systemd services which might be useful. +dotfiles-system is a collection of helper systemd services, systemd timers and +shell scripts for common configuration and tasks like -Use at your own risk. +* checking if systemd services and timers are running +* borgmatic backup +* restic backup +* checking if docker containers are running +* batch docker-compose upgrades +* docker housekeeping for removing unused docker containers, volumes and images +* dynamic dns update +* update check for pacman +* memory and disk checks + +Provided systemd services mostly support mail notifications if they have failed +via systemd_failure_notify. + +See `/usr/share/doc/dotfiles-system` for example configurations which should +be copied inside $HOME or /etc depending on the helper script. ## Installation -1. After you pulled, use `./sync` and pick an action which should be self-explaining. -2. Alternatively, build a `pacman` package for ArchLinux via `makepkg -csi` inside the `dist/` folder. +1. Build a `pacman` package for ArchLinux via `makepkg -csi` inside the `dist/` folder (**recommended**). +2. Alternatively, use `./sync` from the git clone and pick an action which should be self-explaining. ## Usage @@ -15,7 +30,7 @@ Services and scripts don't depend on each other but have hints that they can be combined (out-commented line in service files for `systemd_failure_notify@.service` for example). -Examples are given inside `usr/share/doc/`. +Examples are given inside `usr/share/doc/dotfiles-system`. ## FAQ diff --git a/_man/.gitignore b/_man/.gitignore new file mode 100644 index 0000000..a0a4573 --- /dev/null +++ b/_man/.gitignore @@ -0,0 +1,2 @@ +vendor/ +.bundle/ \ No newline at end of file diff --git a/_man/Gemfile b/_man/Gemfile new file mode 100644 index 0000000..eb161ff --- /dev/null +++ b/_man/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" + + +gem "ronn", "~> 0.7.3" diff --git a/_man/Gemfile.lock b/_man/Gemfile.lock new file mode 100644 index 0000000..7cbc678 --- /dev/null +++ b/_man/Gemfile.lock @@ -0,0 +1,19 @@ +GEM + remote: https://rubygems.org/ + specs: + hpricot (0.8.6) + mustache (1.1.1) + rdiscount (2.2.0.2) + ronn (0.7.3) + hpricot (>= 0.8.2) + mustache (>= 0.7.0) + rdiscount (>= 1.5.8) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + ronn (~> 0.7.3) + +BUNDLED WITH + 2.3.15 diff --git a/_man/README.md b/_man/README.md new file mode 100644 index 0000000..c8dd5e4 --- /dev/null +++ b/_man/README.md @@ -0,0 +1,14 @@ +# README + +Build man pages with `ronn`. + +- Install Ruby and `gem` +- Install `gem install bundler` or via system package `bundler` +- Execute the following to build and serve via _Jekyll_ + +```shell +bundle config set --local path 'vendor/bundle' +bundle install +# generate man pages in /usr/share/man/man1 +for file in src/*.ronn; do bn=$(basename $file .ronn); bundle exec ronn --pipe < $file > ../usr/share/man/man1/$bn; done +``` \ No newline at end of file diff --git a/_man/src/dotfiles-system.1.ronn b/_man/src/dotfiles-system.1.ronn new file mode 100644 index 0000000..d88a469 --- /dev/null +++ b/_man/src/dotfiles-system.1.ronn @@ -0,0 +1,20 @@ +# dotfiles-system + +dotfiles-system is a collection of helper systemd services, systemd timers and +shell scripts for common configuration and tasks like + +* checking if systemd services and timers are running +* borgmatic backup +* restic backup +* checking if docker containers are running +* batch docker-compose upgrades +* docker housekeeping for removing unused docker containers, volumes and images +* dynamic dns update +* update check for pacman +* memory and disk checks + +Provided systemd services mostly support mail notifications if they have failed +via systemd_failure_notify. + +See `/usr/share/doc/dotfiles-system` for example configurations which should +be copied inside $HOME or /etc depending on the helper script. \ No newline at end of file diff --git a/dist/.gitignore b/_pkg/.gitignore similarity index 100% rename from dist/.gitignore rename to _pkg/.gitignore diff --git a/dist/PKGBUILD b/_pkg/PKGBUILD similarity index 96% rename from dist/PKGBUILD rename to _pkg/PKGBUILD index d193b12..798dd34 100644 --- a/dist/PKGBUILD +++ b/_pkg/PKGBUILD @@ -1,6 +1,6 @@ pkgname=dotfiles-system-git _pkgname="dotfiles-system" -pkgver=r81.da266c6 +pkgver=r83.7338248 pkgrel=1 pkgdesc="Common system helper scripts" arch=('any') diff --git a/etc/systemd/system/borgmatic-check@.service b/etc/systemd/system/borgmatic-check@.service index c6caae0..09b1f42 100644 --- a/etc/systemd/system/borgmatic-check@.service +++ b/etc/systemd/system/borgmatic-check@.service @@ -1,5 +1,5 @@ [Unit] -Description=Run borgmatic check for %I utilizing HOME/.config/borgmatic/%I.yml file +Description=Run borgmatic check for %I utilizing /etc/borgmatic/%I.yml file OnFailure=systemd_failure_notify@%n.service Wants=network-online.target After=network-online.target @@ -7,7 +7,7 @@ Requires=network-online.target [Service] Type=oneshot -ExecStart=borgmatic check --only repository --only archives --syslog-verbosity 1 --config %h/.config/borgmatic/%I.yml +ExecStart=borgmatic check --only repository --only archives --syslog-verbosity 1 --config /etc/borgmatic/%I.yml Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin" Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh" Environment="BORGMATIC_NAME=%I" diff --git a/etc/systemd/system/borgmatic-check@.timer b/etc/systemd/system/borgmatic-check@.timer index 4f45ef5..01bbc37 100644 --- a/etc/systemd/system/borgmatic-check@.timer +++ b/etc/systemd/system/borgmatic-check@.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run borgmatic %I check timer utilizing HOME/.config/borgmatic/%I.yml file +Description=Run borgmatic check for %I utilizing /etc/borgmatic/%I.yml file [Timer] OnCalendar=Wed 21:30:00 diff --git a/etc/systemd/system/borgmatic-create@.service b/etc/systemd/system/borgmatic-create@.service index c485f54..0c09662 100644 --- a/etc/systemd/system/borgmatic-create@.service +++ b/etc/systemd/system/borgmatic-create@.service @@ -1,5 +1,5 @@ [Unit] -Description=Run borgmatic create for %I utilizing HOME/.config/borgmatic/%I.yml file +Description=Run borgmatic create for %I utilizing /etc/borgmatic/%I.yml file OnFailure=systemd_failure_notify@%n.service Wants=network-online.target After=network-online.target @@ -7,7 +7,7 @@ Requires=network-online.target [Service] Type=oneshot -ExecStart=borgmatic create --syslog-verbosity 1 --config %h/.config/borgmatic/%I.yml +ExecStart=borgmatic create --syslog-verbosity 1 --config /etc/borgmatic/%I.yml Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin" Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh" Environment="BORGMATIC_NAME=%I" diff --git a/etc/systemd/system/borgmatic-create@.timer b/etc/systemd/system/borgmatic-create@.timer index 264f03d..6a1793b 100644 --- a/etc/systemd/system/borgmatic-create@.timer +++ b/etc/systemd/system/borgmatic-create@.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run borgmatic %I create timer utilizing HOME/.config/borgmatic/%I.yml file +Description=Run borgmatic create for %I utilizing /etc/borgmatic/%I.yml file [Timer] OnCalendar=*-*-* 20:00:00 diff --git a/etc/systemd/system/borgmatic-prune@.service b/etc/systemd/system/borgmatic-prune@.service index 51f31f9..b10af29 100644 --- a/etc/systemd/system/borgmatic-prune@.service +++ b/etc/systemd/system/borgmatic-prune@.service @@ -1,5 +1,5 @@ [Unit] -Description=Run borgmatic prune for %I utilizing HOME/.config/borgmatic/%I.yml file +Description=Run borgmatic prune for %I utilizing /etc/borgmatic/%I.yml file OnFailure=systemd_failure_notify@%n.service Wants=network-online.target After=network-online.target @@ -7,7 +7,7 @@ Requires=network-online.target [Service] Type=oneshot -ExecStart=borgmatic prune --syslog-verbosity 1 --config %h/.config/borgmatic/%I.yml +ExecStart=borgmatic prune --syslog-verbosity 1 --config /etc/borgmatic/%I.yml Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin" Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh" Environment="BORGMATIC_NAME=%I" diff --git a/etc/systemd/system/borgmatic-prune@.timer b/etc/systemd/system/borgmatic-prune@.timer index 01a66f9..d65a4bc 100644 --- a/etc/systemd/system/borgmatic-prune@.timer +++ b/etc/systemd/system/borgmatic-prune@.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run borgmatic %I prune timer utilizing HOME/.config/borgmatic/%I.yml file +Description=Run borgmatic prune for %I utilizing /etc/borgmatic/%I.yml file [Timer] OnCalendar=Wed 23:00:00 diff --git a/etc/systemd/system/borgmatic@.service b/etc/systemd/system/borgmatic@.service index 7157e01..2467ba5 100644 --- a/etc/systemd/system/borgmatic@.service +++ b/etc/systemd/system/borgmatic@.service @@ -1,5 +1,5 @@ [Unit] -Description=Run borgmatic backup for %I utilizing HOME/.config/borgmatic/%I.yml file +Description=Run borgmatic backup for %I utilizing /etc/borgmatic/%I.yml file OnFailure=systemd_failure_notify@%n.service Wants=network-online.target After=network-online.target @@ -7,7 +7,7 @@ Requires=network-online.target [Service] Type=oneshot -ExecStart=borgmatic --syslog-verbosity 1 --config %h/.config/borgmatic/%I.yml +ExecStart=borgmatic --syslog-verbosity 1 --config /etc/borgmatic/%I.yml Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin" Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh" Environment="BORGMATIC_NAME=%I" diff --git a/etc/systemd/system/borgmatic@.timer b/etc/systemd/system/borgmatic@.timer index 57d06c4..42a03c3 100644 --- a/etc/systemd/system/borgmatic@.timer +++ b/etc/systemd/system/borgmatic@.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run borgmatic %I backup timer utilizing HOME/.config/borgmatic/%I.yml file +Description=Run borgmatic backup for %I utilizing /etc/borgmatic/%I.yml file [Timer] OnCalendar=*-*-* 20:00:00 diff --git a/etc/systemd/system/restic-check@.service b/etc/systemd/system/restic-check@.service index 2b92d33..57c4f00 100644 --- a/etc/systemd/system/restic-check@.service +++ b/etc/systemd/system/restic-check@.service @@ -1,5 +1,5 @@ [Unit] -Description=Run restic check script for %I utilizing ~/.config/restic/%I-check.sh file using env ~/.config/restic/%I.env +Description=Run restic check script for %I utilizing /etc/restic/%I/check.sh file using env /etc/restic/%I/env OnFailure=systemd_failure_notify@%n.service Wants=network-online.target After=network-online.target @@ -7,10 +7,10 @@ Requires=network-online.target [Service] Type=oneshot -ExecStart=sh %h/.config/restic/%I-check.sh +ExecStart=sh /etc/restic/%I/check.sh Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin" Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh" -EnvironmentFile=%h/.config/restic/%I.env +EnvironmentFile=/etc/restic/%I/env [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/etc/systemd/system/restic-check@.timer b/etc/systemd/system/restic-check@.timer index 2d579d0..069073a 100644 --- a/etc/systemd/system/restic-check@.timer +++ b/etc/systemd/system/restic-check@.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run restic check script for %I utilizing HOME/.config/restic/%I-check.sh file +Description=Run restic check script for %I utilizing /etc/restic/%I/check.sh file using env /etc/restic/%I/env [Timer] OnCalendar=Wed 22:00:00 diff --git a/etc/systemd/system/restic-create@.service b/etc/systemd/system/restic-create@.service index 4b40b9e..6017029 100644 --- a/etc/systemd/system/restic-create@.service +++ b/etc/systemd/system/restic-create@.service @@ -1,5 +1,5 @@ [Unit] -Description=Run restic create script for %I utilizing ~/.config/restic/%I-create.sh file using env ~/.config/restic/%I.env +Description=Run restic create script for %I utilizing /etc/restic/%I/create.sh file using env /etc/restic/%I/env OnFailure=systemd_failure_notify@%n.service Wants=network-online.target After=network-online.target @@ -7,12 +7,12 @@ Requires=network-online.target [Service] Type=oneshot -ExecStart=sh %h/.config/restic/%I-create.sh +ExecStart=sh /etc/%I/create.sh Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin" Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh" Environment="RESTIC_FILE_INCLUDE=%h/.config/restic/%I.include" Environment="RESTIC_FILE_EXCLUDE=%h/.config/restic/%I.exclude" -EnvironmentFile=%h/.config/restic/%I.env +EnvironmentFile=/etc/restic/%I/env [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/etc/systemd/system/restic-create@.timer b/etc/systemd/system/restic-create@.timer index 526bda4..982ccbe 100644 --- a/etc/systemd/system/restic-create@.timer +++ b/etc/systemd/system/restic-create@.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run restic create script for %I utilizing HOME/.config/restic/%I-create.sh file +Description=Run restic create script for %I utilizing /etc/restic/%I/create.sh file using env /etc/restic/%I/env [Timer] OnCalendar=23:00 diff --git a/etc/systemd/system/restic-prune@.service b/etc/systemd/system/restic-prune@.service index 354ef71..8d4ffb4 100644 --- a/etc/systemd/system/restic-prune@.service +++ b/etc/systemd/system/restic-prune@.service @@ -1,5 +1,5 @@ [Unit] -Description=Run restic prune script for %I utilizing ~/.config/restic/%I-prune.sh file using env ~/.config/restic/%I.env +Description=Run restic prune script for %I utilizing /etc/restic/%I-prune.sh file using env /etc/restic/%I/env OnFailure=systemd_failure_notify@%n.service Wants=network-online.target After=network-online.target @@ -7,10 +7,10 @@ Requires=network-online.target [Service] Type=oneshot -ExecStart=sh %h/.config/restic/%I-prune.sh +ExecStart=sh /etc/restic/%I/prune.sh Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin" Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh" -EnvironmentFile=%h/.config/restic/%I.env +EnvironmentFile=/etc/restic/%I/env [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/etc/systemd/system/restic-prune@.timer b/etc/systemd/system/restic-prune@.timer index d11d5d9..b204e65 100644 --- a/etc/systemd/system/restic-prune@.timer +++ b/etc/systemd/system/restic-prune@.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run restic prune script for %I utilizing HOME/.config/restic/%I-prune.sh file +Description=Run restic prune script for %I utilizing /etc/restic/%I-prune.sh file using env /etc/restic/%I/env [Timer] OnCalendar=Wed 23:00:00 diff --git a/etc/systemd/user/restic-check@.service b/etc/systemd/user/restic-check@.service index 2b92d33..a3d5573 100644 --- a/etc/systemd/user/restic-check@.service +++ b/etc/systemd/user/restic-check@.service @@ -1,5 +1,5 @@ [Unit] -Description=Run restic check script for %I utilizing ~/.config/restic/%I-check.sh file using env ~/.config/restic/%I.env +Description=Run restic check script for %I utilizing ~/.config/restic/%I/check.sh file using env ~/.config/restic/%I/env OnFailure=systemd_failure_notify@%n.service Wants=network-online.target After=network-online.target @@ -7,10 +7,10 @@ Requires=network-online.target [Service] Type=oneshot -ExecStart=sh %h/.config/restic/%I-check.sh +ExecStart=sh %h/.config/restic/%I/check.sh Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin" Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh" -EnvironmentFile=%h/.config/restic/%I.env +EnvironmentFile=%h/.config/restic/%I/env [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/etc/systemd/user/restic-check@.timer b/etc/systemd/user/restic-check@.timer index 2d579d0..e47c804 100644 --- a/etc/systemd/user/restic-check@.timer +++ b/etc/systemd/user/restic-check@.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run restic check script for %I utilizing HOME/.config/restic/%I-check.sh file +Description=Run restic check script for %I utilizing ~/.config/restic/%I/check.sh file using env ~/.config/restic/%I/env [Timer] OnCalendar=Wed 22:00:00 diff --git a/etc/systemd/user/restic-create@.service b/etc/systemd/user/restic-create@.service index 4b40b9e..f11eee9 100644 --- a/etc/systemd/user/restic-create@.service +++ b/etc/systemd/user/restic-create@.service @@ -1,5 +1,5 @@ [Unit] -Description=Run restic create script for %I utilizing ~/.config/restic/%I-create.sh file using env ~/.config/restic/%I.env +Description=Run restic create script for %I utilizing ~/.config/restic/%I/create.sh file using env ~/.config/restic/%I/env OnFailure=systemd_failure_notify@%n.service Wants=network-online.target After=network-online.target @@ -7,12 +7,12 @@ Requires=network-online.target [Service] Type=oneshot -ExecStart=sh %h/.config/restic/%I-create.sh +ExecStart=sh %h/.config/restic/%I/create.sh Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin" Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh" -Environment="RESTIC_FILE_INCLUDE=%h/.config/restic/%I.include" -Environment="RESTIC_FILE_EXCLUDE=%h/.config/restic/%I.exclude" -EnvironmentFile=%h/.config/restic/%I.env +Environment="RESTIC_FILE_INCLUDE=%h/.config/restic/%I/include" +Environment="RESTIC_FILE_EXCLUDE=%h/.config/restic/%I/exclude" +EnvironmentFile=%h/.config/restic/%I/env [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/etc/systemd/user/restic-create@.timer b/etc/systemd/user/restic-create@.timer index 526bda4..a5c6ccf 100644 --- a/etc/systemd/user/restic-create@.timer +++ b/etc/systemd/user/restic-create@.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run restic create script for %I utilizing HOME/.config/restic/%I-create.sh file +Description=Run restic create script for %I utilizing ~/.config/restic/%I/create.sh file using env ~/.config/restic/%I/env [Timer] OnCalendar=23:00 diff --git a/etc/systemd/user/restic-prune@.service b/etc/systemd/user/restic-prune@.service index 354ef71..eefc475 100644 --- a/etc/systemd/user/restic-prune@.service +++ b/etc/systemd/user/restic-prune@.service @@ -1,5 +1,5 @@ [Unit] -Description=Run restic prune script for %I utilizing ~/.config/restic/%I-prune.sh file using env ~/.config/restic/%I.env +Description=Run restic prune script for %I utilizing ~/.config/restic/%I/prune.sh file using env ~/.config/restic/%I/env OnFailure=systemd_failure_notify@%n.service Wants=network-online.target After=network-online.target @@ -7,10 +7,10 @@ Requires=network-online.target [Service] Type=oneshot -ExecStart=sh %h/.config/restic/%I-prune.sh +ExecStart=sh %h/.config/restic/%I/prune.sh Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin" Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh" -EnvironmentFile=%h/.config/restic/%I.env +EnvironmentFile=%h/.config/restic/%I/env [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/etc/systemd/user/restic-prune@.timer b/etc/systemd/user/restic-prune@.timer index d11d5d9..9820b91 100644 --- a/etc/systemd/user/restic-prune@.timer +++ b/etc/systemd/user/restic-prune@.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run restic prune script for %I utilizing HOME/.config/restic/%I-prune.sh file +Description=Run restic prune script for %I utilizing ~/.config/restic/%I/prune.sh file using env ~/.config/restic/%I/env [Timer] OnCalendar=Wed 23:00:00 diff --git a/usr/local/bin/ssh-keygen-rsa b/usr/local/bin/ssh-keygen-rsa index 416c6e7..2255852 100755 --- a/usr/local/bin/ssh-keygen-rsa +++ b/usr/local/bin/ssh-keygen-rsa @@ -11,7 +11,7 @@ if [[ -z "${name}" ]]; then fi if [[ -z ${encryption} ]]; then - encryption=3072; + encryption=4096; fi openssl genrsa -out "${name}" "${encryption}" diff --git a/usr/share/doc/check_updates/.check_updates.conf.example b/usr/share/doc/dotfiles-system/check_updates/.check_updates.conf.example similarity index 100% rename from usr/share/doc/check_updates/.check_updates.conf.example rename to usr/share/doc/dotfiles-system/check_updates/.check_updates.conf.example diff --git a/usr/share/doc/disk_space_alert/.disk_space_alert.conf.example b/usr/share/doc/dotfiles-system/disk_space_alert/.disk_space_alert.conf.example similarity index 100% rename from usr/share/doc/disk_space_alert/.disk_space_alert.conf.example rename to usr/share/doc/dotfiles-system/disk_space_alert/.disk_space_alert.conf.example diff --git a/usr/share/doc/docker_check/.docker_check.conf.example b/usr/share/doc/dotfiles-system/docker_check/.docker_check.conf.example similarity index 100% rename from usr/share/doc/docker_check/.docker_check.conf.example rename to usr/share/doc/dotfiles-system/docker_check/.docker_check.conf.example diff --git a/usr/share/doc/docker_check/docker_check.list.example b/usr/share/doc/dotfiles-system/docker_check/docker_check.list.example similarity index 100% rename from usr/share/doc/docker_check/docker_check.list.example rename to usr/share/doc/dotfiles-system/docker_check/docker_check.list.example diff --git a/usr/share/doc/docker_compose_update/.docker_compose_update.conf b/usr/share/doc/dotfiles-system/docker_compose_update/.docker_compose_update.conf similarity index 100% rename from usr/share/doc/docker_compose_update/.docker_compose_update.conf rename to usr/share/doc/dotfiles-system/docker_compose_update/.docker_compose_update.conf diff --git a/usr/share/doc/dynv6/.dynv6.conf.example b/usr/share/doc/dotfiles-system/dynv6/.dynv6.conf.example similarity index 100% rename from usr/share/doc/dynv6/.dynv6.conf.example rename to usr/share/doc/dotfiles-system/dynv6/.dynv6.conf.example diff --git a/usr/share/doc/memory_usage_alert/.memory_usage_alert.conf.example b/usr/share/doc/dotfiles-system/memory_usage_alert/.memory_usage_alert.conf.example similarity index 100% rename from usr/share/doc/memory_usage_alert/.memory_usage_alert.conf.example rename to usr/share/doc/dotfiles-system/memory_usage_alert/.memory_usage_alert.conf.example diff --git a/usr/share/doc/restic/mybackup-check.sh b/usr/share/doc/dotfiles-system/restic/mybackup/check.sh similarity index 100% rename from usr/share/doc/restic/mybackup-check.sh rename to usr/share/doc/dotfiles-system/restic/mybackup/check.sh diff --git a/usr/share/doc/restic/mybackup-create.sh b/usr/share/doc/dotfiles-system/restic/mybackup/create.sh similarity index 100% rename from usr/share/doc/restic/mybackup-create.sh rename to usr/share/doc/dotfiles-system/restic/mybackup/create.sh diff --git a/usr/share/doc/restic/mybackup.env b/usr/share/doc/dotfiles-system/restic/mybackup/env similarity index 100% rename from usr/share/doc/restic/mybackup.env rename to usr/share/doc/dotfiles-system/restic/mybackup/env diff --git a/usr/share/doc/restic/mybackup.exclude b/usr/share/doc/dotfiles-system/restic/mybackup/exclude similarity index 100% rename from usr/share/doc/restic/mybackup.exclude rename to usr/share/doc/dotfiles-system/restic/mybackup/exclude diff --git a/usr/share/doc/restic/mybackup.include b/usr/share/doc/dotfiles-system/restic/mybackup/include similarity index 100% rename from usr/share/doc/restic/mybackup.include rename to usr/share/doc/dotfiles-system/restic/mybackup/include diff --git a/usr/share/doc/restic/mybackup-prune.sh b/usr/share/doc/dotfiles-system/restic/mybackup/prune.sh similarity index 100% rename from usr/share/doc/restic/mybackup-prune.sh rename to usr/share/doc/dotfiles-system/restic/mybackup/prune.sh diff --git a/usr/share/doc/smartctl_tests_long/.smartctl_tests_long.conf.example b/usr/share/doc/dotfiles-system/smartctl_tests_long/.smartctl_tests_long.conf.example similarity index 100% rename from usr/share/doc/smartctl_tests_long/.smartctl_tests_long.conf.example rename to usr/share/doc/dotfiles-system/smartctl_tests_long/.smartctl_tests_long.conf.example diff --git a/usr/share/doc/systemd_check/.systemd_check.conf.example b/usr/share/doc/dotfiles-system/systemd_check/.systemd_check.conf.example similarity index 100% rename from usr/share/doc/systemd_check/.systemd_check.conf.example rename to usr/share/doc/dotfiles-system/systemd_check/.systemd_check.conf.example diff --git a/usr/share/doc/systemd_check/.systemd_check.list.example b/usr/share/doc/dotfiles-system/systemd_check/.systemd_check.list.example similarity index 100% rename from usr/share/doc/systemd_check/.systemd_check.list.example rename to usr/share/doc/dotfiles-system/systemd_check/.systemd_check.list.example diff --git a/usr/share/doc/systemd_failure_notify/.systemd_failure_notify.conf.example b/usr/share/doc/dotfiles-system/systemd_failure_notify/.systemd_failure_notify.conf.example similarity index 100% rename from usr/share/doc/systemd_failure_notify/.systemd_failure_notify.conf.example rename to usr/share/doc/dotfiles-system/systemd_failure_notify/.systemd_failure_notify.conf.example diff --git a/usr/share/man/man1/dotfiles-system.1 b/usr/share/man/man1/dotfiles-system.1 new file mode 100644 index 0000000..ee1a447 --- /dev/null +++ b/usr/share/man/man1/dotfiles-system.1 @@ -0,0 +1,38 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +dotfiles\-system is a collection of helper systemd services, systemd timers and shell scripts for common configuration and tasks like +. +.IP "\(bu" 4 +checking if systemd services and timers are running +. +.IP "\(bu" 4 +borgmatic backup +. +.IP "\(bu" 4 +restic backup +. +.IP "\(bu" 4 +checking if docker containers are running +. +.IP "\(bu" 4 +batch docker\-compose upgrades +. +.IP "\(bu" 4 +docker housekeeping for removing unused docker containers, volumes and images +. +.IP "\(bu" 4 +dynamic dns update +. +.IP "\(bu" 4 +update check for pacman +. +.IP "\(bu" 4 +memory and disk checks +. +.IP "" 0 +. +.P +Provided systemd services mostly support mail notifications if they have failed via systemd_failure_notify\. +. +.P +See \fB/usr/share/doc/dotfiles\-system\fR for example configurations which should be copied inside $HOME or /etc depending on the helper script\.