diff options
author | Karl Palsson <karlp@etactica.com> | 2016-08-30 11:39:46 +0000 |
---|---|---|
committer | Karl Palsson <karlp@etactica.com> | 2016-08-30 11:41:34 +0000 |
commit | 7f651d102df6446d19fa6d7c89065c49553675f3 (patch) | |
tree | 2fbc8bd9eb9cf2d09db1ca2e8d8ed452298ec8a5 /net/mosquitto | |
parent | 41682a4258bf4f0db953c7ecd4452414a7bc45ba (diff) |
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>
Diffstat (limited to 'net/mosquitto')
-rwxr-xr-x | net/mosquitto/files/etc/init.d/mosquitto | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mosquitto/files/etc/init.d/mosquitto b/net/mosquitto/files/etc/init.d/mosquitto index 564190882..adb31a397 100755 --- a/net/mosquitto/files/etc/init.d/mosquitto +++ b/net/mosquitto/files/etc/init.d/mosquitto @@ -76,7 +76,10 @@ convert_persistence() { append_if "$cfg" file persistence_file config_get loc "$cfg" location if [ -n "$loc" ]; then - [ -d "$loc" ] || mkdir -p "$loc"; + [ -d "$loc" ] || { + mkdir -p "$loc"; + chown mosquitto "$loc"; + } echo "persistence_location $loc" >> $TCONF fi } |