Add missing systemd.socket files
Also pass the new --systemd-socket-activation to the daemons.
This commit is contained in:
parent
0508465bba
commit
0013e55d71
|
@ -8,7 +8,7 @@ After=syslog.target
|
|||
[Service]
|
||||
Type=simple
|
||||
User=albatross
|
||||
ExecStart=/usr/local/sbin/albatross-console --tmpdir="%t/albatross/" -vv
|
||||
ExecStart=/usr/local/sbin/albatross-console --systemd-socket-activation --tmpdir="%t/albatross/" -vv
|
||||
RuntimeDirectoryPreserve=yes
|
||||
RuntimeDirectory=albatross
|
||||
ExecStartPre=/bin/mkdir -p %t/albatross/fifo
|
||||
|
@ -18,4 +18,5 @@ PIDFile=%t/albatross/console.pid
|
|||
RestrictAddressFamilies=AF_UNIX
|
||||
|
||||
[Install]
|
||||
Also=albatross_console.socket
|
||||
WantedBy=multi-user.target
|
||||
|
|
12
packaging/Linux/albatross_console.socket
Normal file
12
packaging/Linux/albatross_console.socket
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Albatross console socket
|
||||
PartOf=albatross_console.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=%t/albatross/util/console.sock
|
||||
SocketUser=albatross
|
||||
#SocketMode= # FIXME: permissions
|
||||
Accept=no
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
|
@ -1,6 +1,6 @@
|
|||
[Unit]
|
||||
Description=Albatross VMM daemon (albatrossd)
|
||||
Requires=albatross_console.service albatross_log.service
|
||||
Requires=albatross_console.socket albatross_log.socket
|
||||
After=syslog.target albatross_console.service albatross_log.service
|
||||
|
||||
[Service]
|
||||
|
@ -8,7 +8,7 @@ Type=simple
|
|||
# TODO not necessarily needs to be run as root, anything that can solo5-spt/hvt,
|
||||
# create tap interfaces should be fine!
|
||||
User=root
|
||||
ExecStart=/usr/local/sbin/albatrossd --tmpdir="%t/albatross/" -vv
|
||||
ExecStart=/usr/local/sbin/albatrossd --systemd-socket-activation --tmpdir="%t/albatross/" -vv
|
||||
#RuntimeDirectoryPreserve=yes
|
||||
#RuntimeDirectory=albatross
|
||||
PIDFile=%t/albatross/daemon.pid
|
||||
|
@ -27,4 +27,5 @@ IgnoreSIGPIPE=true
|
|||
#RuntimeDirectoryMode=0700
|
||||
|
||||
[Install]
|
||||
Also=albatross_daemon.socket
|
||||
WantedBy=multi-user.target
|
||||
|
|
11
packaging/Linux/albatross_daemon.socket
Normal file
11
packaging/Linux/albatross_daemon.socket
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Albatross daemon socket
|
||||
PartOf=albatross_daemon.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=%t/albatross/util/vmmd.sock
|
||||
#SocketMode= # FIXME: permissions
|
||||
Accept=no
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
|
@ -4,13 +4,13 @@
|
|||
# systemctl edit albatross_log.service
|
||||
Description=Albatross log daemon (albatross_log)
|
||||
After=syslog.target albatross_console.service
|
||||
Requires=albatross_console.service
|
||||
Requires=albatross_console.socket
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=albatross
|
||||
AssertPathExists=/var/lib/albatross/albatross.log
|
||||
ExecStart=/usr/local/sbin/albatross-log --logfile="/var/lib/albatross/albatross.log" --tmpdir="%t/albatross/" -vv
|
||||
ExecStart=/usr/local/sbin/albatross-log --systemd-socket-activation --logfile="/var/lib/albatross/albatross.log" --tmpdir="%t/albatross/" -vv
|
||||
RuntimeDirectory=albatross albatross/util
|
||||
#RuntimeDirectoryPreserve=yes # avoid albatross.log being cleaned up
|
||||
PIDFile=%t/albatross/log.pid
|
||||
|
|
|
@ -8,11 +8,12 @@ After=syslog.target
|
|||
[Service]
|
||||
Type=simple
|
||||
User=albatross
|
||||
ExecStart=/usr/local/sbin/albatross-stats --tmpdir="%t/albatross/" -vv
|
||||
ExecStart=/usr/local/sbin/albatross-stats --systemd-socket-activation --systemd-socket-activation --tmpdir="%t/albatross/" -vv
|
||||
RuntimeDirectoryPreserve=yes
|
||||
RuntimeDirectory=albatross albatross/util
|
||||
PIDFile=%t/albatross/stat.pid
|
||||
RestrictAddressFamilies=AF_UNIX
|
||||
|
||||
[Install]
|
||||
Also=albatross_stat.socket
|
||||
WantedBy=multi-user.target
|
||||
|
|
12
packaging/Linux/albatross_stat.socket
Normal file
12
packaging/Linux/albatross_stat.socket
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Albatross stats socket
|
||||
PartOf=albatross_stat.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=%t/albatross/util/stat.sock
|
||||
SocketUser=albatross
|
||||
#SocketMode= # FIXME: permissions
|
||||
Accept=no
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
Loading…
Reference in a new issue