Правка конфигов/дир клиппера

This commit is contained in:
Nikolay Kopitonenko 2024-03-12 02:37:26 +03:00
parent 5642a09549
commit a7c6dbad69
2 changed files with 10 additions and 48 deletions

View File

@ -6,46 +6,11 @@ file:
group: root
mode: "0644"
contents:
- "[include printer_hw/hw.cfg]"
- "[include printer_hw/*.cfg]"
- "[include printer_soft/*.cfg]"
- "[include 3dscreen/klipper/configs/*.cfg]"
- "[include printer/*.cfg]"
/home/pi/printer_hw/bed.cfg:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
/home/pi/printer_hw/filament_sensor.cfg:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
/home/pi/printer_hw/hw.cfg:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
/home/pi/printer_soft/soft.cfg:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
/home/pi/printer_data/variables.cfg:
exists: true
filetype: file
owner: pi
group: pi
mode: "0644"
/home/pi/printer_hw:
filetype: directory
exists: true
@ -60,6 +25,13 @@ file:
group: root
mode: "0755"
/home/pi/printer_data:
filetype: directory
exists: true
owner: pi
group: pi
mode: "0755"
/home/pi/printer:
filetype: directory
exists: true

14
install
View File

@ -30,25 +30,15 @@ mkdir -p /home/pi/printer_hw /home/pi/printer_soft /home/pi/printer
install -m644 -o 0 -g 0 $ConfigsHome/home/pi/printer.cfg /home/pi/printer.cfg
chown 0:0 /home/pi/printer.cfg
[ -e /home/pi/printer_hw/bed.cfg ] || \
install -m644 -o 0 -g 0 $ConfigsHome/home/pi/printer_hw/bed.cfg /home/pi/printer_hw/bed.cfg
[ -e /home/pi/printer_hw/filament_sensor.cfg ] || \
install -m644 -o 0 -g 0 $ConfigsHome/home/pi/printer_hw/filament_sensor.cfg /home/pi/printer_hw/filament_sensor.cfg
[ -e /home/pi/printer_hw/hw.cfg ] || \
touch /home/pi/printer_hw/hw.cfg
[ -e /home/pi/printer_soft/soft.cfg ] || \
touch /home/pi/printer_soft/soft.cfg
[ -e /home/pi/printer_data/variables.cfg ] || {
[ -e /home/pi/printer_data ] || {
mkdir /home/pi/printer_data
touch /home/pi/printer_data/variables.cfg
}
chown -R 0:0 /home/pi/printer_hw /home/pi/printer_soft
chown pi:pi /home/pi/printer /home/pi/printer_data/variables.cfg
chown -R pi:pi /home/pi/printer /home/pi/printer_data
mkdir -p /home/pi/.klippy
chown pi:pi /home/pi/.klippy