aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-09-20 15:24:50 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-09-20 15:24:50 +0200
commit4d197c96d8ad80f1ea72be170ebcd233e6ba7c38 (patch)
treeae9ac27f453790c65067e4785a11b09a078633ce /contrib
parentd127ddbfcc2ada125cd36bfad3245954f8940f4d (diff)
systemd: Add a service for the sysmobts
Migrate the LED and firmware reloading into a systemd service. This makes the respawn and screen obsolete as it will be done with systemd and the journal script.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/sysmobts.service11
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/sysmobts.service b/contrib/sysmobts.service
new file mode 100644
index 00000000..88081416
--- /dev/null
+++ b/contrib/sysmobts.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=sysmocom sysmoBTS
+
+[Service]
+Type=simple
+ExecStartPre=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
+ExecStartPre=/bin/sh -c 'cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0'
+ExecStart=/usr/bin/sysmobts -s -c /etc/osmocom/osmo-bts.cfg
+ExecStartPost=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
+Restart=always
+RestartSec=2