Skip to content

Commit c607608

Browse files
committed
Run as meshtasticd user (not root)
1 parent 632eeda commit c607608

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

meshtasticd/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
77
PKG_NAME:=meshtasticd
88
# TODO renovate
99
PKG_VERSION:=2.6.10
10-
PKG_RELEASE:=1
10+
PKG_RELEASE:=2
1111
# TODO renovate
1212
PKG_SOURCE_VERSION:=v2.6.10.9ce4455
1313

@@ -45,6 +45,7 @@ define Package/meshtasticd/Default
4545
CATEGORY:=Network
4646
TITLE:=Meshtastic Daemon
4747
URL:=http://github.com/meshtastic/firmware
48+
USERID:=meshtasticd:meshtasticd
4849
DEPENDS:= \
4950
+libgpiod +libyaml-cpp +zlib +bluez-libs +libpthread +libi2c +libuv \
5051
+MESHTASTICD_ENABLE_SPI:kmod-spi-dev +MESHTASTICD_ENABLE_USB:libusb-1.0 \

meshtasticd/files/meshtasticd.init

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ service_triggers() {
2020
}
2121

2222
start_service() {
23+
chown -R meshtasticd:meshtasticd $DATA_DIR
24+
chown -R meshtasticd:meshtasticd $CONFIG_BASEDIR
2325
procd_open_instance
26+
procd_set_param user meshtasticd
2427
procd_set_param command $DAEMON
2528
procd_append_param command --fsdir=$DATA_DIR
2629
procd_set_param file $CONFIG_FILE

0 commit comments

Comments
 (0)