1
0
Fork 0
mirror of https://github.com/sbrl/cloudcatcher.git synced 2018-01-26 00:52:31 +00:00

Minor bugfixes

This commit is contained in:
Starbeamrainbowlabs 2018-01-06 19:33:37 +00:00
parent 6c68107e5a
commit 0f423543cc
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 8 additions and 4 deletions

View file

@ -9,6 +9,7 @@
# ███████ ███████ ██ ██████ ██ #
#############################################
own_dir="${BASH_SOURCE%/*}/";
tmpdir="$(mktemp --directory --suffix -cloudcatcher)/";
##########################
@ -65,7 +66,7 @@ uname -r >${tmpdir}kernel-version.txt &
# Uptime
uptime --pretty | sed -e 's/up //' >${tmpdir}uptime.txt &
# Current ips
ip addr show scope global | awk -f ./parse_interface_ips.awk >${tmpdir}ips.txt &
ip addr show scope global | awk -f "${own_dir}/parse_interface_ips.awk" >${tmpdir}ips.txt &
# Load
cat /proc/loadavg | cut -d' ' -f 2 >${tmpdir}load.txt &

View file

@ -1,16 +1,19 @@
#!/usr/bin/env bash
### Settings ###
own_dir="${BASH_SOURCE%/*}/";
logo_filename="logo.txt";
info_filename=$(mktemp --suffix -cloudcatcher);
if [ -f .cloudcatcher-settings ]; then
source .cloudcatcher-settings;
if [ -f "${own_dir}.cloudcatcher-settings" ]; then
source "${own_dir}.cloudcatcher-settings";
fi
################
./cloudcatcher-info.sh >${info_filename}
${own_dir}cloudcatcher-info.sh >${info_filename}
### Output ###
echo