add systemd service-unit-files
This commit is contained in:
parent
79ae6b5bf9
commit
5615e09b56
2 changed files with 31 additions and 0 deletions
5
src/etc/systemd/system/multiplexer.target
Normal file
5
src/etc/systemd/system/multiplexer.target
Normal file
|
@ -0,0 +1,5 @@
|
|||
[Unit]
|
||||
Description=Multiplexer target for screen and tmux-server
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
26
src/etc/systemd/system/tmux@.service
Normal file
26
src/etc/systemd/system/tmux@.service
Normal file
|
@ -0,0 +1,26 @@
|
|||
[Unit]
|
||||
Description=tmux default session (detached) for user %i
|
||||
Documentation=man:tmux(1)
|
||||
BindsTo=multiplexer.target
|
||||
After=sssd.service
|
||||
|
||||
[Service]
|
||||
#Type=simple
|
||||
Type=forking
|
||||
User=%i
|
||||
WorkingDirectory=/home/%i
|
||||
ExecStartPre=-/usr/bin/xdg-user-dirs-update
|
||||
#RemainAfterExit=yes
|
||||
# On older tmux-versions session-names with dot in name are not allwed, so replace "-s %I" with "-s User"
|
||||
ExecStart=/usr/bin/tmux new-session -d -s User
|
||||
#ExecStart=/usr/bin/tmux new-session
|
||||
ExecStop=-/usr/bin/tmux kill-server
|
||||
KillMode=mixed
|
||||
#Restart=on-success
|
||||
Restart=always
|
||||
RestartSec=3s
|
||||
GuessMainPID=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multiplexer.target
|
||||
|
Loading…
Reference in a new issue