refactor: remove lighttpd from the list of conflicting services
lighttpd is "just" a webserver and no reverse proxy. it should technically not interfere with nginx anyways. Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
@@ -27,7 +27,7 @@ function install_fluidd() {
|
|||||||
dependency_check "${dep[@]}"
|
dependency_check "${dep[@]}"
|
||||||
### check if moonraker is already installed
|
### check if moonraker is already installed
|
||||||
system_check_webui
|
system_check_webui
|
||||||
### ask user how to handle Haproxy, Lighttpd, Apache2 if found
|
### ask user how to handle Haproxy, Apache2 if found
|
||||||
process_services_dialog
|
process_services_dialog
|
||||||
### process possible disruptive services
|
### process possible disruptive services
|
||||||
process_disruptive_services
|
process_disruptive_services
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ function install_mainsail() {
|
|||||||
dependency_check "${dep[@]}"
|
dependency_check "${dep[@]}"
|
||||||
### check if moonraker is already installed
|
### check if moonraker is already installed
|
||||||
system_check_webui
|
system_check_webui
|
||||||
### ask user how to handle Haproxy, Lighttpd, Apache2 if found
|
### ask user how to handle Haproxy, Apache2 if found
|
||||||
process_services_dialog
|
process_services_dialog
|
||||||
### process possible disruptive services
|
### process possible disruptive services
|
||||||
process_disruptive_services
|
process_disruptive_services
|
||||||
|
|||||||
@@ -171,26 +171,6 @@ function process_disruptive_services() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### handle lighttpd service
|
|
||||||
if [[ ${DISABLE_LIGHTTPD} == "true" || ${REMOVE_LIGHTTPD} == "true" ]]; then
|
|
||||||
if systemctl is-active lighttpd -q; then
|
|
||||||
status_msg "Stopping lighttpd service ..."
|
|
||||||
sudo systemctl stop lighttpd && ok_msg "Service stopped!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
### disable lighttpd
|
|
||||||
if [[ ${DISABLE_LIGHTTPD} == "true" ]]; then
|
|
||||||
status_msg "Disabling lighttpd ..."
|
|
||||||
sudo systemctl disable lighttpd && ok_msg "Lighttpd service disabled!"
|
|
||||||
|
|
||||||
### remove lighttpd
|
|
||||||
if [[ ${REMOVE_LIGHTTPD} == "true" ]]; then
|
|
||||||
status_msg "Removing lighttpd ..."
|
|
||||||
sudo apt-get remove lighttpd -y && sudo update-rc.d -f lighttpd remove && ok_msg "Lighttpd removed!"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
### handle apache2 service
|
### handle apache2 service
|
||||||
if [[ ${DISABLE_APACHE2} == "true" || ${REMOVE_APACHE2} == "true" ]]; then
|
if [[ ${DISABLE_APACHE2} == "true" || ${REMOVE_APACHE2} == "true" ]]; then
|
||||||
if systemctl is-active apache2 -q; then
|
if systemctl is-active apache2 -q; then
|
||||||
@@ -198,12 +178,12 @@ function process_disruptive_services() {
|
|||||||
sudo systemctl stop apache2 && ok_msg "Service stopped!"
|
sudo systemctl stop apache2 && ok_msg "Service stopped!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### disable lighttpd
|
### disable apache2
|
||||||
if [[ ${DISABLE_APACHE2} == "true" ]]; then
|
if [[ ${DISABLE_APACHE2} == "true" ]]; then
|
||||||
status_msg "Disabling lighttpd ..."
|
status_msg "Disabling apache2 service ..."
|
||||||
sudo systemctl disable apache2 && ok_msg "Apache2 service disabled!"
|
sudo systemctl disable apache2 && ok_msg "Apache2 service disabled!"
|
||||||
|
|
||||||
### remove lighttpd
|
### remove apache2
|
||||||
if [[ ${REMOVE_APACHE2} == "true" ]]; then
|
if [[ ${REMOVE_APACHE2} == "true" ]]; then
|
||||||
status_msg "Removing apache2 ..."
|
status_msg "Removing apache2 ..."
|
||||||
sudo apt-get remove apache2 -y && sudo update-rc.d -f apache2 remove && ok_msg "Apache2 removed!"
|
sudo apt-get remove apache2 -y && sudo update-rc.d -f apache2 remove && ok_msg "Apache2 removed!"
|
||||||
@@ -213,8 +193,8 @@ function process_disruptive_services() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function process_services_dialog() {
|
function process_services_dialog() {
|
||||||
#notify user about haproxy or lighttpd services found and possible issues
|
#notify user about haproxy or apache2 services found and possible issues
|
||||||
if [[ ${HAPROXY_FOUND} == "true" || ${LIGHTTPD_FOUND} == "true" || ${APACHE2_FOUND} == "true" ]]; then
|
if [[ ${HAPROXY_FOUND} == "true" || ${APACHE2_FOUND} == "true" ]]; then
|
||||||
while true; do
|
while true; do
|
||||||
echo
|
echo
|
||||||
top_border
|
top_border
|
||||||
@@ -223,9 +203,6 @@ function process_services_dialog() {
|
|||||||
if [[ ${HAPROXY_FOUND} == "true" ]]; then
|
if [[ ${HAPROXY_FOUND} == "true" ]]; then
|
||||||
echo -e "| ● haproxy |"
|
echo -e "| ● haproxy |"
|
||||||
fi
|
fi
|
||||||
if [[ ${LIGHTTPD_FOUND} == "true" ]]; then
|
|
||||||
echo -e "| ● lighttpd |"
|
|
||||||
fi
|
|
||||||
if [[ ${APACHE2_FOUND} == "true" ]]; then
|
if [[ ${APACHE2_FOUND} == "true" ]]; then
|
||||||
echo -e "| ● apache2 |"
|
echo -e "| ● apache2 |"
|
||||||
fi
|
fi
|
||||||
@@ -244,13 +221,11 @@ function process_services_dialog() {
|
|||||||
1)
|
1)
|
||||||
echo -e "###### > Remove packages"
|
echo -e "###### > Remove packages"
|
||||||
REMOVE_HAPROXY="true"
|
REMOVE_HAPROXY="true"
|
||||||
REMOVE_LIGHTTPD="true"
|
|
||||||
REMOVE_APACHE2="true"
|
REMOVE_APACHE2="true"
|
||||||
break;;
|
break;;
|
||||||
2)
|
2)
|
||||||
echo -e "###### > Disable only"
|
echo -e "###### > Disable only"
|
||||||
DISABLE_HAPROXY="true"
|
DISABLE_HAPROXY="true"
|
||||||
DISABLE_LIGHTTPD="true"
|
|
||||||
DISABLE_APACHE2="true"
|
DISABLE_APACHE2="true"
|
||||||
break;;
|
break;;
|
||||||
3)
|
3)
|
||||||
|
|||||||
@@ -452,10 +452,6 @@ function system_check_webui() {
|
|||||||
[[ $(dpkg-query -f'${Status}' --show haproxy 2>/dev/null) = *\ installed ]] && \
|
[[ $(dpkg-query -f'${Status}' --show haproxy 2>/dev/null) = *\ installed ]] && \
|
||||||
HAPROXY_FOUND="true"
|
HAPROXY_FOUND="true"
|
||||||
|
|
||||||
### check system for an installed lighttpd service
|
|
||||||
[[ $(dpkg-query -f'${Status}' --show lighttpd 2>/dev/null) = *\ installed ]] && \
|
|
||||||
LIGHTTPD_FOUND="true"
|
|
||||||
|
|
||||||
### check system for an installed apache2 service
|
### check system for an installed apache2 service
|
||||||
[[ $(dpkg-query -f'${Status}' --show apache2 2>/dev/null) = *\ installed ]] && \
|
[[ $(dpkg-query -f'${Status}' --show apache2 2>/dev/null) = *\ installed ]] && \
|
||||||
APACHE2_FOUND="true"
|
APACHE2_FOUND="true"
|
||||||
|
|||||||
Reference in New Issue
Block a user