mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-08 06:02:01 -03:30
Fix armbian builds
This commit is contained in:
parent
e0a2cec153
commit
a97397102a
@ -53,6 +53,7 @@ EOF
|
||||
## INITIALIZE NEXTCLOUD
|
||||
|
||||
# make sure redis is running first
|
||||
REDISPASS="$( grep "^requirepass" /etc/redis/redis.conf | cut -f2 -d' ' )"
|
||||
if ! pgrep -c redis-server &>/dev/null; then
|
||||
mkdir -p /var/run/redis
|
||||
mkdir -p /var/log/
|
||||
@ -61,10 +62,18 @@ EOF
|
||||
redis_pid=$!
|
||||
for i in {1..5}
|
||||
do
|
||||
ps -p $PID || [[ $i -lt 5 ]] || {
|
||||
echo "FAILED TO START REDIS"
|
||||
return 1
|
||||
} && break
|
||||
|
||||
if redis-cli -s //var/run/redis/redis.sock -a "$REDISPASS" ping | grep PONG
|
||||
then
|
||||
break
|
||||
else
|
||||
if [[ $i -ge 5 ]]
|
||||
then
|
||||
echo "FAILED TO START REDIS"
|
||||
cat /var/log/redis.log /var/log/redis/redis-server.log
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
sleep 3
|
||||
done
|
||||
fi
|
||||
|
||||
@ -60,6 +60,10 @@ install()
|
||||
sed -i 's|# rename-command CONFIG ""|rename-command CONFIG ""|' $REDIS_CONF
|
||||
sed -i "s|^port.*|port 0|" $REDIS_CONF
|
||||
echo "maxmemory $REDIS_MEM" >> $REDIS_CONF
|
||||
if [[ "$ARMBIAN_BUILD" == "yes" ]]
|
||||
then
|
||||
echo "ignore-warnings ARM64-COW-BUG" >> $REDIS_CONF
|
||||
fi
|
||||
echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf
|
||||
|
||||
if is_lxc; then
|
||||
|
||||
@ -33,13 +33,11 @@ echo -e "\nInstalling NextCloudPi"
|
||||
|
||||
hostname -F /etc/hostname # fix 'sudo resolve host' errors
|
||||
|
||||
CODE_DIR="$(pwd)" DBG=x bash install.sh || {
|
||||
ARMBIAN_BUILD=yes CODE_DIR="$(pwd)" DBG=x bash install.sh || {
|
||||
echo "SOMETHING WENT WRONG, EXITING..."
|
||||
! [ -f /var/log/redis.log ] || cat /var/log/redis.log
|
||||
sudo -u redis redis-server /etc/redis/redis.conf
|
||||
sleep 120
|
||||
exit 1
|
||||
}
|
||||
sed -i 's/^ignore-warnings ARM64-COW-BUG//' /etc/redis/redis.conf
|
||||
|
||||
echo -e "\nPostinstall..."
|
||||
run_app_unsafe post-inst.sh
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user