#!/bin/sh case "$1" in "start") printf "[] starting paperless\n" systemctl start redis-paperless paperless-scheduler ;; "stop") printf "[] stopping paperless\n" systemctl stop paperless-web paperless-task-queue paperless-scheduler paperless-consumer redis-paperless ;; "query") exit $([ $(systemctl | grep -c paperless) -gt 0 ]) ;; *) cat <