Skip to content

Commit 64625ac

Browse files
committed
fix log directory and status init.d command, added patch for reset_pkt_fwd.sh
1 parent 637703b commit 64625ac

File tree

5 files changed

+24
-10
lines changed

5 files changed

+24
-10
lines changed

lora-gateway-bridge/APKBUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Maintainer: Sebastian Yesid Tabares Amaya <[email protected]>
33
pkgname=lora-gateway-bridge
44
pkgver=2.2.0
5-
pkgrel=0
5+
pkgrel=1
66
pkgdesc="LoRa Gateway Bridge abstracts the packet_forwarder protocol into JSON over MQTT"
77
url="https://docs.loraserver.io/lora-gateway-bridge/overview/"
88
arch="armhf"
@@ -36,5 +36,5 @@ package() {
3636
}
3737

3838
sha512sums="996647ba71bb026444fbae198aef19637d306f6a6662e60fdb69fa4add0edd7b0baecd1153b5f6a7b22ec1eae0bb18c775159019632c96a4036b9f0aa755122d lora_gateway_bridge_2.2.0_linux_arm.tar.gz
39-
4038538ce8faa4007f9675bd77870ea99283164e07c0bf46e54908e2a4a256a7ecf69dd848958c3ffb278e3462bcc6b355a360ec968cb8a20f5bfc92e17960b4 lora-gateway-bridge.initd
39+
7407336da3ce8e9f0a81e79fe827e0715e1671ecbc579655f8cad3441521eb6d226dc8080c99fa5775162440c5c5ce034c5b65e8c48b7d4ccd5f85fe6cd0a4bb lora-gateway-bridge.initd
4040
07b14e2d5ea2860d0fe10af3554d1ce5a50ccc913d07a06290df46d8b28b663411dee4ee7375afbe473f99ac0e61393996af7ec9dd4cdf92e5f2013d24c81f6b lora-gateway-bridge.confd"

lora-gateway-bridge/lora-gateway-bridge.initd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ start() {
2323
start-stop-daemon --background --start \
2424
--exec $command \
2525
--make-pidfile --pidfile $pidfile \
26-
-1 /var/log/lora/$pkg.log \
27-
-2 /var/log/lora/$pkg.errors
26+
-1 /var/log/$pkg.log \
27+
-2 /var/log/$pkg.errors
2828
eend $?
2929
}
3030

@@ -45,15 +45,15 @@ restart() {
4545
start-stop-daemon --background --start \
4646
--exec $command \
4747
--make-pidfile --pidfile $pidfile \
48-
-1 /var/log/lora/$pkg.log \
49-
-2 /var/log/lora/$pkg.errors
48+
-1 /var/log/$pkg.log \
49+
-2 /var/log/$pkg.errors
5050
eend $?
5151
}
5252

5353
status() {
5454
ebegin "Status for $desc:"
5555
if [ -f $pidfile ]; then
56-
ps -ef $(cat $pidfile)
56+
ps -efq $(cat $pidfile)
5757
RETVAL=$?
5858
else
5959
echo "$name is not running"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- reset_pkt_fwd.sh
2+
+++ reset_pkt_fwd2.sh
3+
@@ -36,7 +36,7 @@
4+
echo "0" > /sys/class/gpio/gpio$IOT_SK_SX1301_RESET_PIN/value; WAIT_GPIO
5+
6+
# set GPIO 7 as input
7+
- echo "in" > /sys/class/gpio/gpio$IOT_SK_SX1301_RESET_PIN/direction; WAIT_GPIO
8+
+ #echo "in" > /sys/class/gpio/gpio$IOT_SK_SX1301_RESET_PIN/direction; WAIT_GPIO
9+
}
10+
11+
iot_sk_term() {

lora-packet-forwarder/APKBUILD

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
pkgname=lora-packet-forwarder
66
altname=packet-forwarder
77
pkgver=2.2.1
8-
pkgrel=0
8+
pkgrel=1
99
pkgdesc="a program for a LoRa gateway that forwards packets received to a server and emits packets that are sent by the server."
1010
url="https://github.com/Lora-net/packet_forwarder"
1111
arch="armhf"
@@ -17,6 +17,7 @@ subpackages="$pkgname-dev $pkgname-doc"
1717
source="
1818
${pkgname}-${pkgver}.tar.gz::https://github.com/Lora-net/packet_forwarder/archive/v$pkgver.tar.gz
1919
10-makefile.patch
20+
10-reset_pkt_fwd.patch
2021
lora-packet-forwarder.initd
2122
lora-packet-forwarder.confd
2223
"
@@ -25,6 +26,7 @@ options="!check"
2526

2627
prepare() {
2728
patch "$builddir"/${altname/-/_}-${pkgver}/Makefile < 10-makefile.patch
29+
patch "$builddir"/${altname/-/_}-${pkgver}/reset_pkt_fwd.sh < 10-reset_pkt_fwd.patch
2830
}
2931
build() {
3032
cd "$builddir"/${altname/-/_}-${pkgver}/
@@ -81,5 +83,6 @@ package() {
8183

8284
sha512sums="917abb284e885d63aeeefdcaa9097943d9713e20fefbd5205b23b0a3d62ad65e73f5de9f8179fe5084922ac3b14dfc9c0156eff962859644b5c43faff1af07ea lora-packet-forwarder-2.2.1.tar.gz
8385
ec3b112a6748cf3919264c814605f8b077a1d7984d491ce44e08fe251ea5cf8e5dfcf320a6db3a4145adc91acd52a5d4b68f9e72244f369409a2abaa522208e5 10-makefile.patch
84-
978086fab43453df96a2c682003a2e802afcee110dab716dff157b4e6a4ed5393c14db27a56a99119e7cec6ead8e00c697c6ed0f097beb42bd5359ce02db3b3b lora-packet-forwarder.initd
86+
42f9e7bb5bab186ce071dba980a6fcb2a7c1724c64672e81db33542ef6b7c948044e24c282cc4dbaf45f328588a78afc0509a74f329ca321d469541ec77a2076 10-reset_pkt_fwd.patch
87+
e228cdb0fbcdb33055d116bf7129557b6fc66ea2b14a08c4f8056fc79d3097b7946d3746b4d7d4ed1f619342b0e1f174cd5e14ec8190e13d1e83a5be76e74693 lora-packet-forwarder.initd
8588
f11f0d192cd7823307c2ce4ddc7b3fff5190f72d3f65a5524b487021a95a222aca1fd36ab1eb58ed533e7acd555bfb70f0c8a13db20338ea31527f3151fd2bd7 lora-packet-forwarder.confd"

lora-packet-forwarder/lora-packet-forwarder.initd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ restart() {
5656
status() {
5757
ebegin "Status for $desc:"
5858
if [ -f $pidfile ]; then
59-
ps -ef $(cat $pidfile)
59+
ps -efq $(cat $pidfile)
6060
RETVAL=$?
6161
else
6262
echo "$name is not running"

0 commit comments

Comments
 (0)