dataset/seed/peertube/manual/image/postinstall/peertube.sh

28 lines
1 KiB
Bash
Raw Normal View History

2022-04-08 18:53:57 +02:00
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"
2022-10-17 18:17:28 +02:00
yarn add peertube-plugin-auth-openid-connect@0.1.0 --production
2022-04-08 18:53:57 +02:00
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/.."
2022-10-17 18:17:28 +02:00
#patch -p0 < "$IMAGE_DIR_RECIPIENT_IMAGE/postinstall/peertube.patch"
2022-04-08 18:53:57 +02:00
cd -