Skip to content

Commit

Permalink
Merge pull request #54 from MaanooAk/master
Browse files Browse the repository at this point in the history
Basic programs versions and firewall status
  • Loading branch information
MaanooAk authored Sep 26, 2018
2 parents cb21cbb + 903e5db commit 4d99c51
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ PYTHON := $(shell command -v python3 > /dev/null && echo python3 || echo python)
run:
@$(PYTHON) -m genume

.phony: sudorun
sudorun:
@sudo $(PYTHON) -m genume

.phony: lint
lint:
@$(PYTHON) -m compileall -fq genume
Expand Down
2 changes: 1 addition & 1 deletion genume/view/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def main():

# Sizes
WIDTH = 650
HEIGHT = 400
HEIGHT = 425


class MainWindow(Gtk.Window):
Expand Down
34 changes: 34 additions & 0 deletions scripts/software/apps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash


# check for a app and if exists provide the version
function check {
name=$1
version=$2

# add the prefix app_ to every entry
key="app_$name"

if command -v "$name" > /dev/null; then

echo VALUE BAS "$key" \"$($name $version 2>&1 | head -n1)\"
else
echo VALUE BAS "$key" \""<not found>"\"
fi
}


check "bash" "-version"
check "make" "--version"
check "git" "--version"

check "gnome-software" "--version"

check "gcc" "--version"
check "java" "-version"
check "python" "-V"
check "mysql" "--version"
check "freedom" "-version"

# TODO extend

19 changes: 19 additions & 0 deletions scripts/software/firewall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# check for root user
if [ "$EUID" -ne 0 ]; then

echo VALUE BAS firewall \""<requires root>"\"

else

# TODO extend

status=$(sudo ufw status verbose)

active=$(echo "$status" | grep Status: | cut -d " " -f 2)

echo VALUE BAS firewall \"$active\"

fi

0 comments on commit 4d99c51

Please sign in to comment.