No description
Find a file
Alexander Schäferdiek 82d43e9607
All checks were successful
continuous-integration/drone/push Build is passing
Use pacman cleanup hook instead of alias
2022-08-26 20:55:31 +02:00
_man Add restic-report example and systemd service files 2022-06-30 00:13:32 +02:00
_pkg Add steps for creating ArchLinux repository database and add description how to use in the README 2022-07-11 22:29:51 +02:00
etc Use pacman cleanup hook instead of alias 2022-08-26 20:55:31 +02:00
usr Apply shellcheck recommendations and add simple pipeline 2022-07-10 20:47:46 +02:00
.drone.yml ArchLinux repository without any $arch 2022-07-11 22:49:31 +02:00
README.md Add optional DNS check for network-online.target to user service files 2022-08-23 18:55:27 +02:00
sync Add plain restic example 2022-06-05 01:09:23 +02:00

README

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.

Installation

  1. Build a pacman package for ArchLinux via makepkg -csi inside the _pkg/ folder
  2. Alternatively, use ./sync from the git clone and pick an action which should be self-explaining
  3. Use the custom provided ArchLinux repository hosted at aur.myservermanager.com
[repo-aur-myservermanager-com]
SigLevel = Never
Server = https://aur.myservermanager.com

Usage

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/dotfiles-system.

FAQ

User cannot use network-online.target

By default, no user unit can depend on system events like network-online.target. To enable this, you need to link the proper .target which you like to use inside the user service before.

systemctl --user link /usr/lib/systemd/system/network-online.target

This would make network-online.target available after a reboot to the user who issued the command.

network-online.target doesn't recognize DNS correctly

If you like to set Persistent=true, then you should probably equip the related .service file with a ExecStartPre=/bin/bash -c 'until host captiveportal.myservermanager.com; do sleep 1; done' or any domain you think is 100% reachable.