Browse Source

Fixed URLs. Other fixes.

dev
Franco Masotti 1 year ago
parent
commit
bf64b9ab37
Signed by: frnmst
GPG Key ID: 24116ED85666780A
  1. 8
      README.md
  2. 6
      _config.yml
  3. 19
      _posts/2019-07-04-from-crontabs-to-systemd-timers.md

8
README.md

@ -1,14 +1,10 @@
# Franco Masotti's Blog
https://blog.frnmst.duckdns.org/
https://blog.franco.net.eu.org/
## Theme
[The Plain Libre](https://github.com/frnmst/the-plain-libre)
Some changes were needed otherwise [issues arise on
GitLab](https://gitlab.com/pages/jekyll/issues/6).
These fixes have been imported upstream.
[The Flux Of Thought](https://software.franco.net.eu.org/frnmst/the-flux-of-thought)
## Blog copyright and license

6
_config.yml

@ -4,18 +4,18 @@ description: "A blog about computer experiences and everything else"
website:
# This should point to your website source.
source: "https://software.frnmst.duckdns.org/frnmst/blog"
source: "https://software.franco.net.eu.org/frnmst/blog"
license:
url: "https://creativecommons.org/licenses/by-sa/4.0/"
name: "CC-BY-SA 4.0"
software:
# These should point to the-flux-of-thought repository.
home: "https://github.com/frnmst/the-flux-of-thought"
home: "https://software.franco.net.eu.org/frnmst/the-flux-of-thought"
version: "3.0.0"
# The following is used along the version variable to build the
# software version url.
release_base_url: "https://github.com/frnmst/the-flux-of-thought/releases/tag"
release_base_url: "https://software.franco.net.eu.org/frnmst/the-flux-of-thought/src/tag"
author:
name: "Franco Masotti"

19
_posts/2019-07-04-from-crontabs-to-systemd-timers.md

@ -1,29 +1,29 @@
---
title: From crontabs to Systemd timers
tags: [bash, shell, crontab, cronie, systemd, timer]
updated: 2019-08-11 19:35
updated: 2021-03-01 17:57
description: The steps I followed to migrate from crontabs to systemd timers.
---
## Introduction
<!--excerpt_start-->
Since I started my own server at home I have always use crontabs to handle
recurring tasks such as backups.
<!--more-->
<!--excerpt-end-->
*Please note that every step described here is directly related to the
[automated-tasks](https://github.com/frnmst/automated-tasks) repository.*
The problem of this method is that you cannot
easily control running processes and you are not provided with a uniform interface.
Systemd service and timer unit files seem to solve these issues. As usual,
I followed the [Arch](https://wiki.archlinux.org/index.php/Systemd/Timers)
easily control running processes and you are not provided with a uniform interface.
Systemd service and timer unit files seem to solve these issues. As usual,
I followed the [Arch](https://wiki.archlinux.org/index.php/Systemd/Timers)
[wiki](https://wiki.archlinux.org/index.php/Systemd#Writing_unit_files).
## Preparation
To avoid complications, I prefer having all relevant scripts of all the users
To avoid complications, I prefer having all relevant scripts of all the users
in one place.
### Users and groups
@ -31,7 +31,7 @@ in one place.
I created a new user and group called `jobs`
# useradd -m -s /bin/bash -U jobs
Every user `${user}` that needs to perform some task must be added to the
`jobs` group.
@ -54,7 +54,7 @@ of my [daily backups]({{ site.baseurl }}/notes/my-backup-system.html).
### Script
Copy the [backup script]({{ site.baseurl }}/notes/my-backup-system.html#incremental-backup-script)
and the [configuration file]({{ site.baseurl }}/notes/my-backup-system.html#configuration-file)
and the [configuration file]({{ site.baseurl }}/notes/my-backup-system.html#configuration-file)
in `/home/jobs/scripts/by-user/root`, and change ownerships and permissions
# chmod -R 700 /home/jobs/scripts/by-user/root
@ -177,4 +177,3 @@ Here is a representation of the files and directories mentioned in this post
```
~

Loading…
Cancel
Save