0.1.2 write /etc/octoprint_deploy if missing

This commit is contained in:
paukstelis
2022-07-29 09:48:15 -04:00
parent 744b12bbfb
commit f863c23a98
3 changed files with 30 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ These files provide a simple bash script for quickly deploying multiple octoprin
* Please note, haproxy entries are NOT used for webcams once you use this system. Connect to them via hostname:port.
* General Linux (Ubuntu/Mint/RPiOS/Debian/Fedora/Arch/etc.)
* __You do not need to install OctoPrint using any Wiki instructions, snap, etc. The script will do it for you.__
* octoprint_deploy uses systemd services, so avoid distros that do not use systemd by default (MX Linux)
* Basic guide video here: https://youtu.be/1YINWQ5fNn0
* All commands assume you are operating out of your home directory.
* Install Ubuntu 18-22.X, Mint 20.3+, Debian, DietPi, RPiOS, Armbian, Fedora35+, or ArchLinux on your system (make sure your user is admin for sudo).
@@ -53,6 +54,7 @@ These files provide a simple bash script for quickly deploying multiple octoprin
* Restart all non-template instances from the command line: `sudo octoprint_deploy/octoprint_deploy.sh restart_all`
* Change udev rules for an instance with `sudo octoprint_deploy/octoprint_deploy.sh replace`
# Recent Changes
* Write /etc/octoprint_deploy if missing (older version system preparation)
* Add option for plugin installation during system preparation.
* Enable ssh.
* Added webcam restart to system commands during camera addition.

View File

@@ -909,9 +909,9 @@ firstrun() {
fi
if prompt_confirm "Enable anonymous usage tracking?"; then
$OCTOEXEC config set plugins.tracking.enabled true -bool
$OCTOEXEC config set plugins.tracking.enabled true --bool
else
$OCTOEXEC config set plugins.tracking.enabled false -bool
$OCTOEXEC config set plugins.tracking.enabled false --bool
fi
if prompt_confirm "Use default printer (can be changed later)?"; then
@@ -1080,7 +1080,7 @@ replace_id() {
}
main_menu() {
VERSION=0.1.1
VERSION=0.1.2
#reset
UDEV=''
TEMPUSB=''
@@ -1143,6 +1143,30 @@ if [ $SUDO_USER ]; then user=$SUDO_USER; fi
logfile='octoprint_deploy.log'
SCRIPTDIR=$(dirname $(readlink -f $0))
source $SCRIPTDIR/plugins.sh
# gather info and write /etc/octoprint_deploy if missing
if [ ! -f /etc/octoprint_deploy ] && [ -f /etc/octoprint_instances ]; then
echo "/etc/octoprint_deploy is missing. You may have prepared the system with an older vesion."
echo "The file will be created now."
streamer_type=("mjpg-streamer" "ustreamer")
haproxy_bool=("true" "false")
if [ -f /etc/octopi_version ]; then
echo "type: octopi" >> /etc/octoprint_deploy
apt-get -y install uuid-runtime
else
echo "type: linux" >> /etc/octoprint_deploy
fi
PS3='Select streamer type: '
select str in "${streamer_type[@]}"; do
echo "streamer: $str" >> /etc/octoprint_deploy
break
done
PS3='Using haproxy (select true if using octopi): '
select prox in "${haproxy_bool[@]}"; do
echo "haproxy: $prox" >> /etc/octoprint_deploy
break
done
fi
#command line arguments
if [ "$1" == remove ]; then

View File

@@ -4,4 +4,4 @@ plugin:Firmware Updater path:https://github.com/OctoPrint/OctoPrint-FirmwareUpda
plugin:Terminal Commands Extended: path:https://github.com/jneilliii/OctoPrint-TerminalCommandsExtended/archive/master.zip
plugin:Active Filters Extended path:https://github.com/jneilliii/OctoPrint-ActiveFiltersExtended/archive/master.zip
plugin:PrintTimeGenius path:https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip
plugin:Themify path:https://github.com/birkbjo/OctoPrint-Themeify/archive/master.zip
plugin:UI Customizer path:https://github.com/LazeMSS/OctoPrint-UICustomizer/archive/main.zip