diff --git a/meshtasticd/Makefile b/meshtasticd/Makefile index 8f51fc0..caaf2a1 100644 --- a/meshtasticd/Makefile +++ b/meshtasticd/Makefile @@ -37,6 +37,7 @@ define Package/meshtasticd/Default SUBMENU:=Meshtastic TITLE:=Meshtastic daemon URL:=https://github.com/meshtastic/firmware + USERID:=meshtasticd:meshtasticd endef # Leaving a possibility for adding a light variant without the web UI support if diff --git a/meshtasticd/files/meshtasticd.init b/meshtasticd/files/meshtasticd.init index 440a5f4..9b2c193 100644 --- a/meshtasticd/files/meshtasticd.init +++ b/meshtasticd/files/meshtasticd.init @@ -24,10 +24,14 @@ start_service() { mkdir -p "$data_dir" + chown -R meshtasticd:meshtasticd "$data_dir" + chown -R meshtasticd:meshtasticd "$config_dir" + # meshtasticd needs to be run from its data directory cd "$data_dir" procd_open_instance + procd_set_param user meshtasticd procd_set_param command "$PROG" procd_append_param command --fsdir="$data_dir" procd_set_param file "$config_file"