mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 11:04:29 +05:00
chore: use ls within remove_nginx method
This commit is contained in:
@@ -364,12 +364,10 @@ remove_octoprint(){
|
|||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
remove_nginx(){
|
remove_nginx(){
|
||||||
if [[ $(dpkg-query -f'${Status}' --show nginx 2>/dev/null) = *\ installed ]] ; then
|
if ls /lib/systemd/system/nginx.service 2>/dev/null 1>&2; then
|
||||||
if systemctl is-active nginx -q; then
|
|
||||||
status_msg "Stopping Nginx service ..."
|
status_msg "Stopping Nginx service ..."
|
||||||
sudo service nginx stop && sudo systemctl disable nginx
|
sudo systemctl stop nginx && sudo systemctl disable nginx
|
||||||
ok_msg "Service stopped!"
|
ok_msg "Service stopped and disabled!"
|
||||||
fi
|
|
||||||
status_msg "Purging Nginx from system ..."
|
status_msg "Purging Nginx from system ..."
|
||||||
sudo apt-get purge nginx nginx-common -y
|
sudo apt-get purge nginx nginx-common -y
|
||||||
sudo update-rc.d -f nginx remove
|
sudo update-rc.d -f nginx remove
|
||||||
|
|||||||
Reference in New Issue
Block a user