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]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=albatross
|
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
|
RuntimeDirectoryPreserve=yes
|
||||||
RuntimeDirectory=albatross
|
RuntimeDirectory=albatross
|
||||||
ExecStartPre=/bin/mkdir -p %t/albatross/fifo
|
ExecStartPre=/bin/mkdir -p %t/albatross/fifo
|
||||||
|
@ -18,4 +18,5 @@ PIDFile=%t/albatross/console.pid
|
||||||
RestrictAddressFamilies=AF_UNIX
|
RestrictAddressFamilies=AF_UNIX
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Also=albatross_console.socket
|
||||||
WantedBy=multi-user.target
|
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]
|
[Unit]
|
||||||
Description=Albatross VMM daemon (albatrossd)
|
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
|
After=syslog.target albatross_console.service albatross_log.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
@ -8,7 +8,7 @@ Type=simple
|
||||||
# TODO not necessarily needs to be run as root, anything that can solo5-spt/hvt,
|
# TODO not necessarily needs to be run as root, anything that can solo5-spt/hvt,
|
||||||
# create tap interfaces should be fine!
|
# create tap interfaces should be fine!
|
||||||
User=root
|
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
|
#RuntimeDirectoryPreserve=yes
|
||||||
#RuntimeDirectory=albatross
|
#RuntimeDirectory=albatross
|
||||||
PIDFile=%t/albatross/daemon.pid
|
PIDFile=%t/albatross/daemon.pid
|
||||||
|
@ -27,4 +27,5 @@ IgnoreSIGPIPE=true
|
||||||
#RuntimeDirectoryMode=0700
|
#RuntimeDirectoryMode=0700
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Also=albatross_daemon.socket
|
||||||
WantedBy=multi-user.target
|
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
|
# systemctl edit albatross_log.service
|
||||||
Description=Albatross log daemon (albatross_log)
|
Description=Albatross log daemon (albatross_log)
|
||||||
After=syslog.target albatross_console.service
|
After=syslog.target albatross_console.service
|
||||||
Requires=albatross_console.service
|
Requires=albatross_console.socket
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=albatross
|
User=albatross
|
||||||
AssertPathExists=/var/lib/albatross/albatross.log
|
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
|
RuntimeDirectory=albatross albatross/util
|
||||||
#RuntimeDirectoryPreserve=yes # avoid albatross.log being cleaned up
|
#RuntimeDirectoryPreserve=yes # avoid albatross.log being cleaned up
|
||||||
PIDFile=%t/albatross/log.pid
|
PIDFile=%t/albatross/log.pid
|
||||||
|
|
|
@ -8,11 +8,12 @@ After=syslog.target
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=albatross
|
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
|
RuntimeDirectoryPreserve=yes
|
||||||
RuntimeDirectory=albatross albatross/util
|
RuntimeDirectory=albatross albatross/util
|
||||||
PIDFile=%t/albatross/stat.pid
|
PIDFile=%t/albatross/stat.pid
|
||||||
RestrictAddressFamilies=AF_UNIX
|
RestrictAddressFamilies=AF_UNIX
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Also=albatross_stat.socket
|
||||||
WantedBy=multi-user.target
|
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