diff --git a/scripts/targets/debian-12.ts b/scripts/targets/debian-12.ts index 44030b8..86e16b7 100644 --- a/scripts/targets/debian-12.ts +++ b/scripts/targets/debian-12.ts @@ -223,6 +223,7 @@ export const make_instance = (config: schema, name: string) => { await $`mkdir -p ${config.install.base}/instances/${name}/printer_data/config/`; console.log("Generating service files:") + await $`echo ${(await import('../../templates/printer.cfg')).default(config, name)} > ${config.install.base}/instances/${name}/printer_data/config/printer.cfg` await $`echo ${(await import('../../templates/klipper.service')).default(config, name)} | sudo tee ${file}` await $`sudo systemctl enable ${n}.service` diff --git a/templates/klipper.service.ts b/templates/klipper.service.ts index d8f6f4d..253fb50 100644 --- a/templates/klipper.service.ts +++ b/templates/klipper.service.ts @@ -14,6 +14,6 @@ WantedBy=multi-user.target Type=simple User=${opts.install.user} RemainAfterExit=yes -ExecStart=${opts.install.base}/klippy-env/bin/python ${opts.install.base}/repos/klipper/klippy/klippy.py ${opts.install.base}/instances/${instance}/printer_data/config/printer.cfg -l ${opts.install.base}/instances/${instance}/printer_data/logs/klippy.log -a /tmp/klippy_uds_${`${opts.install.prefix}_` ?? ''}${instance} +ExecStart=${opts.install.base}/klippy_env/bin/python ${opts.install.base}/repos/klipper/klippy/klippy.py ${opts.install.base}/instances/${instance}/printer_data/config/printer.cfg -l ${opts.install.base}/instances/${instance}/printer_data/logs/klippy.log -a /tmp/klippy_uds_${`${opts.install.prefix}_` ?? ''}${instance} Restart=always RestartSec=10` \ No newline at end of file diff --git a/templates/moonraker.cfg.ts b/templates/moonraker.cfg.ts index 34875f6..5e116fd 100644 --- a/templates/moonraker.cfg.ts +++ b/templates/moonraker.cfg.ts @@ -13,7 +13,7 @@ host: 0.0.0.0 port: ${opts.instances[instance].moonraker.port} # Make sure the klippy_uds_address is correct. It is initialized # to the default address. -klippy_uds_address: /tmp/klippy_uds_${`${opts.install.prefix}-` ?? ''}${instance} +klippy_uds_address: /tmp/klippy_uds_${`${opts.install.prefix}_` ?? ''}${instance} [file_manager] # cancel object preprocessing - set to True to enable; leave disabled when running on a low-powered device (e.g. Pi Zero) @@ -56,7 +56,7 @@ ${opts.services.fluidd?.enabled ? type: web repo: ${opts.services.fluidd?.repo} path: ${opts.install.base}/repos -}`: ''} +`: ''} [machine] provider: systemd_dbus ` \ No newline at end of file diff --git a/templates/moonraker.service.ts b/templates/moonraker.service.ts index df30023..bb26fc3 100644 --- a/templates/moonraker.service.ts +++ b/templates/moonraker.service.ts @@ -16,6 +16,6 @@ User=${opts.install.user} SupplementaryGroups=moonraker-admin RemainAfterExit=yes EnvironmentFile=${opts.install.base}/instances/${instance}/printer_data/systemd/moonraker.env -ExecStart=${opts.install.base}/instances/${instance}/moonraker-env/bin/python $MOONRAKER_ARGS +ExecStart=${opts.install.base}/moonraker_env/bin/python $MOONRAKER_ARGS Restart=always RestartSec=10` \ No newline at end of file