Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
split out enable -- merge conflict
  • Loading branch information
jvonau committed Nov 29, 2018
commit a15a26808f9a851962d3f5400e67bc363eb013f8
5 changes: 5 additions & 0 deletions roles/4-server-options/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
when: squid_install
tags: base, squid, network, domain

- name: Installing Captive Portal
include_tasks: roles/network/tasks/captive_portal.yml
when: py_captive_portal_install
tags: base, captive_portal

# NETWORK moved to the very end, after Stage 9 (9-LOCAL-ADDONS)
# It can also be run manually using: cd /opt/iiab/iiab; ./iiab-network
#
Expand Down
49 changes: 49 additions & 0 deletions roles/network/tasks/captive_portal_enable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
- name: Install Apache's captive-portal.conf from template if py_captive_portal_enabled
template:
src: roles/network/templates/captive-portal/captive-portal.conf
dest: /etc/{{ apache_config_dir }}/captive-portal.conf
owner: root
group: root
mode: 0740
when: py_captive_portal_enabled

- name: Enable Apache's captive-portal.conf if py_captive_portal_enabled (debuntu)
file:
src: /etc/apache2/sites-available/captive-portal.conf
path: /etc/apache2/sites-enabled/captive-portal.conf
state: link
when: py_captive_portal_enabled and is_debuntu

- name: Enable Apache's default-ssl.conf if py_captive_portal_enabled (debuntu)
file:
src: /etc/apache2/sites-available/default-ssl.conf
path: /etc/apache2/sites-enabled/default-ssl.conf
state: link
when: py_captive_portal_enabled and is_debuntu

- name: Enable & Start systemd service py-captive-portal.service if py_captive_portal_enabled
systemd:
name: py-captive-portal.service
daemon-reload: yes
enabled: yes
state: started
when: py_captive_portal_enabled

- name: Disable & Stop py-captive-portal.service if not py_captive_portal_enabled
systemd:
name: py-captive-portal.service
enabled: no
state: stopped
when: not py_captive_portal_enabled

- name: Disable Apache's captive-portal.conf if not py_captive_portal_enabled (debuntu)
file:
path: /etc/apache2/sites-enabled/captive-portal.conf
state: absent
when: not py_captive_portal_enabled and is_debuntu

- name: Disable Apache's default-ssl.conf if not py_captive_portal_enabled (debuntu)
file:
path: /etc/apache2/sites-enabled/default-ssl.conf
state: absent
when: not py_captive_portal_enabled and is_debuntu
1 change: 1 addition & 0 deletions scripts/calibre-install-pinned-rpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ echo "deb http://raspbian.raspberrypi.org/raspbian/ testing main" > /etc/apt/sou
apt update
# WARNING: you MUST remove old .deb's from /opt/iiab/downloads if upgrading Calibre in this way, SEE: http://FAQ.IIAB.IO "Can I upgrade or reinstall server apps?"
apt -y install sqlite3 # Appears no longer nec as of 2018-10-23. Was required in Sept 2018 as workaround for https://github.com/iiab/iiab/issues/1139 that blocked install of Admin Console
apt -y install /opt/iiab/downloads/calibre*.deb
#sed -i '$ d' /etc/apt/sources.list.d/rpi-testing.list # Removes last line
rm /etc/apt/sources.list.d/rpi-testing.list
# Clears the cache of rpi/testing
Expand Down