net/mosquitto: chown data directory
The package creates a "mosquitto" user, but the support added for persistence creates the data directory as root running the init script. Properly chown the newly created directory to ensure it's writable. Signed-off-by: Karl Palsson <karlp@etactica.com>
This commit is contained in:
parent
41682a4258
commit
7f651d102d
1 changed files with 4 additions and 1 deletions
|
@ -76,7 +76,10 @@ convert_persistence() {
|
||||||
append_if "$cfg" file persistence_file
|
append_if "$cfg" file persistence_file
|
||||||
config_get loc "$cfg" location
|
config_get loc "$cfg" location
|
||||||
if [ -n "$loc" ]; then
|
if [ -n "$loc" ]; then
|
||||||
[ -d "$loc" ] || mkdir -p "$loc";
|
[ -d "$loc" ] || {
|
||||||
|
mkdir -p "$loc";
|
||||||
|
chown mosquitto "$loc";
|
||||||
|
}
|
||||||
echo "persistence_location $loc" >> $TCONF
|
echo "persistence_location $loc" >> $TCONF
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue