Category: Bash

Raspberry pi 3 CSI camera with motion /dev/video0

There are a number of topics on the web, about getting a modified version of motion (motion-mmcal) to work with raspberry pi v2.1 CSI camera.

A simpler method is to expose the camera interface through the standard video 4 linux kernel interface /dev/video0.

This can be achieved by simply enabling the video 4 linux kernel module and installing the standard motion.

Install motion

Enable the kernel module on boot

Load the module without reboot

Start service as normal

Raspberry pi 3 disable red and green lights

Disabling the lights on raspberry pi has been documented a number of times on the web.
If differs from model to model, however the following method just sets the brightness to zero and should work on all models.

Modify your /etc/rc.local too like the following

Seedbox autoupload to google drive with rclone

If you are an avid seedbox user, here is another option for automatic uploads to google drive.
There are many ways of achieving this, including a cronjob.
I like this option, as it only runs rclone when a torrent completes.

Using inotifywait to watch for file system events, we look out for primarily the ‘move’ event.
When your torrent completes, it moves the completed torrent into the completed folder.
When this event takes place, when then execute

Setup rclone and scripts

Permissions and PATH

Once you have setup the 3 scripts, make them executable


If ~/bin is not in your path, then add it and reload your shell

Edit Path

Finally you run the main script in a cronjob

Finalize and run in the background

Screen session

You can read more about inotifywait and rclone here

Namecheap DDNS Updates via DD-WRT

DD-WRT has limit support for different DDNS update mechanisms.
A simple workaround is the following script.

Login to your router and go to Administration > Commands

Add the following to the startup script, modifying it for your details

Finally, go to the Administration > Management and add a crontab to update it hourly.

Enjoy 😉

Debian Sid Intel I217-V Not Working

After scouring for ages looking for this fix. I’ve decided to document it.
It comes form a number of sources. Kudos to the individual people.

Rebooting from windows into Linux renders the NIC unusable. the classic “lights are on but no one is home”
Some people advice disabling PXE etc in the bios. There is a better solution

Identify the NIC

Create a systemd oneshot service file

Reset NIC bash file

Make it executable