daily compression of InfluxDB

InfluxDB is an open source time series database built by InfluxData and used in e.g. Openhab for data persistance.
For small computers like raspi’s it is a best practice to compress the database regurlarly.

Why not using cron ?

Well, it works.. the only (security)-drawback is to grant /bin/bash to the influx-user:

cat /etc/cron.daily/00influx:

#!/bin/bash
#execute
/home/pi/1_influxrepair.sh


cat /home/pi/1_influxrepair.sh:

#!/bin/bash
service influxdb stop
echo "before su"
su influxdb -c /home/pi/1_subscript.sh
echo "after su"
whoami
service influxdb start

cat /home/pi/1_subscript.sh:

#!/bin/bash
echo "now in sub shell"
whoami
cd /var/lib/influxdb
influx_inspect buildtsi -compact-series-file -datadir ./data -waldir ./wal
exit
echo "exiting sub shell"

cat /etc/passwd|grep infl:

modify influxdb:/bin/bash

done!

Blink-Shell for IOS: change prompt

if you want to change the prompt go to:
-Sessions
–MCPSession.m
edit the Line:
 [_device prompt:@”blink> ” secure:NO shell:YES];

Here you can change the prompt. Rebuild and you are done.

show root-cause for compile-message: Recompile with -Xlint:deprecation for details

if the compile-output shows something like:

Recompile with -Xlint:deprecation for details

Build-Output

Then it is time to get to the details of this message:

in Gradle-scripts/build.gradle (Project) include the following line(s):

tasks.withType(JavaCompile) {
        options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
    }
build.gradle example

When you now run the app the root-cause is shown in the output:

example of build-output

Done