From 90fcf81dfddab12174d1d4e28e80deb832a18320 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 23 Jul 2020 23:37:53 +0200 Subject: [PATCH] services: Fix commit_notes service autostart Used wrong 'after' designation which would wait forever since it needed to start after the runlevel which it was designated to run at. Committed default.target.wants symlink to service file to automatically enable its autostart on new machines. This wil only really work for my directory set-up, so perhaps either the service module should be disabled by default for the installation, be asked during installation, or simply be manually enabled to autostart during initial set-up (maybe mention in readme for the module). --- services/.config/systemd/user/commit_notes.service | 5 ++--- .../systemd/user/default.target.wants/commit_notes.service | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) create mode 120000 services/.config/systemd/user/default.target.wants/commit_notes.service diff --git a/services/.config/systemd/user/commit_notes.service b/services/.config/systemd/user/commit_notes.service index fc84b69..114ad50 100644 --- a/services/.config/systemd/user/commit_notes.service +++ b/services/.config/systemd/user/commit_notes.service @@ -1,13 +1,12 @@ [Unit] -Description=Automatically commit notes in directory -After=default.target +Description=Automatically commit notes in university directory [Service] Type=simple Environment=GS_TIME_TO_COMMIT=120 GS_UNCHANGED_RUNS_TO_PUSH=30 # workaround to allow relative executable invocation (i.e. current users' home dir) ExecStart=/bin/bash -c '%h/.local/share/services/git-sync %h/documents/notes/uni' -# Restart=on-failure +Restart=on-failure [Install] WantedBy=default.target diff --git a/services/.config/systemd/user/default.target.wants/commit_notes.service b/services/.config/systemd/user/default.target.wants/commit_notes.service new file mode 120000 index 0000000..1b62330 --- /dev/null +++ b/services/.config/systemd/user/default.target.wants/commit_notes.service @@ -0,0 +1 @@ +../commit_notes.service \ No newline at end of file