Unverified Commit 5b3f2aa6 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Adust leftovers

parent 4d8a90d2
......@@ -955,8 +955,18 @@ function jobs ()
--yes-label "Stop" --no-label "Cancel" --yesno "\nDo you want to stop and disable this service?" 7 50
exitstatus=$?;
if [[ $exitstatus = 0 ]]; then
service lightdm stop >/dev/null 2>&1 && systemctl disable lightdm.service >/dev/null 2>&1
service nodm stop >/dev/null 2>&1 && systemctl disable nodm.service >/dev/null 2>&1
function stop_display()
{
bash -c "service lightdm stop >/dev/null 2>&1
systemctl disable lightdm.service >/dev/null 2>&1
service nodm stop >/dev/null 2>&1
systemctl disable nodm.service >/dev/null 2>&1"
}
if xhost >& /dev/null ; then
stop_display &
else
stop_display
fi
fi
else
if ! is_package_manager_running; then
......@@ -982,6 +992,8 @@ function jobs ()
ln -s /lib/systemd/system/lightdm.service /etc/systemd/system/display-manager.service >/dev/null 2>&1
service lightdm start >/dev/null 2>&1
fi
# kill this bash script after desktop is up and if executed on console
[[ $(tty | sed -e "s:/dev/::") == tty* ]] && kill -9 $$
fi
fi
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment