#!/bin/bash mkdir -p "$IMAGE_NAME_RISOTTO_IMAGE_DIR/proc/self/" cat /proc/self/stat > "$IMAGE_NAME_RISOTTO_IMAGE_DIR/proc/self/stat" PLUGINS_DIR=/usr/share/peertube_plugins echo """#!/bin/bash set -ex mv /etc/resolv.conf /tmp echo "nameserver 9.9.9.9" > /etc/resolv.conf PLUGINS_DIR=$PLUGINS_DIR mkdir -p "\$PLUGINS_DIR" cd "\$PLUGINS_DIR" yarn add peertube-plugin-auth-openid-connect@0.0.7 --production mkdir -p "\$PLUGINS_DIR/data/peertube-plugin-auth-openid-connect" chown peertube: "\$PLUGINS_DIR/data" chown peertube: "\$PLUGINS_DIR/data/peertube-plugin-auth-openid-connect" rm -f /etc/resolv.conf mv /tmp/resolv.conf /etc """ > "$IMAGE_NAME_RISOTTO_IMAGE_DIR/install.sh" chmod +x "$IMAGE_NAME_RISOTTO_IMAGE_DIR/install.sh" chroot "$IMAGE_NAME_RISOTTO_IMAGE_DIR" /install.sh rm "$IMAGE_NAME_RISOTTO_IMAGE_DIR/proc/self/stat" rmdir "$IMAGE_NAME_RISOTTO_IMAGE_DIR/proc/self/" rm -f "$IMAGE_NAME_RISOTTO_IMAGE_DIR/install.sh" cd "$IMAGE_NAME_RISOTTO_IMAGE_DIR$PLUGINS_DIR/.." patch -p0 < $OLDPWD/peertube/postinstall/peertube.patch cd -