Development (#105)

* clean up with some redirects

* plugins from user, get better camera info

* readme, version
This commit is contained in:
paukstelis
2023-07-18 16:55:27 -04:00
committed by GitHub
parent e564d0a79f
commit 5a7cde9a00
6 changed files with 22 additions and 20 deletions

View File

@@ -1,10 +1,10 @@
Updated July 1, 2023.
Updated July 18, 2023.
Want to support this work? Buy Me a Coffee. https://www.buymeacoffee.com/ppaukstelis.
Need help with octoprint_deploy? Ask on Discord: https://discord.gg/6vgSjgvR6u
# octoprint_deploy 1.0.3 - ALL NEW
# octoprint_deploy 1.0.4 - ALL NEW
* These files provide a bash script for quickly deploying multiple octoprint instances on a single computer. For Linux systems (Ubuntu, Fedora, etc.) it will also install OctoPrint and a video streamer (ustreamer). No need for lots of file editing or complicated Docker compose scripts! A background video on how it generally works from my ERRF2022 talk can be found here: https://www.youtube.com/watch?v=q0iCNl8-kJI&t=15378s
* octoprint_deploy and octoprint_install are being merged! Maintaining two separate scripts was close to twice the amount of work. By merging the scripts many new features have been included, while also providing greater simplicity in setup. For now, the merged script will be called octoprint_deploy and at some point the octoprint_install repository will point here.

View File

@@ -29,9 +29,9 @@ detect_camera() {
}
remove_camera() {
systemctl stop $1.service
systemctl stop $1.service
systemctl disable $1.service
rm /etc/systemd/system/$1.service
rm /etc/systemd/system/$1.service 2>/dev/null
sed -i "/$1/d" /etc/udev/rules.d/99-octoprint.rules
sed -i "/$1/d" /etc/octoprint_cameras
if [ "$HAPROXY" == true ]; then

View File

@@ -320,7 +320,7 @@ remove_instance() {
if [ -f /etc/systemd/system/$opt.service ]; then
systemctl stop $opt.service
systemctl disable $opt.service
rm /etc/systemd/system/$opt.service
rm /etc/systemd/system/$opt.service 2>/dev/null
fi
#Get all cameras associated with this instance.

View File

@@ -8,7 +8,7 @@ cyan=$(echo -en "\e[96m")
yellow=$(echo -en "\e[93m")
main_menu() {
VERSION=1.0.3
VERSION=1.0.4
#reset
UDEV=''
TEMPUSB=''

View File

@@ -2,7 +2,7 @@
install_plugin() {
echo "Installing $plugin...."
$OCTOPIP install "$plugin_path"
sudo -u $user $OCTOPIP install "$plugin_path"
}
plugin_menu() {

28
util.sh
View File

@@ -315,18 +315,19 @@ remove_everything() {
done
echo "Removing system stuff"
rm /etc/systemd/system/octoprint.service
rm /etc/octoprint_streamer
rm /etc/octoprint_deploy
rm /etc/octoprint_instances
rm /etc/octoprint_cameras
rm /etc/udev/rules.d/99-octoprint.rules
rm /etc/sudoers.d/octoprint_reboot
rm /etc/sudoers.d/octoprint_systemctl
rm -rf /home/$user/.octoprint
rm -rf /home/$user/OctoPrint
rm -rf /home/$user/ustreamer
rm -rf /home/$user/mjpg-streamer
rm /etc/systemd/system/octoprint.service 2>/dev/null
rm /etc/octoprint_streamer 2>/dev/null
rm /etc/octoprint_deploy 2>/dev/null
rm /etc/octoprint_instances 2>/dev/null
rm /etc/octoprint_cameras 2>/dev/null
rm /etc/udev/rules.d/99-octoprint.rules 2>/dev/null
rm /etc/sudoers.d/octoprint_reboot 2>/dev/null
rm /etc/sudoers.d/octoprint_systemctl 2>/dev/null
rm -rf /home/$user/.octoprint 2>/dev/null
rm -rf /home/$user/OctoPrint 2>/dev/null
rm -rf /home/$user/ustreamer 2>/dev/null
rm -rf /home/$user/mjpg-streamer 2>/dev/null
rm -rf /home/$user/camera-streamer 2>/dev/null
systemctl restart haproxy.service
systemctl daemon-reload
@@ -387,7 +388,8 @@ diagnostics() {
echo "**************************************" | log
systemctl status $instance -l --no-pager | log
#get needed config info
sudo -u $user $OCTOEXEC --basedir=/home/$user/.$INSTANCE config get plugins.classicwebcam | log
sudo -u $user $OCTOEXEC --basedir=/home/$user/.$INSTANCE config get plugins.classicwebcam.stream | log
sudo -u $user $OCTOEXEC --basedir=/home/$user/.$INSTANCE config get plugins.classicwebcam.snapshot | log
sudo -u $user $OCTOEXEC --basedir=/home/$user/.$INSTANCE config get webcam | log
done
#get all cam status