feat(rfcomm): add service to systemd to auto-bind on startup
This commit is contained in:
parent
08a31b0a45
commit
f43ed05f69
1 changed files with 13 additions and 0 deletions
13
system/etc/systemd/system/rfcomm.service
Normal file
13
system/etc/systemd/system/rfcomm.service
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[Unit]
|
||||||
|
Description=rfcomm service
|
||||||
|
After=bluetooth.service
|
||||||
|
Requires=bluetooth.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/rfcomm bind 0 <device>
|
||||||
|
ExecStop=/usr/bin/rfcomm release 0
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue