diff options
author | Andrew Cady <d@jerkface.net> | 2022-11-21 16:10:28 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2022-11-21 16:10:28 -0500 |
commit | 29c159a2e969264cc9a2bbc2436ff7fefb4c0983 (patch) | |
tree | 4374a650ce3f9d8e0c19bd156de3ffe80991e86a | |
parent | 2c16f9e780f67aa471489002e97264d2bafea278 (diff) |
firestart will automatically start ioslay-mgr
-rwxr-xr-x | firestart | 2 | ||||
-rwxr-xr-x | ioslay-mgr.sh | 10 |
2 files changed, 12 insertions, 0 deletions
@@ -27,6 +27,8 @@ fi | |||
27 | DEV=$(echo $(findmnt --target "$DIR" -o MAJ:MIN -n)) | 27 | DEV=$(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 | ||
30 | ioslay-mgr.sh launch-unit | ||
31 | |||
30 | systemctl --user reset-failed "$UNIT" 2>/dev/null | 32 | systemctl --user reset-failed "$UNIT" 2>/dev/null |
31 | systemd-run --user \ | 33 | systemd-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 | ||
3 | UNIT_NAME=ioslay | ||
4 | if [ "$1" = launch-unit ] | ||
5 | then | ||
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 | ||
11 | fi | ||
12 | |||
3 | if [ -e /usr/lib/bash/sleep ] | 13 | if [ -e /usr/lib/bash/sleep ] |
4 | then | 14 | then |
5 | enable -f /usr/lib/bash/sleep sleep | 15 | enable -f /usr/lib/bash/sleep sleep |