Skip to content

Commit 4a0f170

Browse files
committed
Change: Update gvmd socket location to /run/gvmd/gvmd.sock
With our current supported releases the gvmd socket is located at /run/gvmd/gvmd.sock.
1 parent 6287140 commit 4a0f170

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

docs/usage.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ The following shows the process of a simple request in more detail.
5454
2. Specify the path to the Unix domain socket in the file system:
5555

5656
.. note:: If **gvmd** is provided by a package of the distribution, it should
57-
be ``/var/run/gvmd.sock``. If **gvmd** was built from source and did not set
57+
be ``/run/gvmd/gvmd.sock``. If **gvmd** was built from source and did not set
5858
a prefix, the default path can be used by setting ``path = None``.
5959

6060
.. code-block:: python
6161
62-
path = '/var/run/gvmd.sock'
62+
path = '/run/gvmd/gvmd.sock'
6363
6464
3. Create a connection and a gmp object:
6565

@@ -89,7 +89,7 @@ Full Example
8989
from gvm.protocols.gmp import Gmp
9090
9191
# path to unix socket
92-
path = '/var/run/gvmd.sock'
92+
path = '/run/gvmd/gvmd.sock'
9393
connection = UnixSocketConnection(path=path)
9494
9595
# using the with statement to automatically connect and disconnect to gvmd
@@ -126,7 +126,7 @@ Step by Step
126126

127127
.. code-block:: python
128128
129-
path = '/var/run/gvmd.sock'
129+
path = '/run/gvmd/gvmd.sock'
130130
connection = UnixSocketConnection(path=path)
131131
132132
3. In this case, an `Etree Element`_ should be obtained from the response to be able to
@@ -192,7 +192,7 @@ Full Example
192192
from gvm.protocols.gmp import Gmp
193193
from gvm.transforms import EtreeCheckCommandTransform
194194
195-
path = '/var/run/gvmd.sock'
195+
path = '/run/gvmd/gvmd.sock'
196196
connection = UnixSocketConnection(path=path)
197197
transform = EtreeCheckCommandTransform()
198198
@@ -336,7 +336,7 @@ Example using GMP:
336336
from gvm.connections import UnixSocketConnection, DebugConnection
337337
from gvm.protocols.gmp import Gmp
338338
339-
path = '/var/run/gvmd.sock'
339+
path = '/run/gvmd/gvmd.sock'
340340
socketconnection = UnixSocketConnection(path=path)
341341
connection = DebugConnection(socketconnection)
342342

gvm/connections.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
DEFAULT_READ_TIMEOUT = 60 # in seconds
4141
DEFAULT_TIMEOUT = 60 # in seconds
4242
DEFAULT_GVM_PORT = 9390
43-
DEFAULT_UNIX_SOCKET_PATH = "/var/run/gvmd.sock"
43+
DEFAULT_UNIX_SOCKET_PATH = "/run/gvmd/gvmd.sock"
4444
DEFAULT_SSH_PORT = 22
4545
DEFAULT_SSH_USERNAME = "gmp"
4646
DEFAULT_SSH_PASSWORD = ""
@@ -475,11 +475,11 @@ def disconnect(self):
475475

476476
class UnixSocketConnection(GvmConnection):
477477
"""
478-
UNIX-Socket class to connect, read, write from a GVM server daemon via
479-
direct communicating UNIX-Socket
478+
UNIX-Socket class to connect, read, write from a daemon via direct
479+
communicating UNIX-Socket
480480
481481
Arguments:
482-
path: Path to the socket. Default is "/var/run/gvmd.sock".
482+
path: Path to the socket. Default is "/run/gvmd/gvmd.sock".
483483
timeout: Timeout in seconds for the connection. Default is 60 seconds.
484484
"""
485485

0 commit comments

Comments
 (0)