#!/bin/sh set -eu umask 077 export DEBIAN_FRONTEND=noninteractive printf '#!/bin/sh\nexit 101\n' > /usr/sbin/policy-rc.d chmod 0755 /usr/sbin/policy-rc.d apt-get update -qq > /opt/canary/setup.log 2>&1 apt-get install -y -qq --no-install-recommends postgresql ca-certificates curl procps >> /opt/canary/setup.log 2>&1 npm --prefix /opt/canary install --no-audit --no-fund --ignore-scripts @atproto/lex-cbor@0.1.7 ws@8.22.1 >> /opt/canary/setup.log 2>&1 gzip -dc /opt/canary/zlay.gz > /opt/canary/zlay chmod 0755 /opt/canary/zlay PG_BIN=$(pg_config --bindir) install -d -o postgres -g postgres /opt/canary/pg runuser -u postgres -- "$PG_BIN/initdb" -D /opt/canary/pg --auth-local=trust --auth-host=trust >> /opt/canary/setup.log 2>&1 mkdir -p /opt/canary/data/events /opt/canary/data/index