-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make sys-pihole fully replace sys-firewall
- Loading branch information
1 parent
e8a21ef
commit fc37e1b
Showing
3 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,26 @@ SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <[email protected]> | |
SPDX-License-Identifier: AGPL-3.0-or-later | ||
#} | ||
|
||
{% set qube = 'sys-pihole' -%} | ||
{% set running = 0 -%} | ||
{% if salt['cmd.shell']('qvm-ls --no-spinner --raw-list --running ' ~ qube) == qube -%} | ||
{% set running = 1 -%} | ||
{% endif -%} | ||
|
||
"{{ slsdotpath }}-start": | ||
qvm.start: | ||
- name: {{ slsdotpath }} | ||
|
||
"{{ slsdotpath }}-change-prefs": | ||
cmd.script: | ||
- name: prefs.sh | ||
- source: salt://{{ slsdotpath }}/files/admin/prefs.sh | ||
|
||
{# | ||
"{{ slsdotpath }}-start": | ||
qvm.start: | ||
- name: {{ slsdotpath }} | ||
"{{ slsdotpath }}-qubes-prefs-clockvm": | ||
cmd.run: | ||
- require: | ||
- qvm: "{{ slsdotpath }}-start" | ||
- name: qubes-prefs clockvm {{ slsdotpath }} | ||
|
||
"{{ slsdotpath }}-qubes-prefs-updatevm": | ||
cmd.run: | ||
|
@@ -25,4 +36,12 @@ SPDX-License-Identifier: AGPL-3.0-or-later | |
- require: | ||
- qvm: "{{ slsdotpath }}-start" | ||
- name: qubes-prefs default_netvm {{ slsdotpath }} | ||
#} | ||
|
||
{% if running == 0 -%} | ||
"{{ slsdotpath }}-shutdown": | ||
qvm.shutdown: | ||
- name: {{ default_netvm }} | ||
- flags: | ||
- wait | ||
- force | ||
{% endif -%} |