Mount install script instead of copying
This commit is contained in:
parent
a0c23cc030
commit
2136f3e999
2 changed files with 3 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
ROOTFS=rootfs
|
ROOTFS=/tmp/matrix
|
||||||
|
|
||||||
wget http://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86_64/alpine-minirootfs-3.9.0-x86_64.tar.gz
|
wget http://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86_64/alpine-minirootfs-3.9.0-x86_64.tar.gz
|
||||||
|
|
||||||
|
@ -16,9 +16,8 @@ mkdir -p $ROOTFS/etc/systemd/system \
|
||||||
|
|
||||||
touch $ROOTFS/etc/machine-id $ROOTFS/etc/resolv.conf
|
touch $ROOTFS/etc/machine-id $ROOTFS/etc/resolv.conf
|
||||||
|
|
||||||
cp scripts/install.sh $ROOTFS/root/
|
sudo systemd-nspawn --bind=$PWD/scripts/install.sh:/root/install.sh -D $ROOTFS/ /bin/sh /root/install.sh
|
||||||
sudo systemd-nspawn -D $ROOTFS/ /bin/sh /root/install.sh
|
|
||||||
|
|
||||||
cp systemd/* $ROOTFS/etc/systemd/system/
|
cp systemd/* $ROOTFS/etc/systemd/system/
|
||||||
|
|
||||||
mksquashfs $ROOTFS/ matrix.raw
|
mksquashfs $ROOTFS/ /tmp/matrix.raw
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Matrix IRC gateway
|
|
||||||
After=matrix.service
|
|
||||||
Requires=matrix.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=exec
|
|
||||||
ExecStart=/usr/bin/mautrix-telegram -c /etc/matrix/telegram-config.yaml -r /etc/matrix/telegram-registration.yaml
|
|
||||||
StateDirectory=matrix-telegram
|
|
||||||
ConfigurationDirectory=matrix
|
|
Loading…
Reference in a new issue