Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
5b3f2aa6
Unverified
Commit
5b3f2aa6
authored
Jul 11, 2019
by
Igor Pecovnik
Browse files
Adust leftovers
parent
4d8a90d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
5b3f2aa6
...
...
@@ -955,8 +955,18 @@ function jobs ()
--yes-label
"Stop"
--no-label
"Cancel"
--yesno
"
\n
Do 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment