Raspberry Pi Mount USB Thumb Driver permanently

I always search the web for that.

So here is the simple solution:

sudo ls -laF /dev/disk/by-uuid

find your device uuid  for example : c2eced36-13e6-4dcd-82a4-c6ecdfb16ec1

then add to fstab

UUID=c2eced36-13e6-4dcd-82a4-c6ecdfb16ec1 /path/toMountpoint

sudo reboot

done!

Posted in Linux

Mount windows samba share with username and password required

mount //<ipfromserver>/<sharename> /<mountpoint> -o username=<username>,password=<password>
Posted in Uncategorized

Hikvision Camera DS-2CD2042WD NAS Storage does not initialize Solution

Hello I bought a camera HIKVISION , but data storage initialization does not work.

Therefor here is the solution for nfs share:

On your NAS Server:

Create a simple image with filesize 50 gb:

dd if=/dev/zero of=<imagefilename>.img bs=1 count=0 seek=50G

format the image with ext4 file system

mkfs ext4 -F /mnt/win1/<imagefilename>.img

Mount the image

mount -o loop,rw /path/to/<imagefilename>.img /path/to/mountpoint

The next part is just if you want to share via nfs (SMB can be done be shareing the mountpoint)

sudo nano  /etc/exports

add the line

/path/to/image50gmount 192.168.2.0/24(rw,sync,no_subtree_check,insecure)
sudo  exportfs -a

pay attention to the file mode and permissions. the file is created as root so you might have to chmod chown it …

NOW THE IMPORTANT STEP:::

By default the Folder “Lost+Found” is created by mkfs. To make the cameras Storage work you MUST delete it.

The shared folder must be complete empty!

 

Now Format the device in your camera Web UI …

Enjoy recording

Posted in ipcamera, Linux

New video trying Raspberry Pi 3 with Pixel desktop

Hope you like it

Posted in Raspberry PI

Create a cronjob on Ubuntu

Today about doing cronjobs::

crontab -l

shows you the current cronjobs

 

 

crontab -e

if no file exists a new one is created.

insert a rule to active the new job

 

for example

30 3 * * * /home/user/dothatthingatnight.sh

dothatthingatnight.sh is executed every day at 3.30am.

Possible errors:

  1. Wrong permissions!! Remember that the crontab -e is for the current user only. so the current user must be able to execute dothatthingatnight.sh
  2. computer is down at this time 🙂

 

for further information akkording to cronjobs please take a look at

http://www.thegeekstuff.com/2009/06/15-practical-crontab-examples/

Posted in bananapi, Linux, Raspberry PI

Check mount for available capacity

Fist we need a shell script that does the checking:

ADMIN="admin@youradress.com"
ALERT=80
df -H | grep -vE "^[^/]|tmpfs|cdrom" | awk '{ print $5 " " $1 }' | while read output;
do
  usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1  )
  partition=$(echo $output | awk '{ print $2 }' )
  if [ $usep -ge $ALERT ]; then
    echo "Disk space alert: \"$partition ($usep%)\" on $(hostname) as on $(date)" |
     mail -s "Alert: Almost out of disk space $usep" $ADMIN
  else
    echo "Drive \"$partition ($usep%)\" is has enough space left"
  fi
 
done

 

Then as your system trys to mail you the alert and the mailutil is not install. install it using:

sudo apt-get install mailutils

Now configure mail using ssmtp

Install and configure sstmp

sudo apt-get install ssmtp

sudo nano /etc/ssmtp/ssmtp.conf

Uncomment FromLineOverride=YES by deleting the #

Add those lines for using gmail as an email server

AuthUser=<user>@gmail.com
AuthPass=Your-Gmail-Password
mailhub=smtp.gmail.com:587
UseSTARTTLS=YES

 

now the script should be working

Posted in Linux

JSF Eclipse Maven Java Primefaces mini sample setup tutorial

He folks,

I just did my first java tutorial. So if you start JSF Java Web Application, this will be a good point to start.

So here are two parts of the Eclipse, Maven, JSF, Primefaces sample setup.

have fun

Java JSF Primefaces Maven Tutorial Part1

Java JSF Primefaces Maven Tutorial Part2

Posted in java, maven, primefaces, programming Tagged with: , , ,

Howto connect your Iphone oder Andriod device to your openvpn server on raspberry pi

Hi guys,

my problem was: how can I connect my Iphone 6 to my fresh installed Open VPN Server.

The answer was pretty straight forward. By installing the app OpenVPN Connect.

To connect, you will need the *.ovpn file from your pivpn installation.

Installation on mobile Devices using a NAS Server

  1. Now copy the *.ovpn file which is created while the pivpn installation (file path should be printed on screen), to your NAS Server.
  2. Get the app FileExplorer for IOS form AppStore
  3. Connect to your NAS Server and choose the *.ovpn file.
  4. In the appering dialog choose  “Open with”.
  5. Select the Opnevpn Connect app.
  6. Now click on the little + Symbol and enter the password.

DONE!!

Word of warning:

Openvpn Connect suggests to simply send the *.ovpn file as an email attachment.

I would not recommend that! Email is insecure, and in case your email account in compromised, your local network will be also.

 

Here are the links to the app for Iphone and Android.

„OpenVPN Connect“ on App Store

Source: itunes.apple.com/de/app/openvpn-connect/id590379981?mt=8

„FileExplorer“ on App Store

Source: itunes.apple.com/de/app/fileexplorer/id499470113?mt=8

OpenVPN for Android and€“ Android-Apps on Google Play

Open Source OpenVPN Client for Android.

Source: play.google.com/store/apps/details?id=de.blinkt.openvpn

How to configure it? I’ll be providing a small video on this matter and link it here.

Posted in android, ios, vpn Tagged with: , , ,

Raspberry PI and Openvpn VPN Server

Hi guys,

I am facing problems to get openvpn on my rapberry pi to work.

Therefor I installed the openvpn server, but anyhow I did not get quiet far 🙁

Until I found this.

A neat little project which makes our lives easier called pivpn.

Does all the downloading and the setup work for you. You simply have to give in the password to make it work.

CHeck this out:

PiVPN: Simplest setup of OpenVPN

Secure connectivity for the masses. Low cost, high security.

Source: www.pivpn.io/

After installation if you want to kick or add a client from the valid users just do:

pivpn -r <nameoftheclient>
pivpn -l shows a list of all clients that are registered
pivpn -a <clientname> adds a client and creates an *.ovpn file (save directory is shown while adding) which can be loaded into the client
Posted in Raspberry PI, vpn

A fresh Video about to configure Your Kodi to connect to TVheadend for Live TV

Posted in kodi, tvheadend

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close