summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2022-11-21 16:10:28 -0500
committerAndrew Cady <d@jerkface.net>2022-11-21 16:10:28 -0500
commit29c159a2e969264cc9a2bbc2436ff7fefb4c0983 (patch)
tree4374a650ce3f9d8e0c19bd156de3ffe80991e86a
parent2c16f9e780f67aa471489002e97264d2bafea278 (diff)
firestart will automatically start ioslay-mgr
-rwxr-xr-xfirestart2
-rwxr-xr-xioslay-mgr.sh10
2 files changed, 12 insertions, 0 deletions
diff --git a/firestart b/firestart
index da094c6..5f388b5 100755
--- a/firestart
+++ b/firestart
@@ -27,6 +27,8 @@ fi
27DEV=$(echo $(findmnt --target "$DIR" -o MAJ:MIN -n)) 27DEV=$(echo $(findmnt --target "$DIR" -o MAJ:MIN -n))
28[ "$DEV" ] || die "could not determine backing device for $DIR" 28[ "$DEV" ] || die "could not determine backing device for $DIR"
29 29
30ioslay-mgr.sh launch-unit
31
30systemctl --user reset-failed "$UNIT" 2>/dev/null 32systemctl --user reset-failed "$UNIT" 2>/dev/null
31systemd-run --user \ 33systemd-run --user \
32 --unit "$UNIT" \ 34 --unit "$UNIT" \
diff --git a/ioslay-mgr.sh b/ioslay-mgr.sh
index 1241a68..56ab849 100755
--- a/ioslay-mgr.sh
+++ b/ioslay-mgr.sh
@@ -1,5 +1,15 @@
1#!/bin/bash 1#!/bin/bash
2 2
3UNIT_NAME=ioslay
4if [ "$1" = launch-unit ]
5then
6 if systemctl --user is-active "$UNIT_NAME"
7 then systemctl --user restart "$UNIT_NAME"
8 else systemd-run --user -u "$UNIT_NAME" "$0"
9 fi
10 exit
11fi
12
3if [ -e /usr/lib/bash/sleep ] 13if [ -e /usr/lib/bash/sleep ]
4then 14then
5 enable -f /usr/lib/bash/sleep sleep 15 enable -f /usr/lib/bash/sleep sleep