refactor(start.sh): update start.sh to account for the config changes
Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
parent
a5fe107b02
commit
961279f193
|
|
@ -2,15 +2,14 @@
|
||||||
[ ! -e /bin/systemctl ] && sudo -S ln -s /bin/true /bin/systemctl
|
[ ! -e /bin/systemctl ] && sudo -S ln -s /bin/true /bin/systemctl
|
||||||
|
|
||||||
cd ~ || exit 1
|
cd ~ || exit 1
|
||||||
[ ! -d ~/klipper_config ] && mkdir klipper_config
|
|
||||||
[ ! -d ~/klipper_logs ] && mkdir klipper_logs
|
[ ! -d ~/klipper_logs ] && mkdir klipper_logs
|
||||||
[ ! -d ~/gcode_files ] && mkdir gcode_files
|
[ ! -d ~/gcode_files ] && mkdir gcode_files
|
||||||
[ ! -d ~/.moonraker_database ] && mkdir .moonraker_database
|
[ ! -d ~/.moonraker_database ] && mkdir .moonraker_database
|
||||||
|
|
||||||
[ ! -f ~/klipper_config/printer.cfg ] && \
|
if [ ! -d ~/klipper_config ] || find ~/klipper_config -type d -empty; then
|
||||||
cp ~/example-configs/printer.cfg ~/klipper_config/printer.cfg
|
cd ~/example-configs || exit 1
|
||||||
[ ! -f ~/klipper_config/moonraker.conf ] && \
|
cp -r ./* ~/klipper_config
|
||||||
cp ~/example-configs/moonraker.conf ~/klipper_config/moonraker.conf
|
fi
|
||||||
|
|
||||||
sudo chown -R printer:printer ~/klipper_config
|
sudo chown -R printer:printer ~/klipper_config
|
||||||
sudo chown -R printer:printer ~/klipper_logs
|
sudo chown -R printer:printer ~/klipper_logs
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue