I've been working on obtaining two way communications with the /exec
URI, but your needs may more simple then mine.
When you POST to /exec, you probably want to include the 'record-output'
key with a (boolean) value of true. ie
'{"command": ["df -f /"], "record-output": true}'
The doc's stat
Hello.
Is there a solution to get the return of a command launch by lxd exec API ?
curl -s --unix-socket /var/lib/lxd/unix.socket
a/1.0/containers/$CONTAINER/exec -X POST -d '{"command": ["df -f /"]}' | jq
.
I would like to see something like this in return of the command.
output: /dev/sda5
Just recently I had similar requirement of making sure NFS is up before
starting an LXC container. After some unsuccessful experiments with
lxc.hook.pre-start etc I settled upon a systemd solution. If your system
happen to use systemd, then e.g. for a container user1 create file
/etc/systemd/un