1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 11:12:06 +00:00

set www_data poweroff false with rename

This commit is contained in:
tim-moody 2025-01-13 19:43:02 -05:00
parent 34326f7318
commit e75a8e5449
10 changed files with 21 additions and 21 deletions

View file

@ -8,7 +8,7 @@
# apache_interface: 127.0.0.1 # apache_interface: 127.0.0.1
# Make this False to disable http://box/common/services/power_off.php button: # Make this False to disable http://box/common/services/power_off.php button:
# allow_www_data_sudo: True # allow_www_data_poweroff: False
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!

View file

@ -77,22 +77,22 @@
# COMPARE nginx_high_php_limits further above. # COMPARE nginx_high_php_limits further above.
# 2020-03-08: DOES THE FLAG BELOW (allow_www_data_sudo) PRESUMABLY WORK # 2020-03-08: DOES THE FLAG BELOW (allow_www_data_poweroff) PRESUMABLY WORK
# WITH NGINX TOO ? (The single-click poweroff button on IIAB's home # WITH NGINX TOO ? (The single-click poweroff button on IIAB's home
# page certainly does still work with NGINX.) # page certainly does still work with NGINX.)
- name: Give {{ apache_user }} (per variable apache_user) permission to poweroff, installing /etc/sudoers.d/020_apache_poweroff from template - name: Give {{ apache_user }} (per variable apache_user) permission to poweroff, installing /etc/sudoers.d/020_www_data_poweroff from template
template: template:
src: 020_apache_poweroff.j2 src: 020_www_data_poweroff.j2
dest: /etc/sudoers.d/020_apache_poweroff dest: /etc/sudoers.d/020_www_data_poweroff
mode: '0440' mode: '0440'
when: allow_www_data_sudo when: allow_www_data_poweroff
- name: Remove {{ apache_user }} (per variable apache_user) permission to poweroff, removing /etc/sudoers.d/020_apache_poweroff - name: Remove {{ apache_user }} (per variable apache_user) permission to poweroff, removing /etc/sudoers.d/020_www_data_poweroff
file: file:
path: /etc/sudoers.d/020_apache_poweroff path: /etc/sudoers.d/020_www_data_poweroff
state: absent state: absent
when: not allow_www_data_sudo when: not allow_www_data_poweroff
# 2022-06-30: internet_available var removed # 2022-06-30: internet_available var removed

View file

@ -207,4 +207,4 @@
# name: php{{ php_version }}-fpm # name: php{{ php_version }}-fpm
# state: restarted # state: restarted
# when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install # 5-STANZA BLOCK ENDS. COMPARE allow_www_data_sudo conditionals below. # when: matomo_install or moodle_install or nextcloud_install or pbx_install or wordpress_install # 5-STANZA BLOCK ENDS. COMPARE allow_www_data_poweroff conditionals below.

View file

@ -274,7 +274,7 @@ nginx_port: 80
nginx_interface: 0.0.0.0 nginx_interface: 0.0.0.0
nginx_conf_dir: /etc/nginx/conf.d nginx_conf_dir: /etc/nginx/conf.d
nginx_log_dir: /var/log/nginx nginx_log_dir: /var/log/nginx
# SEE BELOW: nginx_high_php_limits, allow_www_data_sudo # SEE BELOW: nginx_high_php_limits, allow_www_data_poweroff
# roles/www_base runs here (mandatory) # roles/www_base runs here (mandatory)
@ -341,7 +341,7 @@ nginx_high_php_limits: False
# ALSO: ADJUST "client_max_body_size 10000M;" AS NEC, IN: /etc/nginx/server.conf # ALSO: ADJUST "client_max_body_size 10000M;" AS NEC, IN: /etc/nginx/server.conf
# Make this True to enable http://box/js-menu/menu-files/services/power_off.php and set-server-time.php # Make this True to enable http://box/js-menu/menu-files/services/power_off.php and set-server-time.php
allow_www_data_sudo: True allow_www_data_poweroff: False
apache_service: apache2 apache_service: apache2
apache_user: www-data # Admin Console uses apache_user: www-data # Admin Console uses

View file

@ -172,7 +172,7 @@ pi_swap_file_size: 1024
# roles/nginx runs here (mandatory) # roles/nginx runs here (mandatory)
# roles/www_base runs here (mandatory) # roles/www_base runs here (mandatory)
# SEE BELOW: nginx_high_php_limits, allow_www_data_sudo # SEE BELOW: nginx_high_php_limits, allow_www_data_poweroff
# 4-SERVER-OPTIONS # 4-SERVER-OPTIONS
@ -219,7 +219,7 @@ nginx_high_php_limits: False
# ALSO: ADJUST "client_max_body_size 10000M;" AS NEC, IN: /etc/nginx/server.conf # ALSO: ADJUST "client_max_body_size 10000M;" AS NEC, IN: /etc/nginx/server.conf
# Make this True to enable http://box/js-menu/menu-files/services/power_off.php and set-server-time.php # Make this True to enable http://box/js-menu/menu-files/services/power_off.php and set-server-time.php
allow_www_data_sudo: True allow_www_data_poweroff: False
# Toggle iiab-refresh-wiki-docs scraping for offline docs (http://box/info) # Toggle iiab-refresh-wiki-docs scraping for offline docs (http://box/info)
nodocs: False nodocs: False

