Nextcloud on all-inkl.com: PHP memory limit

Updating Nextcloud installs a fresh .htaccess file. This can lead to an error message in the Administration/Overview page: “The PHP memory limit is below the recommended value of 512MB.”. To resolve the issue, add the following to the bottom of your .htaccess file:

php_value memory_limit 512M

Don’t forget to update the .htaccess after the next Nextcloud update!

Update: for php >= 8 you need the following in your .user.ini file:

memory_limit=512M

scp the-config.cfg manager@theprocurveswitch:/cfg/startup-config

If you start dipping your toe into the waters of network automation with hp procurve switches and want to push the generated config via scp (or tftp) you have to make sure you have the correct “magic” in the first config line. You are fine if it matches the beginning of a show running-config output.


someone@somewhere:~/ANSIBLE/CFGS$ head -n3 sw-edv-0-12-sw1.txt
; J4899B Configuration Editor; Created on release #H.10.115

hostname "sw-edv-0-12-sw1"
someone@somewhere:~/ANSIBLE/CFGS$

This fact is discussed in a forum thread at hp.

The magic line is also there when one creates a backup of the running-config. Thankfully, you can push a startup-config to the switch that looks like a command file you would run after an erase startup-config.

Banana Pro Serviette [updated]

A serviette is a concept introduced by Sven Guckes that can be implemented on a Banana Pro. This is a short how to.

Get an operating system (bananian, Debian 8/Jessie) running

Download the latest image from bananian.org

Make sure to replace /dev/mmblk0 with the path to your SD-card.

unzip bananian-latest.zip
sudo chown "$USER.$USER" /dev/mmcblk0
cat bananian-1508.img > /dev/mmcblk0
# delete 2nd partition, recreate it to fill sd-card
printf 'd\n2\nn\np\n2\n\n\nw\n\n' | fdisk /dev/mmcblk0
# expand filesystem.
sudo chown "$USER.$USER" /dev/mmcblk0p2
e2fsck -f /dev/mmcblk0p2
resize2fs /dev/mmcblk0p2

Get the serviette running

Put the SD-card into the bananapro and power it up. Default password for root is pi. Change it ASAP.

passwd

Run bananian-config and set your “hardware configuration” to BananaPro and add ‘ap6210’ to /etc/modules as detailed in https://www.bananian.org/hardware.

Install git, fetch the repository and run the install script. One needs to uncomment the calls to the individual install functions at the end of the script prior to running it.

apt-get update
apt-get install git
mkdir src
cd src
git clone https://github.com/serviette/serviette.git
cd serviette
vi serviette.sh
bash serviette.sh

Please note the at the time of writing the official repository/install script would not work out of the box, a pull request is in progress. Meanwhile, one can use git clone https://github.com/chbw/serviette.git instead

Update notes: As I rerun the above I realized that I had to change vim to vi, sh to bash and add ‘ap6210’ to /etc/modules as well.

A PN532 module and a raspberry pi B+

Get an operating system (Arch) running

  1. Prepare an SD-Card by following the instructions on archlinuxarm.org
  2. Enable SPI by putting device_tree_param=spi=on in /boot/config.txt

Install prerequisites

  1. Install git: pacman -S git
  2. Install development tools (for AUR): pacman -S --needed base-devel
  3. Install sudo and add the standard user (alarm) to the group sudo

    pacman -S sudo
    groupadd sudo
    usermod -a -G sudo alarm

Get NFC related software

The required library libnfc is in the AUR, it needs some prerequisites:

pacman -S cmake libusb-compat pcsclite

Get the build files (as normal user)

mkdir build-repos
cd build-repos
git clone https://aur.archlinux.org/libnfc.git
cd libnfc

Add the architecture to the PKGBUILD by adding armv6h to the arch variable.

arch=('i686' 'x86_64' 'armv6h')

Build and install the package

makepkg -sri

Configure libnfc

As root, create the folder /etc/nfc and put the following in libnfc.conf (source)

allow_autoscan = true
allow_intrusive_scan = false
log_level = 1
device.name = "Itead_PN532_SPI"
device.connstring = "pn532_spi:/dev/spidev0.0:500000"

Test

Connect the reader (with the Raspberry Pi powered off).

As root, check whether the reader is found

nfc-list

Test the reader

nfc-poll

IPv6 hop limit: Mikrotik router config to work around Ubuntu bug

My ubuntu machine lost IPv6 connectivity beyond the link-local network. It turned out to be the same problem someone described at askubuntu. According to a message in the ubuntu-bugs mailing list this should be resolved by an update soon.

Until then, announcing a specific hop-limit will work around the problem

/ipv6 nd
set [ find default=yes ] advertise-dns=yes hop-limit=64 \
ra-interval=20s-1m ra-lifetime=3m