Fixed NoDM and OctoPrint building

This commit is contained in:
Logan G 2020-08-11 03:18:14 -06:00
parent 3fe2deca8b
commit 5c72a8acf9
Signed by: logan
GPG key ID: E328528C921E7A7A
4 changed files with 8 additions and 6 deletions

View file

@ -11,7 +11,9 @@ on_chroot << EOF
if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then
adduser --disabled-password --gecos "" ${FIRST_USER_NAME}
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 "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

View file

@ -1,6 +1,7 @@
#!/bin/bash -e
if [ -d /home/octoprint ];
on_chroot << EOF
if [ -d /home/octoprint ]; then
cd /home/octoprint || exit 1
mkdir OctoPrint || exit 1
cd OctoPrint || exit 1
@ -9,3 +10,4 @@ if [ -d /home/octoprint ];
pip install pip --upgrade || exit 1
pip install octoprint || exit 1
fi
EOF

View file

@ -1,6 +1,6 @@
#!/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
update-alternatives --install /usr/bin/x-www-browser \

View file

@ -1,2 +0,0 @@
NODM_USER=pi
NODM_XSESSION=/home/pi/.xprofile