diff options
author | Mike Crute <mike@crute.us> | 2022-11-02 09:10:32 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2022-11-02 09:10:32 -0700 |
commit | 97148d3879d0c6de3290f6967711926da50d6852 (patch) | |
tree | 2c416616e4d9af5a8b8189a7b88c9d289a1335e0 | |
parent | 31d4485bc2b05eb62425990002071486635e663b (diff) | |
download | dotfiles-97148d3879d0c6de3290f6967711926da50d6852.tar.bz2 dotfiles-97148d3879d0c6de3290f6967711926da50d6852.tar.xz dotfiles-97148d3879d0c6de3290f6967711926da50d6852.zip |
Cleanup systemd services
-rw-r--r-- | .linux/dot_config/systemd/user/music-backup.service | 2 | ||||
-rw-r--r-- | .linux/dot_config/systemd/user/system-backup.service | 2 | ||||
-rw-r--r-- | .linux/dot_config/systemd/user/xscreensaver.service | 2 | ||||
-rw-r--r-- | .linux/dot_config/systemd/user/xss-lock.service | 11 | ||||
-rw-r--r-- | .linux/etc/systemd/system/ath11k-resume.service | 6 | ||||
-rw-r--r-- | .linux/etc/systemd/system/ath11k-suspend.service | 6 | ||||
-rw-r--r-- | .linux/etc/systemd/system/ax500-resume.service | 11 | ||||
-rw-r--r-- | .linux/etc/systemd/system/ax500-suspend.service | 10 |
8 files changed, 37 insertions, 13 deletions
diff --git a/.linux/dot_config/systemd/user/music-backup.service b/.linux/dot_config/systemd/user/music-backup.service index 7a83c15..07c37f7 100644 --- a/.linux/dot_config/systemd/user/music-backup.service +++ b/.linux/dot_config/systemd/user/music-backup.service | |||
@@ -3,9 +3,7 @@ Description=backup music with rsync | |||
3 | 3 | ||
4 | [Service] | 4 | [Service] |
5 | Type=oneshot | 5 | Type=oneshot |
6 | |||
7 | ExecCondition=ping -q -c1 -W1 -w1 nas.sea1.crute.me | 6 | ExecCondition=ping -q -c1 -W1 -w1 nas.sea1.crute.me |
8 | |||
9 | ExecStart=rsync -rltvp -e "ssh -i /home/mcrute/.ssh/id_rsa.musicbackup -l mcrute" --delete-excluded --delete-during --exclude '/Swinsian/Artwork/' /home/mcrute/Music/Swinsian nas.sea1.crute.me:/mnt/data/Mike/Music/ | 7 | ExecStart=rsync -rltvp -e "ssh -i /home/mcrute/.ssh/id_rsa.musicbackup -l mcrute" --delete-excluded --delete-during --exclude '/Swinsian/Artwork/' /home/mcrute/Music/Swinsian nas.sea1.crute.me:/mnt/data/Mike/Music/ |
10 | 8 | ||
11 | [Install] | 9 | [Install] |
diff --git a/.linux/dot_config/systemd/user/system-backup.service b/.linux/dot_config/systemd/user/system-backup.service index 61ed2de..8a3a8ac 100644 --- a/.linux/dot_config/systemd/user/system-backup.service +++ b/.linux/dot_config/systemd/user/system-backup.service | |||
@@ -6,9 +6,7 @@ ConditionPathExists=%h/.backup-filter | |||
6 | 6 | ||
7 | [Service] | 7 | [Service] |
8 | Type=oneshot | 8 | Type=oneshot |
9 | |||
10 | ExecCondition=ping -q -c1 -W1 -w1 nas.sea1.crute.me | 9 | ExecCondition=ping -q -c1 -W1 -w1 nas.sea1.crute.me |
11 | |||
12 | Environment="RESTIC_REPOSITORY=rest:http://nas.sea1.crute.me:6275/mcrute-devices" | 10 | Environment="RESTIC_REPOSITORY=rest:http://nas.sea1.crute.me:6275/mcrute-devices" |
13 | Environment="RESTIC_PASSWORD_FILE=%h/.restic-key" | 11 | Environment="RESTIC_PASSWORD_FILE=%h/.restic-key" |
14 | ExecStart=restic backup --exclude-file %h/.backup-filter %h | 12 | ExecStart=restic backup --exclude-file %h/.backup-filter %h |
diff --git a/.linux/dot_config/systemd/user/xscreensaver.service b/.linux/dot_config/systemd/user/xscreensaver.service index 88fe661..e602a50 100644 --- a/.linux/dot_config/systemd/user/xscreensaver.service +++ b/.linux/dot_config/systemd/user/xscreensaver.service | |||
@@ -5,7 +5,7 @@ PartOf=graphical-session.target | |||
5 | [Service] | 5 | [Service] |
6 | Type=simple | 6 | Type=simple |
7 | EnvironmentFile=-%h/.config/systemd/graphical.env | 7 | EnvironmentFile=-%h/.config/systemd/graphical.env |
8 | ExecStart=/usr/bin/xscreensaver | 8 | ExecStart=/usr/bin/xscreensaver --no-splash |
9 | 9 | ||
10 | [Install] | 10 | [Install] |
11 | WantedBy=graphical-session.target | 11 | WantedBy=graphical-session.target |
diff --git a/.linux/dot_config/systemd/user/xss-lock.service b/.linux/dot_config/systemd/user/xss-lock.service new file mode 100644 index 0000000..34d1ddc --- /dev/null +++ b/.linux/dot_config/systemd/user/xss-lock.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=xss-lock glue for systemd and xscreensaver | ||
3 | PartOf=graphical-session.target | ||
4 | |||
5 | [Service] | ||
6 | Type=simple | ||
7 | EnvironmentFile=-%h/.config/systemd/graphical.env | ||
8 | ExecStart=/usr/bin/xss-lock -- xscreensaver-command -lock | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=graphical-session.target | ||
diff --git a/.linux/etc/systemd/system/ath11k-resume.service b/.linux/etc/systemd/system/ath11k-resume.service index 0b32151..ca4afd5 100644 --- a/.linux/etc/systemd/system/ath11k-resume.service +++ b/.linux/etc/systemd/system/ath11k-resume.service | |||
@@ -1,7 +1,6 @@ | |||
1 | [Unit] | 1 | [Unit] |
2 | Description=Resume: modprobe ath11k_pci | 2 | Description=Resume: modprobe ath11k_pci |
3 | After=suspend.target | 3 | After=suspend.target hibernate.target hybrid-sleep.target |
4 | After=hibernate.target | ||
5 | 4 | ||
6 | [Service] | 5 | [Service] |
7 | Type=oneshot | 6 | Type=oneshot |
@@ -9,5 +8,4 @@ ExecStartPre=/usr/bin/sleep 3 | |||
9 | ExecStart=/usr/sbin/modprobe ath11k_pci | 8 | ExecStart=/usr/sbin/modprobe ath11k_pci |
10 | 9 | ||
11 | [Install] | 10 | [Install] |
12 | WantedBy=suspend.target | 11 | WantedBy=suspend.target hibernate.target hybrid-sleep.target |
13 | WantedBy=hibernate.target | ||
diff --git a/.linux/etc/systemd/system/ath11k-suspend.service b/.linux/etc/systemd/system/ath11k-suspend.service index adf0957..3f69497 100644 --- a/.linux/etc/systemd/system/ath11k-suspend.service +++ b/.linux/etc/systemd/system/ath11k-suspend.service | |||
@@ -1,12 +1,10 @@ | |||
1 | [Unit] | 1 | [Unit] |
2 | Description=Suspend: rmmod ath11k_pci | 2 | Description=Suspend: rmmod ath11k_pci |
3 | Before=sleep.target | 3 | Before=sleep.target hibernate.target hybrid-sleep.target |
4 | Before=hibernate.target | ||
5 | 4 | ||
6 | [Service] | 5 | [Service] |
7 | Type=oneshot | 6 | Type=oneshot |
8 | ExecStart=/usr/sbin/rmmod ath11k_pci | 7 | ExecStart=/usr/sbin/rmmod ath11k_pci |
9 | 8 | ||
10 | [Install] | 9 | [Install] |
11 | WantedBy=sleep.target | 10 | WantedBy=sleep.target hibernate.target hybrid-sleep.target |
12 | WantedBy=hibernate.target | ||
diff --git a/.linux/etc/systemd/system/ax500-resume.service b/.linux/etc/systemd/system/ax500-resume.service new file mode 100644 index 0000000..5697f2a --- /dev/null +++ b/.linux/etc/systemd/system/ax500-resume.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Resume: modprobe hci_uart | ||
3 | After=suspend.target hibernate.target hybrid-sleep.target | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | ExecStartPre=/usr/bin/sleep 3 | ||
8 | ExecStart=/usr/sbin/modprobe hci_uart | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=suspend.target hibernate.target hybrid-sleep.target | ||
diff --git a/.linux/etc/systemd/system/ax500-suspend.service b/.linux/etc/systemd/system/ax500-suspend.service new file mode 100644 index 0000000..a1e5ed3 --- /dev/null +++ b/.linux/etc/systemd/system/ax500-suspend.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=Suspend: rmmod hci_uart | ||
3 | Before=sleep.target hibernate.target hybrid-sleep.target | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | ExecStart=/usr/sbin/rmmod hci_uart | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=sleep.target hibernate.target hybrid-sleep.target | ||