mirror of
https://github.com/ben-grande/qusal.git
synced 2025-01-30 17:13:38 -05:00
aea8438904
- Add to qvm-run: - no-gui when command doesn't require a GUI - filter-escape-chars when pass-io is set and output is not a file, such as a pipe that could later be used to print information. - Change remaining echo to printf - Add end-of-options separator when possible
44 lines
947 B
Plaintext
44 lines
947 B
Plaintext
{#
|
|
SPDX-FileCopyrightText: 2023 - 2025 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
#}
|
|
|
|
{% set qube = 'disp-' ~ slsdotpath -%}
|
|
|
|
{% set running = 0 -%}
|
|
{% if salt['cmd.shell']('qvm-ls --no-spinner --raw-list --running -- ' ~ qube) == qube -%}
|
|
{% set running = 1 -%}
|
|
{% endif -%}
|
|
|
|
"{{ qube }}-start":
|
|
qvm.start:
|
|
- name: {{ qube }}
|
|
|
|
"{{ qube }}-qubes-prefs-updatevm":
|
|
cmd.run:
|
|
- require:
|
|
- qvm: {{ qube }}-start
|
|
- name: qubes-prefs -- updatevm {{ qube }}
|
|
|
|
"{{ qube }}-qubes-prefs-default_netvm":
|
|
cmd.run:
|
|
- require:
|
|
- qvm: {{ qube }}-start
|
|
- name: qubes-prefs -- default_netvm {{ qube }}
|
|
|
|
"{{ qube }}-qubes-prefs-clockvm":
|
|
cmd.run:
|
|
- require:
|
|
- qvm: {{ qube }}-start
|
|
- name: qubes-prefs -- clockvm {{ qube }}
|
|
|
|
{% if running == 0 -%}
|
|
"{{ qube }}-shutdown":
|
|
qvm.shutdown:
|
|
- name: {{ qube }}
|
|
- flags:
|
|
- wait
|
|
- force
|
|
{% endif -%}
|