Created
February 21, 2022 20:53
-
-
Save bjoern-r/dba224479622bb49430c75286f9e363a to your computer and use it in GitHub Desktop.
Simple script to start/stop/restart open5gs 5G SA services using systemd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#### amf.yaml ausf.yaml nrf.yaml nssf.yaml pcf.yaml smf.yaml udm.yaml udr.yaml upf.yaml | |
NFLIST={amf,susf,nrf,nssf,pcf,smf,udm,udr,upf} | |
dostart() { | |
for nf in $NFLIST; do | |
echo systemctl start open5gs-${nf}d | |
done | |
} | |
dostop() { | |
for nf in $NFLIST; do | |
echo systemctl stop open5gs-${nf}d | |
done | |
} | |
dorestart() { | |
for nf in $NFLIST; do | |
echo systemctl restart open5gs-${nf}d | |
done | |
} | |
case $(basename $0) in | |
start.sh) dostart ;; | |
stop.sh) dostop ;; | |
restart.sh) dorestart ;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment