doc: set state-dir to /var/lib/osmocom/osmo-ggsn

Prepare to run osmo-ggsn as user with the systemd service. As with other
Osmocom service files, we will set StateDirectory= and WorkingDirectory=
options. This results in osmo-ggsn only being able to write to
/var/lib/osmocom, therefore let's change the state-dir from /tmp to
/var/lib/osmocom/osmo-ggsn to avoid:

  gsn.c:411 fopen(path=/tmp/gsn_restart, mode=w) failed: Error = Permission denied

Having the state in /var/lib/osmocom also makes more sense, because then
it doesn't get deleted on reboot.

Change-Id: I5b51529b4f8bd2462e54f58a1ce2e2d7c76ff46a
This commit is contained in:
Oliver Smith
2024-05-16 09:25:02 +02:00
committed by osmith
parent c1598e0eb4
commit fbc56063c5
3 changed files with 4 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ line vty
no login
!
ggsn ggsn0
gtp state-dir /tmp
gtp state-dir /var/lib/osmocom/osmo-ggsn
gtp bind-ip 127.0.0.2
apn internet
gtpu-mode kernel-gtp

View File

@@ -36,7 +36,7 @@ line vty
no login
!
ggsn ggsn0
gtp state-dir /tmp
gtp state-dir /var/lib/osmocom/osmo-ggsn
gtp bind-ip 127.0.0.2
apn internet
gtpu-mode tun

View File

@@ -16,7 +16,7 @@ your configuration file, like in below example:
.Example: Single GGSN configuration section
----
ggsn ggsn0
gtp state-dir /tmp
gtp state-dir /var/lib/osmocom/osmo-ggsn
gtp bind-ip 127.0.0.6
apn internet
gtpu-mode tun
@@ -58,7 +58,7 @@ The following two mandatory configuration statements have to be given
for every GGSN instance:
----
OsmoGGSN(config-ggsn)# gtp state-dir /var/lib/ggsn/ggsn0 <1>
OsmoGGSN(config-ggsn)# gtp state-dir /var/lib/osmocom/osmo-ggsn <1>
OsmoGGSN(config-ggsn)# gtp bind-ip 127.0.0.6 <2>
----
<1> Store the GSN restart state in the specified directory