systemd registration

This commit is contained in:
Brandon Lee
2023-08-09 14:35:13 -06:00
parent 357341cdbb
commit 0f763eb376
19 changed files with 322 additions and 18 deletions

View File

@@ -0,0 +1,3 @@
[NetDev]
Name=upftun0
Kind=tun

View File

@@ -0,0 +1,12 @@
[Match]
Name=upftun0
[Network]
ConfigureWithoutCarrier=yes
Address=10.45.0.1/16
Address=2001:db8:cafe::1/48
[Link]
RequiredForOnline=no
MTUBytes=1400
RequiredForOnline=false

View File

@@ -16,22 +16,22 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
systemd_conf_in = '''
open5gs-mmed.service
open5gs-sgwcd.service
open5gs-smfd.service
open5gs-amfd.service
open5gs-sgwud.service
open5gs-upfd.service
open5gs-hssd.service
open5gs-pcrfd.service
open5gs-nrfd.service
open5gs-scpd.service
open5gs-ausfd.service
open5gs-udmd.service
open5gs-pcfd.service
open5gs-nssfd.service
open5gs-bsfd.service
open5gs-udrd.service
nextepc-mmed.service
nextepc-sgwcd.service
nextepc-smfd.service
nextepc-amfd.service
nextepc-sgwud.service
nextepc-upfd.service
nextepc-hssd.service
nextepc-pcrfd.service
nextepc-nrfd.service
nextepc-scpd.service
nextepc-ausfd.service
nextepc-udmd.service
nextepc-pcfd.service
nextepc-nssfd.service
nextepc-bsfd.service
nextepc-udrd.service
'''.split()
foreach file : systemd_conf_in
@@ -42,8 +42,8 @@ foreach file : systemd_conf_in
endforeach
systemd_conf = '''
99-open5gs.netdev
99-open5gs.network
99-nextepc.netdev
99-nextepc.network
'''.split()
foreach file : systemd_conf

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC AMF Daemon
After=network-online.target
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-amfd -c @sysconfdir@/nextepc/amf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC AUSF Daemon
After=network-online.target
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-ausfd -c @sysconfdir@/nextepc/ausf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC BSF Daemon
Wants=mongodb.service mongod.service
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-bsfd -c @sysconfdir@/nextepc/bsf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC HSS Daemon
Wants=mongodb.service mongod.service
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-hssd -c @sysconfdir@/nextepc/hss.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC MME Daemon
After=network-online.target
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-mmed -c @sysconfdir@/nextepc/mme.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC NRF Daemon
Wants=mongodb.service mongod.service
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-nrfd -c @sysconfdir@/nextepc/nrf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC NSSF Daemon
After=network-online.target
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-nssfd -c @sysconfdir@/nextepc/nssf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC PCF Daemon
Wants=mongodb.service mongod.service
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-pcfd -c @sysconfdir@/nextepc/pcf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC PCRF Daemon
Wants=mongodb.service mongod.service
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-pcrfd -c @sysconfdir@/nextepc/pcrf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC NRF Daemon
Wants=mongodb.service mongod.service
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-scpd -c @sysconfdir@/nextepc/scp.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC SGW-C Daemon
After=network-online.target
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-sgwcd -c @sysconfdir@/nextepc/sgwc.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC SGW-U Daemon
After=network-online.target
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-sgwud -c @sysconfdir@/nextepc/sgwu.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC SMF Daemon
After=network-online.target
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-smfd -c @sysconfdir@/nextepc/smf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC UDM Daemon
After=network-online.target
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-udmd -c @sysconfdir@/nextepc/udm.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,18 @@
[Unit]
Description=NextEPC UDR Daemon
Wants=mongodb.service mongod.service
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-udrd -c @sysconfdir@/nextepc/udr.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,19 @@
[Unit]
Description=NextEPC UPF Daemon
After=network-online.target systemd-networkd.service
Wants=systemd-networkd.service
[Service]
Type=simple
User=nextepc
Group=nextepc
Restart=always
ExecStart=@bindir@/nextepc-upfd -c @sysconfdir@/nextepc/upf.yaml
RestartSec=2
RestartPreventExitStatus=1
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target