This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
power_raw=`cat /sys/bus/i2c/devices/2-0044/hwmon/hwmon1/power1_input` | |
voltage_raw=`cat /sys/bus/i2c/devices/2-0044/hwmon/hwmon1/in1_input` | |
temperature_raw=`cat /sys/devices/platform/soc/soc:i2c-gpio/i2c-2/2-0076/iio:device0/in_temp_input` | |
humidity_raw=`cat /sys/devices/platform/soc/soc:i2c-gpio/i2c-2/2-0076/iio:device0/in_humidityrelative_input` | |
pressure_raw=`cat /sys/devices/platform/soc/soc:i2c-gpio/i2c-2/2-0076/iio:device0/in_pressure_input` | |
power=`echo "scale=2; $power_raw / 1000000" | bc` | |
voltage=`echo "scale=2; $voltage_raw / 1000" | bc` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LOAD=$(uptime | sed -n -e 's/^.*average: //p'| sed 's/ //g') | |
LOAD5=$(echo $LOAD | cut -d ',' -f 2) | |
LOAD500=$(awk -v var=$LOAD5 'BEGIN{print var * 100}') | |
[ $LOAD500 -gt 50 ] && reboot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker pull gpbenton/gerbera | |
sudo docker run -it -v /home/user/Music:/media/music -v /home/user/Videos:/media/videos -v /home/user/Pictures:/media/pictures --name gerbera docker.io/gpbenton/gerbera:latest | |
volumes: | |
/media/pictures | |
/media/videos | |
/media/music | |
/home/gerbera/.config/gerbera |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Dir where easy-rsa is placed | |
EASY_RSA_DIR="/etc/openvpn/easy-rsa/2.0" | |
KEYS_DIR="$EASY_RSA_DIR/keys" | |
# Dir where profiles will be placed | |
OVPN_PATH="/etc/openvpn/easy-rsa/2.0/keys" | |
REMOTE="YOUR-vpn-SERVER.com 1194" | |
if [ -z "$1" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "Please run this command with Location as a parameter" | |
exit 1 | |
else | |
location=$1 | |
fi | |
sysname=`uci get system.@system[0].hostname` | |
korisnici=`cat /tmp/dhcp.leases|wc -l` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
######################################################### | |
# Display the status of the Babel mesh. | |
# Latest version: | |
# http://redmine.bidon.ca/projects/reseaulibre-scripts/repository/raw/babelstatus.sh | |
# | |
# Usage: | |
# babelstatus.sh : shows babel routes | |
# babelstatus.sh --full : show other relevant info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download latest libevent2 and tmux sources, and extract them somewhere | |
# | |
# at the time of writing: | |
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
# http://sourceforge.net/projects/tmux/files/latest/download?source=files | |
# | |
# don't compile tools as root, just don't do it. | |
# install deps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# fedora-fromiso - Patch the ramdisk of Fedora to allow booting from | |
# ISO image | |
# | |
# Copyright (C) 2012 Mansour <[email protected]> | |
# All rights reserved. | |
# Copyright (C) 2013 Matthias Saou <[email protected]> | |
# Update for Fedora 18 | |
# |