1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Add /usr/local/sbin/netwarn to /etc/xdg/lxsession/LXDE-pi/autostart

This commit is contained in:
root 2022-07-21 14:45:37 -04:00
parent 4f05d638fb
commit a5610dd7d5
3 changed files with 24 additions and 15 deletions

View file

@ -113,7 +113,7 @@
- name: Link /usr/local/sbin/netwarn to {{ iiab_dir }}/scripts/netwarn
file:
src: "{{ iiab_dir }}/scripts/netwarn.sh"
src: "{{ iiab_dir }}/scripts/netwarn"
dest: /usr/local/sbin/netwarn
state: link
when: mate_dir.stat.exists and mate_dir.stat.isdir
@ -125,13 +125,22 @@
state: link
when: mate_dir.stat.exists and mate_dir.stat.isdir
# RpiOS detection based on register: lx in pwd-warnings.yml
- name: Is /etc/xdg/lxsession/LXDE-pi a directory?
- name: Does /etc/xdg/lxsession/LXDE-pi/autostart exist?
stat:
path: /etc/xdg/lxsession/LXDE-pi
register: lx
path: /etc/xdg/lxsession/LXDE-pi/autostart
register: lxde_pi_autostart_present
# clairify usage
- name: If so, add /usr/local/sbin/netwarn to /etc/xdg/lxsession/LXDE-pi/autostart
lineinfile:
path: /etc/xdg/lxsession/LXDE-pi/autostart
regexp: '^/usr/local/sbin/netwarn$'
line: '/usr/local/sbin/netwarn'
when: lxde_pi_autostart_present.stat.exists
# Add logic for Mint & stock Ubuntu here? (in addition to Mate & LXDE-pi)
# RECORD Network AS INSTALLED
- name: "Set 'network_installed: True'"
set_fact: