diff options
Diffstat (limited to 'systemd')
| -rwxr-xr-x | systemd/datasync.path | 18 | ||||
| -rwxr-xr-x | systemd/datasync.service | 12 | ||||
| -rwxr-xr-x | systemd/update-hosts.service | 10 |
3 files changed, 40 insertions, 0 deletions
diff --git a/systemd/datasync.path b/systemd/datasync.path new file mode 100755 index 0000000..3319c1d --- /dev/null +++ b/systemd/datasync.path @@ -0,0 +1,18 @@ +[Unit] +Wants=datasync.service + +[Path] +PathChanged=/home/thomas/doc/ +PathChanged=/home/thomas/img/ +PathChanged=/home/thomas/_journal +PathChanged=/home/thomas/lmms/projects/ +PathChanged=/home/thomas/do +PathChanged=/home/thomas/_poetry +PathChanged=/home/thomas/aud/ +PathChanged=/home/thomas/.password-store +PathChanged=/home/thomas/vid +PathChanged=/home/thomas/dev +Unit=datasync.service + +[Install] +WantedBy=datasync.service diff --git a/systemd/datasync.service b/systemd/datasync.service new file mode 100755 index 0000000..3d7de2a --- /dev/null +++ b/systemd/datasync.service @@ -0,0 +1,12 @@ +[Unit] +Description=backs up commonly modified files +Requires=network-online.target +After=multi-user.target + +[Service] +Type=simple +#ExecStartPre=/bin/sleep 45 +ExecStart=/usr/local/bin/syncdata +User=thomas +Restart=on-failure +RestartSec=120s diff --git a/systemd/update-hosts.service b/systemd/update-hosts.service new file mode 100755 index 0000000..2aa6111 --- /dev/null +++ b/systemd/update-hosts.service @@ -0,0 +1,10 @@ +[Unit] +Description=updates /etc/hosts with my custom hosts +Requires=network-connected.target +After=multi-user.target network-connected.target + +[Service] +Type=simple +#ExecStartPre=/bin/sleep 45 +ExecStart=sudo /usr/local/bin/update_hosts +User=root |
