linux

zm_auto: a bash script to totally automate Zoneminder

This is a bash script with several functions to totally automate Zoneminder and is also present a service to install to automatically start this script at boot. With this script you can: automatically switch the Day and Night states based on hour automatically switch to the Armed state if a bluetooth device isn't more detected automatically move the ptz cameras in two different preset when changing state automatically restart Zoneminder if it goes in the Inactive state Here the code of zm_auto.sh: #!/bin/bash zmdbuser=`cat /etc/zm/zm.conf | grep ZM_DB_USER | awk -F= '{print $2}' | tr -d ' '` zmdbpass=`cat /etc/zm/zm.conf | grep ZM_DB_PASS | awk -F= '{print $2}' | tr -d ' '` #echo $runstate # for debug only armed_state='Armed' day_state='Day' night_state='Night' calibrate='Calibrate' reset...

zmodopipe: connect Zoneminder with several DVR

Thanks to zmodopipe we can connect Zoneminder with several commercial DVR as the Zmodo ones, this is a project that have been started on the Zoneminder forum by the user Phoenix84 and has been continued on github by the user pbeyl . I'm simply copying it here for backup purposes. Here the code of zmodopipe.c: /***************************************** * Read QSee/Zmodo cameras * * Forward stream...

Grub2 and WindSLIC: insert WindSLIC entry instead of the Windows Bootloader one

We can customize the Grub2 to boot Windows via WindSLIC. We have to create the grub's configuration /etc/grub.d/25_windslick: #!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. menuentry 'Windows Boot Manager (su /dev/sda1)' --class...

Zoneminder: control module for Bosesh SD13W

Perl module to control the Bosesh SD13W with Zoneminder. SD13W.pm: # ========================================================================== # # ZoneMinder Bosesh SD13W IP Control Protocol Module, $Date: 2017-05-30 01:18:22 +0100 (Wed, 04 Nov 2009) $, $Revision: 1 $ # Copyright (C) 2017 Mentor (http://www.internauta37.altervista.org) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General...

Zoneminder: control module for Vstarcam C7816WIP

Perl module to control the Vstarcam C7816WIP with Zoneminder. C7816WIP.pm: # ========================================================================== # # ZoneMinder Vstarcam C7816WIP IP Control Protocol Module, $Date: 2017-01-15 01:18:10 +0100 (Wed, 04 Nov 2009) $, $Revision: 1 $ # Copyright (C) 2017 Mentor (http://www.internauta37.altervista.org) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the...

Zoneminder: control module for Vstarcam C7824WIP

Perl module to control the Vstarcam C7824WIP with Zoneminder. C7824WIP.pm: # ========================================================================== # # ZoneMinder Vstarcam C7824WIP IP Control Protocol Module, $Date: 2017-01-15 01:17:54 +0100 (Wed, 04 Nov 2009) $, $Revision: 1 $ # Copyright (C) 2017 Mentor (http://www.internauta37.altervista.org) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the...

Bash script to change the Zoneminder's state

Script to change the Zoneminder's state via crontab and to check at boot if the correct state is set. zoneminder_state.sh: #!/bin/bash zmdbuser=`cat /etc/zm/zm.conf | grep ZM_DB_USER | awk -F= '{print $2}' | tr -d ' '` zmdbpass=`cat /etc/zm/zm.conf | grep ZM_DB_PASS | awk -F= '{print $2}' | tr -d ' '` runstate=`mysql -N -B -u$zmdbuser -p$zmdbpass zm -e "select Name from States where isActive=1 LIMIT 1;"` alarmedstate='Armed' #echo $runstate # for debug only function state { if [ "$runstate" != "$alarmedstate" ]; then /usr/bin/zmpkg.pl ${1} else exit fi } function boot { hour=$(date +%H) daystate='Day' nightstate='Night' hour_day_start='8' hour_day_end='24' if [ "$runstate" == "$alarmedstate" ]; then exit elif (( $hour_day_start <= 10#$hour && 10#$hour < $hour_day_end ));...

Linux: bash script to backup the OS

This is a really simple command/script to backup via rsync an entire Linux OS: #!/bin/bash rsync -aAXv --delete --exclude={"/dev/","/home/","/lost+found/","/media/","/mnt/","/proc/","/run/","/sys/","/tmp/"} / /media/Data_Backup/OS/ Source: wiki.archilinux.com

Bash script to backup a Drupal site with an SQLite database

Script to backup via ftp a Drupal site that uses a database SQLite and to then archive it. backup_site.sh: #!/bin/bash # HOST='ftp.site.com' USER='username' PASSWORD='password' BACKUPDIR=$HOME'/backup/site' WORKINGDIR='/tmp' DBPATH='sites/default/files' DBNAME='.ht.sqlite' cd $WORKINGDIR wget -m --preserve-permissions --user=$USER --password=$PASSWORD ftp://$HOST sqlite3 $HOST/$DBPATH/$DBNAME "VACUUM;" while [ $? -ne 0 ]; do wget -m --preserve-permissions --user=$USER --password=$PASSWORD ftp://$HOST/$DBPATH/$DBNAME sqlite3 $HOST/$DBPATH/$DBNAME "VACUUM;" done mkdir -p "$BACKUPDIR" 7z a -mhe -p$PASSWORD "$BACKUPDIR/$HOST-`date +%Y%m%dT%H%M`.7z" "$HOST" rm -r $HOST The script can been executed via cron in this way: 0 20 1 * * bin/backup_site.sh >> bin/cron.log 2>&1

Mentor's Conky: conky lua for 8 cores cpu

This is a mod of Conky Seamod to support 8 cores cpu as the AMD Bulldozer family. Conky SeaMod on kde-look.org Conky SeaMod on deviantart.com conkyrc: #============================================================================== # conkyrc_mentor # Date : 24/12/2013 # Author : Mentor # Version : v0.2 # License : Distributed under the terms of GNU GPL version 2 or later # # This version is a modification of conkyrc_seamod that is a modification of conkyrc_lunatico wich is modification of conkyrc_orange # # conkyrc_orange: http://gnome-look.org/content/show.php?content=137503&forumpage=0 # conkyrc_lunatico: http://gnome-look.org/content/show.php?content=142884 # conkyrc_seamod: http://www.deviantart.com/art/Conky-Seamod-v0-1-283461046 # conkyrc_mentor: http://www.internauta37...

Pages

Subscribe to RSS - linux