mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-15 19:44:29 +05:00
preconfigure octoprint for use with klipper
This commit is contained in:
10
resources/octoprint_config.cfg
Normal file
10
resources/octoprint_config.cfg
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
serial:
|
||||||
|
additionalPorts:
|
||||||
|
- /tmp/printer
|
||||||
|
disconnectOnErrors: false
|
||||||
|
port: /tmp/printer
|
||||||
|
server:
|
||||||
|
commands:
|
||||||
|
serverRestartCommand: sudo service octoprint restart
|
||||||
|
systemRestartCommand: sudo shutdown -r now
|
||||||
|
systemShutdownCommand: sudo shutdown -h now
|
||||||
@@ -6,6 +6,7 @@ octoprint_install_routine(){
|
|||||||
add_reboot_permission
|
add_reboot_permission
|
||||||
octoprint_reverse_proxy_dialog
|
octoprint_reverse_proxy_dialog
|
||||||
create_custom_hostname
|
create_custom_hostname
|
||||||
|
create_config_yaml
|
||||||
load_server
|
load_server
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,6 +115,15 @@ octoprint_reverse_proxy_dialog(){
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create_config_yaml(){
|
||||||
|
if [ ! -d $OCTOPRINT_CFG_DIR ]; then
|
||||||
|
status_msg "Creating config.yaml ..."
|
||||||
|
mkdir $OCTOPRINT_CFG_DIR
|
||||||
|
cp ${HOME}/kiauh/resources/octoprint_config.cfg $OCTOPRINT_CFG_DIR/config.yaml
|
||||||
|
ok_msg "Config created!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
load_server(){
|
load_server(){
|
||||||
start_octoprint
|
start_octoprint
|
||||||
#create an octoprint.log symlink in home-dir just for convenience
|
#create an octoprint.log symlink in home-dir just for convenience
|
||||||
|
|||||||
Reference in New Issue
Block a user