diff options
Diffstat (limited to 'ioslay-mgr.sh')
-rwxr-xr-x | ioslay-mgr.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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 |