diff options
author | Debian Live user <user@debian-BULLSEYE-live-builder-AMD64> | 2023-04-29 07:29:02 -0400 |
---|---|---|
committer | Debian Live user <user@debian-BULLSEYE-live-builder-AMD64> | 2023-04-29 07:29:02 -0400 |
commit | 29a8cce3187cc6faf28b4a3b5b1ff626aa2295b7 (patch) | |
tree | 7aff34da631ff73a90fcd64f302764ee2ecac384 /src | |
parent | c08c6366ac75af046a689d908d262cfaa74477e9 (diff) |
fixup systemd unit files
ioslay will be started/stopped with a Wants= directive instead of
ExecStartPre/Post.
Diffstat (limited to 'src')
-rw-r--r-- | src/firefox@.service | 10 | ||||
-rw-r--r-- | src/ioslay@.service | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/firefox@.service b/src/firefox@.service index afdce8f..411f79b 100644 --- a/src/firefox@.service +++ b/src/firefox@.service | |||
@@ -1,18 +1,14 @@ | |||
1 | [Unit] | 1 | [Unit] |
2 | Description = Firefox | 2 | Description = Firefox |
3 | # Requires=ioslay@%I | 3 | ConditionUser = !root |
4 | # Requires=pulseaudio.socket # require X11 somehow | ||
5 | ConditionUser = !root # seems reasonable | ||
6 | ConditionEnvironment = DISPLAY | 4 | ConditionEnvironment = DISPLAY |
5 | Wants = ioslay@%i.service | ||
7 | 6 | ||
8 | [Service] | 7 | [Service] |
9 | ExecStartPre = /usr/bin/systemctl --user start ioslay@%I | 8 | ExecStart = /usr/local/bin/firefox --new-instance --display=%i |
10 | ExecStart = /usr/local/bin/firefox --new-instance --display=%I | ||
11 | ExecStopPost = /usr/bin/systemctl --user stop ioslay@%I | ||
12 | Restart = on-failure | 9 | Restart = on-failure |
13 | PassEnvironment = DISPLAY XAUTHORITY | 10 | PassEnvironment = DISPLAY XAUTHORITY |
14 | MemoryMax = 50% | 11 | MemoryMax = 50% |
15 | 12 | ||
16 | [Install] | 13 | [Install] |
17 | Also=ioslay@.service | 14 | Also=ioslay@.service |
18 | WantedBy = default.target # make an X11 user target? | ||
diff --git a/src/ioslay@.service b/src/ioslay@.service index 11db192..81c41d4 100644 --- a/src/ioslay@.service +++ b/src/ioslay@.service | |||
@@ -1,6 +1,6 @@ | |||
1 | [Unit] | 1 | [Unit] |
2 | Description = Kill firefox when it spins the disk | 2 | Description = Kill firefox when it spins the disk |
3 | Requires = firefox@%I | 3 | Requires = firefox@%i.service |
4 | 4 | ||
5 | [Service] | 5 | [Service] |
6 | ExecStart = /usr/local/bin/firefox-io-slayer %I | 6 | ExecStart = /usr/local/bin/firefox-io-slayer %I |