mkdir -p /scripts/photo
vim /scripts/photo_every_hour.sh
DATE=`date "+%Y.%m.%d_%H.%M.%S"` DAY=`date "+%Y.%m.%d"` mkdir -p /scripts/photo/$DAY /usr/bin/raspistill -n -rot 90 -o /scripts/photo/$DAY/photo_$DATE.jpg rsync -aogv --log-file=/scripts/RSYNC_LOGS/rsync_photo_$DATE.log /scripts/photo/* pizero@192.168.1.100:/data/pizero/photo/
crontab -e
0 * * * * /scripts/photo_every_hour.sh
sudo aptitude install conky
wget -O /home/pi/.conkyrc https://blog.cssoft.pl/images/conkyrc.txt
sudo vim /usr/bin/conky.sh
#!/bin/sh (sleep 4s && conky) & exit 0
sudo vim /etc/xdg/autostart/conky.desktop
[Desktop Entry] Name=conky Type=Application Exec=sh /usr/bin/conky.sh Terminal=false Comment=system monitoring tool.Categories=Utility;
sudo reboot
https://html.dynu.net/index.php/installing-conky-linux/
How to add weather info
sudo vim /home/pi/.conkyrc
${font Dejavu Sans Mono:size=8}${alignc}${color green}${execpi 300 curl wttr.in/Warsaw?T0 --silent --max-time 3}
https://askubuntu.com/questions/1190907/how-can-i-get-conky-to-display-weather
raspi-config
enable camera
Camera test
vcgencmd get_camera
raspivid -o - -t 0 -hf -w 800 -h 400 -fps 24 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8160}' :demux=h264
VLC
Media -> Open Network Stream -> http://192.168.1.1:8160 -> Play
sudo aptitude brightnessctl
sudo brightnessctl s 50
aptitude install nagios4 nagios-nrpe-plugin
Po instalacji wystakuje błąd apache2
apache2_reload: Your configuration is broken. Not reloading Apache 2 apache2_reload: AH00526: Syntax error on line 37 of /etc/apache2/conf-enabled/nagios4-cgi.conf: apache2_reload: Invalid command 'AuthDigestDomain', perhaps misspelled or defined by a module not included in the server configuration
trzeba aktywować 2 modułu apache2 do poprawnego działania:
a2enmod auth_digest a2enmod authz_groupfile service apache2 restart
żeby się loga dystrybucji wyświetlały
cp /usr/share/nagios/htdocs/images/logos/base /usr/share/nagios4/htdocs/images/logos/
Logotypy dla ubuntu
wget https://blog.napraw.to/images/nagios_ubuntu_logos.zip unzip nagios_ubuntu_logos.zip mv ubuntu.* /usr/share/nagios4/htdocs/images/logos
Zobacz całość
vim /etc/dhcpcd.conf
interface eth0 static ip_address=192.168.1.100/24 static routers=192.168.1.1 static domain_name_servers=8.8.8.8
Windows > Run > diskpart.exe
list disk select disk 1 clean create partition primary
aptitude install nagios3 nagios-nrpe-plugin
żeby się loga dystrybucji wyświetlały
cp /usr/share/nagios/htdocs/images/logos/base /usr/share/nagios3/htdocs/images/logos/
Logotypy dla ubuntu
wget https://blog.cssoft.pl/images/nagios_ubuntu_logos.zip unzip nagios_ubuntu_logos.zip mv ubuntu.* /usr/share/nagios3/htdocs/images/logos/base
Zobacz całość
sudo apt-get install fswebcam
sudo usermod -a -G video <username>
#musi przeskoczyć kilka klatek żeby zrobić zdjęcie
fswebcam -S 10 -r 1920x1080 /home/galezia/Desktop/webcam11.jpg
apt-get install ffmpeg v4l-utils libmariadbclient18 libpq5 libmicrohttpd12
wget https://github.com/Motion-Project/motion/releases/download/release-4.2.2/pi_stretch_motion_4.2.2-1_armhf.deb dpkg -i pi_stretch_motion_4.2.2-1_armhf.deb
apt-get install python-pip python-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libz-dev
pip install motioneye
mkdir -p /etc/motioneye
cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
mkdir -p /var/lib/motioneye
cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/systemmotioneye.service systemctl daemon-reload systemctl enable motioneye systemctl start motioneye
UPGRADE do najnowszej wersji:
pip install motioneye --upgrade systemctl restart motioneye
https://github.com/ccrisan/motioneye/wiki/Install-On-Raspbian
cat /proc/cpuinfo cat /sys/firmware/devicetree/base/model
sudo vim /etc/dhcpcd.conf
interface eth0 static ip_address=192.168.1.101/24 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 interface wlan0 static ip_address=192.168.0.201/24 static routers=192.168.1.1 static domain_name_servers=192.168.1.1
sudo vim /etc/wpa_supplicant/wpa_supplicant.conf
network={ ssid="NAZWA_SIECI" psk="HASŁO" }
źródło: https://botland.com.pl/content/71-jak-ustawic-statyczne-ip-w-raspberry-pi
albo (kiedyś działał sposób powyższy. w nowszej wersji systemu już nie)
sudo vim /etc/network/interfaces
auto eth0 iface eth0 inet static address 192.168.0.2 netmask 255.255.0.0 gateway 192.168.0.1 dns-nameservers 8.8.8.8
reboot
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
# Auto run the browser @xset s off @xset -dpms @xset s noblank @midori -e Fullscreen -a http://google.com
vi ~/.bashrc
chromium-browser --kiosk http://google.com/
https://www.raspberrypi.org/forums/viewtopic.php?t=8298&p=210611
https://www.sdcard.org/downloads/formatter_4/
download sd formatter on windows
option > format size adjustment ON
Format
http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/gui/disable-screen-sleep
vim /etc/lightdm/lightdm.conf
# don't sleep the screen
xserver-command=X -s 0 dpms