touchprint/stage2/06-utils/00-run.sh
Logan Gartner 6bd849c7a8
Changed config program to TP-Config, added Octo-Settings
Changed "octo-config" to "tp-config" as "octo-config" was misleading.

Added octo-settings, a command line utility that can read and set
OctoPrint settings.

Added OctoPrint config menu, in which I added the ability to have
localhost autologin as a user in OctoPrint

Improved grammar and verbosity in some text dialogs

Added message to the end of first-time explaining how to configure
TouchPrint

Updated README and TODO
2020-09-03 01:25:46 -06:00

23 lines
753 B
Bash
Executable file

#!/usr/bin/env bash
set -e
mkdir -p "${ROOTFS_DIR}/usr/local/bin/"
install -m 755 files/tp-config "${ROOTFS_DIR}/usr/local/bin/tp-config"
install -m 755 files/octo-settings "${ROOTFS_DIR}/usr/local/bin/octo-settings"
install -m 755 files/first-time.sh "${ROOTFS_DIR}/etc/profile.d/first-time.sh"
install -m 755 files/tp-lib.sh "${ROOTFS_DIR}/usr/local/lib/tp-lib.sh"
# Autologin on first boot
mkdir -p ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/
cat > ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/override.conf << 'EOF'
[Service]
ExecStart=
ExecStart=-/usr/sbin/agetty --autologin root --noclear %I $TERM
EOF
on_chroot << EOF
# Install PyYAML
pip3 install pyyaml
# Don't boot to a GUI
systemctl set-default multi-user.target
EOF