chore: remove non-standard books
This commit is contained in:
@@ -1,51 +1,5 @@
|
||||
package setup
|
||||
|
||||
const rdpCheck = `---
|
||||
name: rdpCheck
|
||||
target_os: "Linux"
|
||||
tasks:
|
||||
- name: Check RDP
|
||||
command: "ps -aux | grep rdp | grep -v grep"
|
||||
`
|
||||
|
||||
const enableVncConsent = `---
|
||||
name: enableVncConsent
|
||||
target_os: "Debian"
|
||||
target_tag: "Linux-ThinClient"
|
||||
variables:
|
||||
- name: service-file
|
||||
value: /etc/systemd/system/x11vnc.service
|
||||
tasks:
|
||||
- name: edit x11vnc.service
|
||||
command: >
|
||||
sed -i "s|ExecStart=/usr/bin/x11vnc.*|ExecStart=/usr/bin/x11vnc -xkb
|
||||
-noxrecord -noxfixes -noxdamage -display :0 -auth /home/user/.Xauthority
|
||||
-ncache 0 -nopw -accept 'popup'|" {{ service-file }}
|
||||
- name: systemctl daemon-reload
|
||||
command: systemctl daemon-reload
|
||||
- name: systemctl restart
|
||||
command: systemctl restart x11vnc
|
||||
`
|
||||
|
||||
const disableVncConsent = `---
|
||||
name: disableVncConsent
|
||||
target_os: "Debian"
|
||||
target_tag: "Linux-ThinClient"
|
||||
variables:
|
||||
- name: service-file
|
||||
value: /etc/systemd/system/x11vnc.service
|
||||
tasks:
|
||||
- name: edit x11vnc.service
|
||||
command: >
|
||||
sed -i "s|ExecStart=/usr/bin/x11vnc.*|ExecStart=/usr/bin/x11vnc -xkb
|
||||
-noxrecord -noxfixes -noxdamage -display :0 -auth /home/user/.Xauthority
|
||||
-ncache 0 -nopw|" {{ service-file }}
|
||||
- name: systemctl daemon-reload
|
||||
command: systemctl daemon-reload
|
||||
- name: systemctl restart
|
||||
command: systemctl restart x11vnc
|
||||
`
|
||||
|
||||
const updateAptCache = `---
|
||||
name: updateAptCache
|
||||
target_os: "Linux"
|
||||
|
||||
@@ -40,9 +40,7 @@ func fsCheck() (bool, error) {
|
||||
// Basic state
|
||||
func ensState() (bool, error) {
|
||||
files := []string{"./api.conf", "./os_categories.json",
|
||||
"./books/rdpCheck.yaml",
|
||||
"./books/updateAptCache.yaml", "./books/updateOs.yaml",
|
||||
"./books/enableVncConsent.yaml", "./books/disableVncConsent.yaml",
|
||||
}
|
||||
|
||||
failedState := false
|
||||
@@ -56,16 +54,10 @@ func ensState() (bool, error) {
|
||||
err = os.WriteFile(f, []byte(apiConf), 0644)
|
||||
case "./os_categories.json":
|
||||
err = os.WriteFile(f, []byte(osCategories), 0644)
|
||||
case "./books/rdpCheck.yaml":
|
||||
err = os.WriteFile(f, []byte(rdpCheck), 0644)
|
||||
case "./books/updateAptCache.yaml":
|
||||
err = os.WriteFile(f, []byte(updateAptCache), 0644)
|
||||
case "./books/updateOs.yaml":
|
||||
err = os.WriteFile(f, []byte(updateOs), 0644)
|
||||
case "./books/enableVncConsent.yaml":
|
||||
err = os.WriteFile(f, []byte(enableVncConsent), 0644)
|
||||
case "./books/disableVncConsent.yaml":
|
||||
err = os.WriteFile(f, []byte(disableVncConsent), 0644)
|
||||
default:
|
||||
log.Println("no template defined for this file... not making it")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user