Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic programs versions and firewall status #54

Merged
merged 2 commits into from
Sep 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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