View file

@ -13,7 +13,7 @@ munin_enabled: True
vnstat_install: True vnstat_install: True
vnstat_enabled: True vnstat_enabled: True
usb_lib_umask0000_for_kolibri: False usb_lib_umask0000_for_kolibri: False
allow_www_data_sudo: True allow_www_data_poweroff: False
# By default # By default
# kiwix # kiwix
# awstats # awstats

View file

@ -172,7 +172,7 @@ pi_swap_file_size: 1024
# roles/nginx runs here (mandatory) # roles/nginx runs here (mandatory)
# roles/www_base runs here (mandatory) # roles/www_base runs here (mandatory)
# SEE BELOW: nginx_high_php_limits, allow_www_data_sudo # SEE BELOW: nginx_high_php_limits, allow_www_data_poweroff
# 4-SERVER-OPTIONS # 4-SERVER-OPTIONS
@ -219,7 +219,7 @@ nginx_high_php_limits: False
# ALSO: ADJUST "client_max_body_size 10000M;" AS NEC, IN: /etc/nginx/server.conf # ALSO: ADJUST "client_max_body_size 10000M;" AS NEC, IN: /etc/nginx/server.conf
# Make this True to enable http://box/js-menu/menu-files/services/power_off.php and set-server-time.php # Make this True to enable http://box/js-menu/menu-files/services/power_off.php and set-server-time.php
allow_www_data_sudo: True allow_www_data_poweroff: False
# Toggle iiab-refresh-wiki-docs scraping for offline docs (http://box/info) # Toggle iiab-refresh-wiki-docs scraping for offline docs (http://box/info)
nodocs: False nodocs: False

View file

@ -172,7 +172,7 @@ pi_swap_file_size: 1024
# roles/nginx runs here (mandatory) # roles/nginx runs here (mandatory)
# roles/www_base runs here (mandatory) # roles/www_base runs here (mandatory)
# SEE BELOW: nginx_high_php_limits, allow_www_data_sudo # SEE BELOW: nginx_high_php_limits, allow_www_data_poweroff
# 4-SERVER-OPTIONS # 4-SERVER-OPTIONS
@ -219,7 +219,7 @@ nginx_high_php_limits: False
# ALSO: ADJUST "client_max_body_size 10000M;" AS NEC, IN: /etc/nginx/server.conf # ALSO: ADJUST "client_max_body_size 10000M;" AS NEC, IN: /etc/nginx/server.conf
# Make this True to enable http://box/js-menu/menu-files/services/power_off.php and set-server-time.php # Make this True to enable http://box/js-menu/menu-files/services/power_off.php and set-server-time.php
allow_www_data_sudo: True allow_www_data_poweroff: False
# Toggle iiab-refresh-wiki-docs scraping for offline docs (http://box/info) # Toggle iiab-refresh-wiki-docs scraping for offline docs (http://box/info)
nodocs: False nodocs: False

View file

@ -178,7 +178,7 @@ pi_swap_file_size: 1024
# roles/nginx runs here (mandatory) # roles/nginx runs here (mandatory)
# roles/www_base runs here (mandatory) # roles/www_base runs here (mandatory)
# SEE BELOW: nginx_high_php_limits, allow_www_data_sudo # SEE BELOW: nginx_high_php_limits, allow_www_data_poweroff
# 4-SERVER-OPTIONS # 4-SERVER-OPTIONS
@ -225,7 +225,7 @@ nginx_high_php_limits: False
# ALSO: ADJUST "client_max_body_size 10000M;" AS NEC, IN: /etc/nginx/server.conf # ALSO: ADJUST "client_max_body_size 10000M;" AS NEC, IN: /etc/nginx/server.conf
# Make this True to enable http://box/js-menu/menu-files/services/power_off.php and set-server-time.php # Make this True to enable http://box/js-menu/menu-files/services/power_off.php and set-server-time.php
allow_www_data_sudo: True allow_www_data_poweroff: False
# Toggle iiab-refresh-wiki-docs scraping for offline docs (http://box/info) # Toggle iiab-refresh-wiki-docs scraping for offline docs (http://box/info)
nodocs: True nodocs: True