summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDebian Live user <user@debian-BULLSEYE-live-builder-AMD64>2023-04-28 22:09:09 -0400
committerDebian Live user <user@debian-BULLSEYE-live-builder-AMD64>2023-04-28 22:09:17 -0400
commitce8bd3eb52b72a9489e41939cc0b98c46454bb52 (patch)
tree5069e81cb51cd206e61e8ecb92a0d61bbd0e7ae7 /src
parentc04b7b520a03ee020fa658c502b185a5a9857301 (diff)
use "systemd edit" instead of generating a template
Diffstat (limited to 'src')
-rwxr-xr-xsrc/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
3INPUT_FILE=$1 3TARGET=$1
4OUTPUT_FILE=$2
5 4
6die() { printf "%s: Error: %s\n" "$0" "$*" >&2; exit 1; } 5die() { printf "%s: Error: %s\n" "$0" "$*" >&2; exit 1; }
7 6
@@ -43,9 +42,8 @@ READ_OPS=$WRITE_OPS
43DEV=$(echo $(findmnt --target "$DIR" -o MAJ:MIN -n)) 42DEV=$(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
46IOReadIOPSMax="$DEV $READ_OPS" 45cat > "$TARGET" <<END
47IOWriteIOPSMax="$DEV $WRITE_OPS" 46[Service]
48 47IOReadIOPSMax = $DEV $READ_OPS
49sed -e "s/^IOReadIOPSMax *=.*/IOReadIOPSMax = $IOReadIOPSMax/" \ 48IOWriteIOPSMax = $DEV $WRITE_OPS
50 -e "s/^IOWriteIOPSMax *=.*/IOWriteIOPSMax = $IOWriteIOPSMax/" \ 49END
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
11Restart = on-failure 11Restart = on-failure
12PassEnvironment = DISPLAY XAUTHORITY 12PassEnvironment = DISPLAY XAUTHORITY
13MemoryMax = 50% 13MemoryMax = 50%
14IOReadIOPSMax =
15IOWriteIOPSMax =
16 14
17[Install] 15[Install]
18Also=ioslay@.service 16Also=ioslay@.service