#!/sbin/openrc-run description="Apache NiFi Registry service" supervisor=supervise-daemon name=nifi-registry command="/usr/lib/nifi-registry/bin/nifi-registry.sh" command_args="run" command_user="${NIFI_REGISTRY_USER:-nifi-registry}:${NIFI_REGISTRY_GROUP:-nifi-registry}" directory="/usr/lib/nifi-registry" pidfile="/run/nifi-registry/nifi-registry.pid" supervise_daemon_args="--chdir /usr/lib/nifi-registry --env HOME=/var/lib/nifi-registry --pidfile ${pidfile}" depend() { need net use dns logger } start_pre() { local service_owner="${NIFI_REGISTRY_USER:-nifi-registry}:${NIFI_REGISTRY_GROUP:-nifi-registry}" checkpath -d -m 0750 -o "$service_owner" \ /run/nifi-registry \ /var/lib/nifi-registry \ /var/log/nifi-registry }