units: Add special Desktop Environment user related units

This adds app.slice, session.slice and background.slice.
This commit is contained in:
Benjamin Berg 2020-07-28 19:10:31 +02:00
parent 943142a97d
commit a3081a7a89
5 changed files with 43 additions and 0 deletions

12
units/user/app.slice Normal file
View File

@ -0,0 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=User Application Slice
Documentation=man:systemd.special(7)

View File

@ -0,0 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=User Background Tasks Slice
Documentation=man:systemd.special(7)

View File

@ -1,6 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1+
units = [
'app.slice',
'background.slice',
'basic.target',
'bluetooth.target',
'default.target',
@ -9,6 +11,7 @@ units = [
'graphical-session.target',
'paths.target',
'printer.target',
'session.slice',
'shutdown.target',
'smartcard.target',
'sockets.target',

12
units/user/session.slice Normal file
View File

@ -0,0 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=User Core Session Slice
Documentation=man:systemd.special(7)

View File

@ -14,3 +14,7 @@ DefaultDependencies=no
Requires=shutdown.target
After=shutdown.target
SuccessAction=exit-force
[Service]
# Place into the root slice to not keep another slice unit alive
Slice=-.slice