Skip to content

Commit

Permalink
redis: fix socket permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Nov 11, 2017
1 parent 10488be commit a71ec05
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

[v0.34.5](https://github.com/nextcloud/nextcloudpi/commit/e603de3) (2017-11-10) update: wait running apt processes (fix)
[v0.34.6](https://github.com/nextcloud/nextcloudpi/commit/fc4ffc2) (2017-11-11) redis: fix socket permissions

[v0.34.4 ](https://github.com/nextcloud/nextcloudpi/commit/362211f) (2017-11-09) redis: fixes with ramlogs and modsecurity
[v0.34.5](https://github.com/nextcloud/nextcloudpi/commit/9e48e92) (2017-11-10) update: wait running apt processes (fix)

[v0.34.4 ](https://github.com/nextcloud/nextcloudpi/commit/b6538b9) (2017-11-09) redis: fixes with ramlogs and modsecurity

[v0.34.3 ](https://github.com/nextcloud/nextcloudpi/commit/cc82c7b) (2017-11-09) redis: change overcommit memory on update

Expand Down
6 changes: 3 additions & 3 deletions etc/nextcloudpi-config.d/nc-nextcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ install()
$APTINSTALL redis-server php7.0-redis

local REDIS_CONF=/etc/redis/redis.conf
sed -i "s|# unixsocket.*|unixsocket /var/run/redis/redis.sock|" $REDIS_CONF
sed -i "s|# unixsocketperm.*|unixsocketperm 777|" $REDIS_CONF
sed -i "s|port.*|port 0|" $REDIS_CONF
sed -i "s|# unixsocket .*|unixsocket /var/run/redis/redis.sock|" $REDIS_CONF
sed -i "s|# unixsocketperm .*|unixsocketperm 770|" $REDIS_CONF
sed -i "s|port.*|port 0|" $REDIS_CONF
echo "maxmemory ${REDIS_MEM}" >> $REDIS_CONF
echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf

Expand Down
8 changes: 5 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ EOF
EOF

REDIS_MEM=3gb
sed -i "s|# unixsocket.*|unixsocket /var/run/redis/redis.sock|" $REDIS_CONF
sed -i "s|# unixsocketperm.*|unixsocketperm 777|" $REDIS_CONF
sed -i "s|port.*|port 0|" $REDIS_CONF
sed -i "s|# unixsocket.* |unixsocket /var/run/redis/redis.sock|" $REDIS_CONF
sed -i "s|# unixsocketperm.* |unixsocketperm 770|" $REDIS_CONF
sed -i "s|port.*|port 0|" $REDIS_CONF
echo "maxmemory ${REDIS_MEM}" >> $REDIS_CONF
echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf

Expand All @@ -279,6 +279,8 @@ EOF
}
sed -i 's|^logfile.*|logfile /var/log/redis/redis-server.log|' $REDIS_CONF

grep -q unixsocketperm $REDIS_CONF || echo unixsocketperm 770 >> $REDIS_CONF

# fix unattended
NUSER=$( grep USER_ /usr/local/etc/nextcloudpi-config.d/nc-notify-updates.sh | head -1 | cut -f2 -d= )
cat > /usr/local/bin/ncp-notify-unattended-upgrade <<EOF
Expand Down

0 comments on commit a71ec05

Please sign in to comment.