Fixed NoDM and OctoPrint building
This commit is contained in:
parent
3fe2deca8b
commit
5c72a8acf9
4 changed files with 8 additions and 6 deletions
|
@ -11,7 +11,9 @@ on_chroot << EOF
|
||||||
if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then
|
if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then
|
||||||
adduser --disabled-password --gecos "" ${FIRST_USER_NAME}
|
adduser --disabled-password --gecos "" ${FIRST_USER_NAME}
|
||||||
fi
|
fi
|
||||||
adduser --disabled-password --gecos "" octoprint
|
if ! id -u octoprint >/dev/null 2>&1; then
|
||||||
|
adduser --disabled-password --gecos "" octoprint
|
||||||
|
fi
|
||||||
echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd
|
echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd
|
||||||
echo "octoprint:$(cat /dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c20)" | chpasswd
|
echo "octoprint:$(cat /dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c20)" | chpasswd
|
||||||
echo "root:$(cat /dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c20)" | chpasswd
|
echo "root:$(cat /dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c20)" | chpasswd
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
if [ -d /home/octoprint ];
|
on_chroot << EOF
|
||||||
|
if [ -d /home/octoprint ]; then
|
||||||
cd /home/octoprint || exit 1
|
cd /home/octoprint || exit 1
|
||||||
mkdir OctoPrint || exit 1
|
mkdir OctoPrint || exit 1
|
||||||
cd OctoPrint || exit 1
|
cd OctoPrint || exit 1
|
||||||
|
@ -8,4 +9,5 @@ if [ -d /home/octoprint ];
|
||||||
source venv/bin/activate || exit 1
|
source venv/bin/activate || exit 1
|
||||||
pip install pip --upgrade || exit 1
|
pip install pip --upgrade || exit 1
|
||||||
pip install octoprint || exit 1
|
pip install octoprint || exit 1
|
||||||
fi
|
fi
|
||||||
|
EOF
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
echo -n -e "NODM_USER=${FIRST_USER_NAME}\nNODM_XSESSION=/home/${FIRST_USER_NAME}/.xprofile" > /etc/nodm.conf
|
echo -n -e "NODM_USER=${FIRST_USER_NAME}\nNODM_XSESSION=/home/${FIRST_USER_NAME}/.xprofile" > ${ROOTFS_DIR}/etc/nodm.conf
|
||||||
|
|
||||||
on_chroot << EOF
|
on_chroot << EOF
|
||||||
update-alternatives --install /usr/bin/x-www-browser \
|
update-alternatives --install /usr/bin/x-www-browser \
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
NODM_USER=pi
|
|
||||||
NODM_XSESSION=/home/pi/.xprofile
|
|
Loading…
Reference in a new issue