diff options
author | Debian Live user <user@debian-BULLSEYE-live-builder-AMD64> | 2023-04-28 22:09:09 -0400 |
---|---|---|
committer | Debian Live user <user@debian-BULLSEYE-live-builder-AMD64> | 2023-04-28 22:09:17 -0400 |
commit | ce8bd3eb52b72a9489e41939cc0b98c46454bb52 (patch) | |
tree | 5069e81cb51cd206e61e8ecb92a0d61bbd0e7ae7 /src | |
parent | c04b7b520a03ee020fa658c502b185a5a9857301 (diff) |
use "systemd edit" instead of generating a template
Diffstat (limited to 'src')
-rwxr-xr-x | src/edit-firefox@ (renamed from src/generate-firefox-unit) | 14 | ||||
-rw-r--r-- | src/firefox@.service (renamed from src/firefox@.service.in) | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/generate-firefox-unit b/src/edit-firefox@ index c285ffc..2fc99bd 100755 --- a/src/generate-firefox-unit +++ b/src/edit-firefox@ | |||
@@ -1,7 +1,6 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | INPUT_FILE=$1 | 3 | TARGET=$1 |
4 | OUTPUT_FILE=$2 | ||
5 | 4 | ||
6 | die() { printf "%s: Error: %s\n" "$0" "$*" >&2; exit 1; } | 5 | die() { printf "%s: Error: %s\n" "$0" "$*" >&2; exit 1; } |
7 | 6 | ||
@@ -43,9 +42,8 @@ READ_OPS=$WRITE_OPS | |||
43 | DEV=$(echo $(findmnt --target "$DIR" -o MAJ:MIN -n)) | 42 | DEV=$(echo $(findmnt --target "$DIR" -o MAJ:MIN -n)) |
44 | [ "$DEV" ] || die "could not determine backing device for $DIR" | 43 | [ "$DEV" ] || die "could not determine backing device for $DIR" |
45 | 44 | ||
46 | IOReadIOPSMax="$DEV $READ_OPS" | 45 | cat > "$TARGET" <<END |
47 | IOWriteIOPSMax="$DEV $WRITE_OPS" | 46 | [Service] |
48 | 47 | IOReadIOPSMax = $DEV $READ_OPS | |
49 | sed -e "s/^IOReadIOPSMax *=.*/IOReadIOPSMax = $IOReadIOPSMax/" \ | 48 | IOWriteIOPSMax = $DEV $WRITE_OPS |
50 | -e "s/^IOWriteIOPSMax *=.*/IOWriteIOPSMax = $IOWriteIOPSMax/" \ | 49 | END |
51 | < "$INPUT_FILE" > "$OUTPUT_FILE" | ||
diff --git a/src/firefox@.service.in b/src/firefox@.service index e3c0329..af36623 100644 --- a/src/firefox@.service.in +++ b/src/firefox@.service | |||
@@ -11,8 +11,6 @@ ExecStart = /usr/local/bin/firefox | |||
11 | Restart = on-failure | 11 | Restart = on-failure |
12 | PassEnvironment = DISPLAY XAUTHORITY | 12 | PassEnvironment = DISPLAY XAUTHORITY |
13 | MemoryMax = 50% | 13 | MemoryMax = 50% |
14 | IOReadIOPSMax = | ||
15 | IOWriteIOPSMax = | ||
16 | 14 | ||
17 | [Install] | 15 | [Install] |
18 | Also=ioslay@.service | 16 | Also=ioslay@.service |