Compare commits
No commits in common. "afbb0315c6f4e0e2d1dd594856f25f8d662d521a" and "394d8fae00fbbc0d941543daa71a8b5c1f536142" have entirely different histories.
afbb0315c6
...
394d8fae00
32
setup.sh
32
setup.sh
@ -93,17 +93,24 @@ cat klipper/printer.cfg >> printer.cfg.tmp
|
|||||||
mv printer.cfg.tmp printer_data/config/printer.cfg
|
mv printer.cfg.tmp printer_data/config/printer.cfg
|
||||||
|
|
||||||
# Apply Edits to Configs
|
# Apply Edits to Configs
|
||||||
echo.Cyan "Setup Moonraker"
|
echo.cyan "Setup Moonraker"
|
||||||
cd $ROOT_DIR/$PRINTER_NAME/printer_data/config
|
cd $ROOT_DIR/$PRINTER_NAME/printer_data/config
|
||||||
sed -i -e "s/PRINTERNAME/$PRINTER_NAME/g" "moonraker.conf"
|
sed -i -e "s/PRINTERNAME/$PRINTER_NAME/g" "moonraker.conf"
|
||||||
sed -i -e "s/pi/$USER/g" "moonraker.conf"
|
sed -i -e "s/pi/$USER/g" "moonraker.conf"
|
||||||
|
|
||||||
echo.Cyan "Setup Mainsail Config"
|
echo.Cyan "Setup Mainsail Config"
|
||||||
cd $ROOT_DIR/$PRINTER_NAME/mainsail-config
|
cd $ROOT_DIR/$PRINTER_NAME/mainsail-config
|
||||||
USABLE_HOME=`echo "$HOME" | sed -e 's/\//\\\//'`
|
sed -i -e "s/$HOME\/printer_data/$HOME\/$PRINTER_NAME\/printer_data/g" "client.cfg"
|
||||||
sed -i -e "s/~\/printer_data/$USABLE_HOME\/$PRINTER_NAME\/printer_data/g" "client.cfg"
|
|
||||||
sed -i -e "s/pi/$USER/g" "client.cfg"
|
sed -i -e "s/pi/$USER/g" "client.cfg"
|
||||||
|
|
||||||
|
cd $ROOT_DIR/config/services
|
||||||
|
# TODO: Add Crowsnest Support
|
||||||
|
FILES=(moonraker klipper)
|
||||||
|
for f in ${FILES[@]}; do
|
||||||
|
echo.ICyan "Configuring ${f}"
|
||||||
|
sed -i -e "s/PRINTERNAME/$PRINTER_NAME/g" "${f}.service"
|
||||||
|
sed -i -e "s/pi/$USER/g" "${f}.service"
|
||||||
|
done
|
||||||
|
|
||||||
# Download Mainsail
|
# Download Mainsail
|
||||||
cd $ROOT_DIR
|
cd $ROOT_DIR
|
||||||
echo.Cyan "Downloading Mainsail"
|
echo.Cyan "Downloading Mainsail"
|
||||||
@ -116,23 +123,13 @@ echo.Cyan "Run Copy"
|
|||||||
mkdir -p $HOME/$PRINTER_NAME
|
mkdir -p $HOME/$PRINTER_NAME
|
||||||
cp -r $PRINTER_NAME/* $HOME/$PRINTER_NAME
|
cp -r $PRINTER_NAME/* $HOME/$PRINTER_NAME
|
||||||
|
|
||||||
# Create Empty dirs
|
# Create Empty $PRINTER_NAME
|
||||||
dirs=(logs gcodes certs backup mainsail-config)
|
$PRINTER_NAME=(logs gcodes certs backup mainsail-config)
|
||||||
for d in ${dirs[@]}; do
|
for d in ${$PRINTER_NAME[@]}; do
|
||||||
mkdir -p "$HOME/$PRINTER_NAME/$d"
|
mkdir -p "$HOME/$PRINTER_NAME/$d"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Configure System Services
|
# Configure System Services
|
||||||
|
|
||||||
# cd $ROOT_DIR/config/services
|
|
||||||
# TODO: Add Crowsnest Support
|
|
||||||
# FILES=(moonraker klipper)
|
|
||||||
# for f in ${FILES[@]}; do
|
|
||||||
# echo.ICyan "Configuring ${f}"
|
|
||||||
# sed -i -e "s/PRINTERNAME/$PRINTER_NAME/g" "${f}.service"
|
|
||||||
# sed -i -e "s/pi/$USER/g" "${f}.service"
|
|
||||||
# done
|
|
||||||
|
|
||||||
cd $ROOT_DIR/config/services
|
cd $ROOT_DIR/config/services
|
||||||
SERVICES=()
|
SERVICES=()
|
||||||
for f in *.service; do
|
for f in *.service; do
|
||||||
@ -140,7 +137,6 @@ for f in *.service; do
|
|||||||
SERVICES+=($f)
|
SERVICES+=($f)
|
||||||
cp "${f}" "${ROOT_DIR}/${PRINTER_NAME}/${PRINTER_NAME}-${f}"
|
cp "${f}" "${ROOT_DIR}/${PRINTER_NAME}/${PRINTER_NAME}-${f}"
|
||||||
sed -i -e "s/PRINTERNAME/$PRINTER_NAME/g" "${ROOT_DIR}/${PRINTER_NAME}/${PRINTER_NAME}-${f}"
|
sed -i -e "s/PRINTERNAME/$PRINTER_NAME/g" "${ROOT_DIR}/${PRINTER_NAME}/${PRINTER_NAME}-${f}"
|
||||||
sed -i -e "s/pi/$USER/g" "${ROOT_DIR}/${PRINTER_NAME}/${PRINTER_NAME}-${f}"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Install System Services
|
# Install System Services
|
||||||
|
Loading…
Reference in New Issue
Block a user