summaryrefslogtreecommitdiff
blob: 6b19f22e4cb5b33381f5453c0f0cc9cd995b10db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
set -e

case "$1" in
    start)
      systemctl is-active incus -q && exit 0
      exec incusd activateifneeded
    ;;

    stop)
      systemctl is-active incus -q || exit 0
      exec incusd shutdown
    ;;

    *)
        echo "unknown argument \`$1'" >&2
        exit 1
    ;;
esac

exit 0