allow backup of generic as 'octoprint'
This commit is contained in:
@@ -59,6 +59,7 @@ These files provide a bash script for quickly deploying multiple octoprint insta
|
||||
* Change udev rules for an instance with `sudo octoprint_deploy/octoprint_deploy.sh replace`
|
||||
* Always a good idea to update octoprint_deploy from time-to-time with `git -C octoprint_deploy pull`
|
||||
# Recent Changes
|
||||
* Allow making backups of generic instance.
|
||||
* Add 'noserial' command line option. Currently for cameras only, this will unset the serial number in cases where cameras are known to share a serial number.
|
||||
* Add detection for ch34x driver. This is used by Weedo printers and must be compiled separately.
|
||||
* Utility sub-menu for less used options.
|
||||
|
||||
@@ -389,7 +389,7 @@ add_camera() {
|
||||
|
||||
if [ -z "$PI" ]; then
|
||||
detect_camera
|
||||
if [ -n "$NOSERIAL" ]; then
|
||||
if [ -n "$NOSERIAL" ] && [ -n "$CAM" ]; then
|
||||
unset CAM
|
||||
fi
|
||||
#Failed state. Nothing detected
|
||||
@@ -1075,7 +1075,7 @@ create_menu() {
|
||||
options+=("Quit")
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
if [ "$opt" == Quit ] || [ "$opt" == generic ]; then
|
||||
if [ "$opt" == Quit ]; then
|
||||
main_menu
|
||||
fi
|
||||
|
||||
@@ -1196,6 +1196,9 @@ share_uploads() {
|
||||
back_up() {
|
||||
INSTANCE=$1
|
||||
echo "Creating backup of $INSTANCE...."
|
||||
if [ "$INSTANCE" == generic ]; then
|
||||
INSTANCE="octoprint"
|
||||
fi
|
||||
d=$(date '+%Y-%m-%d')
|
||||
sudo -p $user tar -czf ${INSTANCE}_${d}_backup.tar.gz -C /home/$user/ .${INSTANCE}
|
||||
echo "Tarred and gzipped backup created in /home/$user"
|
||||
|
||||
Reference in New Issue
Block a user