TL;DR
Install Postgres 9.6, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
Set db path for pg_upgradecluster:
TL;DR
Install Postgres 9.6, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
Set db path for pg_upgradecluster:
#!/bin/bash | |
while : | |
do | |
echo "$(date) @ $(hostname)" | |
echo "Performing new stress testing cycle..." | |
stress --cpu 20 --io 20 --vm 6 --vm-bytes 25M --timeout 120s | |
cpu=$(</sys/class/thermal/thermal_zone0/temp) | |
echo "-------------------------------------------" | |
echo "GPU => $(/opt/vc/bin/vcgencmd measure_temp)" |
#!/bin/bash | |
# cpustatus | |
# | |
# Prints the current state of the CPU like temperature, voltage and speed. | |
# The temperature is reported in degrees Celsius (C) while | |
# the CPU speed is calculated in megahertz (MHz). | |
function convert_to_MHz { | |
let value=$1/1000 | |
echo "$value" |
#!/bin/bash | |
cpu=$(</sys/class/thermal/thermal_zone0/temp) | |
echo "GPU => $(/opt/vc/bin/vcgencmd measure_temp)" | |
echo "CPU => $((cpu/1000))'C" |
Timers provided by systemd can be used as cronjob replacements. More at man systemd.timer
.
Suppose we want to periodically trigger cleanup tasks for a baz
utility. We 'll create a baz-cleanup.service
which will
be triggered by a baz-cleanup.timer
.
Create a minimal service at /lib/systemd/system/baz-cleanup.service
:
modprobe nf_conntrack_tftp
lsmod|grep tftp
echo "nf_conntrack_tftp" >> /etc/modules-load.d/modules.conf
ufw allow from 10.0.0.0/8 to any proto udp port 69
#!/usr/bin/env python | |
""" | |
rdns.py | |
This is a Python script that helps you create | |
reverse DNS zone files for the Bind Name Server. | |
I published it together with this blog post: http://goo.gl/CJwly . | |
""" |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |