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:
parent
4f05d638fb
commit
a5610dd7d5
3 changed files with 24 additions and 15 deletions
|
@ -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:
|
||||
|
|
|
@ -23,29 +23,29 @@
|
|||
when: nginx_installed is defined
|
||||
#when: nginx_install
|
||||
|
||||
- name: Make home page autostart on localhost (the server's console) if session manager is LXDE (rpi)
|
||||
- name: Does /etc/xdg/lxsession/LXDE-pi/autostart exist? (if so, auto-launch browser on boot, displaying http://box.lan IIAB home page)
|
||||
stat:
|
||||
path: /etc/xdg/lxsession/LXDE-pi/autostart
|
||||
register: lxde_present
|
||||
register: lxde_pi_autostart_present
|
||||
|
||||
- name: Check for Chromium name change
|
||||
- name: Does /usr/bin/chromium exist? (check for browser filename change)
|
||||
stat:
|
||||
path: /usr/bin/chromium
|
||||
register: chromium_present
|
||||
|
||||
- name: Add chromium-browser to /etc/xdg/lxsession/LXDE-pi/autostart if session manager is LXDE
|
||||
- name: Add chromium-browser to /etc/xdg/lxsession/LXDE-pi/autostart
|
||||
lineinfile:
|
||||
path: /etc/xdg/lxsession/LXDE-pi/autostart
|
||||
regexp: '^/usr/bin/chromium-browser'
|
||||
line: '/usr/bin/chromium-browser --disable-restore-session-state http://box/home'
|
||||
when: lxde_present.stat.exists and not chromium_present.stat.exists
|
||||
when: lxde_pi_autostart_present.stat.exists and not chromium_present.stat.exists
|
||||
|
||||
- name: Add chromium to /etc/xdg/lxsession/LXDE-pi/autostart if session manager is LXDE
|
||||
- name: Add chromium to /etc/xdg/lxsession/LXDE-pi/autostart
|
||||
lineinfile:
|
||||
path: /etc/xdg/lxsession/LXDE-pi/autostart
|
||||
regexp: '^/usr/bin/chromium'
|
||||
line: '/usr/bin/chromium --disable-restore-session-state http://box/home'
|
||||
when: lxde_present.stat.exists and chromium_present.stat.exists
|
||||
when: lxde_pi_autostart_present.stat.exists and chromium_present.stat.exists
|
||||
|
||||
|
||||
- debug:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue