aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-06-14 15:19:06 +0200
committerMax <msuraev@sysmocom.de>2017-06-22 10:50:00 +0000
commit114293a414bd5b7c86622ec8c293c4034c80d243 (patch)
tree8dbe5840ffeca75fb3aed2c0a3d2162ed3f6f7d8 /contrib
parentd4806db1e59a9e205e323a3fe5aa8a39379ee13d (diff)
Copy sysmobts.service to osmo-bts-sysmo
This way the name of systemd service file will match the name of the binary similar to lc15. Add aliases so the user can use both old and new names regardless of which file is installed. Once the corresponding changes to OE recipes are applied old file can be removed. Based on work by Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I08615eb625d488603aeb5962ad9f30869c0e77c5
Diffstat (limited to 'contrib')
-rw-r--r--contrib/osmo-bts-sysmo.service20
-rw-r--r--contrib/sysmobts.service1
2 files changed, 21 insertions, 0 deletions
diff --git a/contrib/osmo-bts-sysmo.service b/contrib/osmo-bts-sysmo.service
new file mode 100644
index 00000000..bbb2beff
--- /dev/null
+++ b/contrib/osmo-bts-sysmo.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=sysmocom sysmoBTS
+
+[Service]
+Type=simple
+ExecStartPre=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
+ExecStart=/usr/bin/osmo-bts-sysmo -s -c /etc/osmocom/osmo-bts.cfg -M
+ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
+ExecStopPost=/bin/sh -c 'cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 ; sleep 3s; cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0; sleep 1s'
+Restart=always
+RestartSec=2
+RestartPreventExitStatus=1
+
+# The msg queues must be read fast enough
+CPUSchedulingPolicy=rr
+CPUSchedulingPriority=1
+
+[Install]
+WantedBy=multi-user.target
+Alias=sysmobts.service
diff --git a/contrib/sysmobts.service b/contrib/sysmobts.service
index e07a3db8..64e01271 100644
--- a/contrib/sysmobts.service
+++ b/contrib/sysmobts.service
@@ -17,3 +17,4 @@ CPUSchedulingPriority=1
[Install]
WantedBy=multi-user.target
+Alias=osmo-bts-sysmo.service