feat: KIAUH v4.0.0 #191

Merged
dw-0 merged 453 commits from v4-rc into master 2022-05-29 20:11:16 +02:00
3 changed files with 18 additions and 0 deletions
Showing only changes of commit 544c26c01e - Show all commits

View File

@@ -77,6 +77,8 @@ function install_fluidd() {
set_upstream_nginx_cfg
### create /etc/nginx/sites-available/<interface config>
set_nginx_cfg "fluidd"
### nginx on ubuntu 21 and above needs special permissions to access the files
set_nginx_permissions
### symlink nginx log
symlink_webui_nginx_log "fluidd"

View File

@@ -77,6 +77,8 @@ function install_mainsail() {
set_upstream_nginx_cfg
### create /etc/nginx/sites-available/<interface config>
set_nginx_cfg "mainsail"
### nginx on ubuntu 21 and above needs special permissions to access the files
set_nginx_permissions
### symlink nginx log
symlink_webui_nginx_log "mainsail"

View File

@@ -284,6 +284,20 @@ function set_nginx_cfg() {
fi
}
function set_nginx_permissions() {
local distro_name version_id
distro_name=$(grep -E "^NAME=" /etc/os-release | cut -d'"' -f2)
version_id=$(grep -E "^VERSION_ID=" /etc/os-release | cut -d'"' -f2)
if [[ ${distro_name} == "Ubuntu" && ( ${version_id} == "21.10" || ${version_id} == "22.04") ]]; then
5ilver commented 2022-06-02 20:16:34 +02:00 (Migrated from github.com)
Review

This will require attention again in October when 22.10 comes out. Unless this change is harmful on 21.04 it may be better to just remove the version check altogether.

Perhaps the script could simply check if the nginx user has sufficient permission and run chmod if it does not? Unsure if things like selinux or other sandboxing may come into play here.

This will require attention again in October when 22.10 comes out. Unless this change is harmful on 21.04 it may be better to just remove the version check altogether. Perhaps the script could simply check if the nginx user has sufficient permission and run chmod if it does not? Unsure if things like selinux or other sandboxing may come into play here.
dw-0 commented 2022-06-02 20:25:15 +02:00 (Migrated from github.com)
Review

Fair point. Maybe not a bad idea indeed. Or at least something like checking if distro_name == "Ubuntu" and if that is the case i then check for the required permissions. Another way would be to check for major version greater than 20. Because up until Ubuntu 20, no permission changes are required.

Fair point. Maybe not a bad idea indeed. Or at least something like checking if `distro_name == "Ubuntu"` and if that is the case i then check for the required permissions. Another way would be to check for major version greater than `20`. Because up until Ubuntu 20, no permission changes are required.
status_msg "Granting NGINX the required permissions ..."
chmod og+x "${HOME}" && ok_msg "Done!"
fi
return
}
function read_listen_port() {
local port interface=${1}
port=$(grep listen "/etc/nginx/sites-enabled/${interface}" | head -1 | sed 's/^\s*//' | cut -d" " -f2 | cut -d";" -f1)