summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
authorcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>2026-04-25 21:12:00 +0000
committerGitHub <noreply@github.com>2026-04-25 21:12:00 +0000
commit00a8a558aa2984401728c5027cf054b9d7a97b6f (patch)
treeed10fcc4dd1153d983164bff9523f594b4d63ff8 /systemd
parent6694a4948df344df8d080a277e6fdf51cbef4274 (diff)
Organize low-risk repo assets
Agent-Logs-Url: https://github.com/grothedev/randomscripts/sessions/5da26845-b606-4f8f-8fcb-488a29119f51 Co-authored-by: grothedev <5280051+grothedev@users.noreply.github.com>
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/datasync.path18
-rwxr-xr-xsystemd/datasync.service12
-rwxr-xr-xsystemd/update-hosts.service10
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