-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
592 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Maintainer: Jean28518@Github | ||
pkgname=linux-assistant | ||
pkgdesc="A daily linux helper with powerful integrated search, routines and checks." | ||
pkgver=0.4.4 | ||
pkgrel=1 | ||
arch=('x86_64') | ||
license=('GPL-3.0-or-later') | ||
|
||
source=("https://github.com/Jean28518/linux-assistant/releases/latest/download/linux-assistant-bundle.zip") | ||
|
||
depends=("libkeybinder3", "wmctrl", "wget", "python", "mesa-utils", "polkit") | ||
|
||
package() { | ||
mkdir -p "$pkgdir/usr/bin" | ||
cp -f "$srcdir/linux-assistant-bundle/linux-assistant.sh" "$pkgdir/usr/bin/linux-assistant" | ||
chmod +x "$srcdir/usr/bin/linux-assistant" | ||
|
||
mkdir -p "$pkgdir/usr/share/polkit-1/actions" | ||
cp -f "$srcdir/linux-assistant-bundle/org.linux-assistant.operations.policy" "$pkgdir/usr/share/polkit-1/actions/org.linux-assistant.operations.policy" | ||
|
||
mkdir -p "$pkgdir/usr/share/applications" | ||
cp -f "$srcdir/linux-assistant-bundle/linux-assistant.desktop" "$pkgdir/usr/share/applications/linux-assistant.desktop" | ||
|
||
mkdir -p "$pkgdir/usr/share/icons/hicolor/256x256/apps" | ||
cp -f "$srcdir/linux-assistant-bundle/linux-assistant.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/linux-assistant.png" | ||
|
||
mkdir -p "$pkgdir/usr/lib/linux-assistant" | ||
cp -r "$srcdir/linux-assistant-bundle/lib" "$pkgdir/usr/lib/linux-assistant/" | ||
cp -r "$srcdir/linux-assistant-bundle/data" "$pkgdir/usr/lib/linux-assistant/" | ||
cp -r "$srcdir/linux-assistant-bundle/additional" "$pkgdir/usr/lib/linux-assistant/" | ||
cp -f "$srcdir/linux-assistant-bundle/version" "$pkgdir/usr/lib/linux-assistant/" | ||
cp -f "$srcdir/linux-assistant-bundle/linux-assistant" "$pkgdir/usr/lib/linux-assistant/" | ||
|
||
|
||
tar -czf "$pkgname-$pkgver-$arch.pkg.tar.gz" -C "$pkgdir" . | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import os | ||
import jessentials | ||
import jfolders | ||
import jfiles | ||
from check_home_folder_rights import check_home_folder_rights | ||
|
||
|
||
|
||
def get_additional_sources(): | ||
# Check if yay is installed | ||
if (jfiles.does_file_exist("/usr/bin/yay")): | ||
# lines = jessentials.run_command("/usr/bin/yay -Q", False, True) | ||
# for line in lines: | ||
# print(f"aurpackage: {line.split(" ")[0]}") | ||
print("yayinstalled") | ||
|
||
def get_available_updates(): | ||
jessentials.run_command("pacman -Sy", False, False, {'DEBIAN_FRONTEND': 'noninteractive'}) | ||
lines = jessentials.run_command("pacman -Qu", False, True) | ||
for line in lines: | ||
print(f"upgradeablepackage: {line}") | ||
|
||
def check_server_access(): | ||
# Check for firewall | ||
if (jfiles.does_file_exist("/usr/sbin/ufw")): | ||
lines = jessentials.run_command("/usr/sbin/iptables -L", False, True) | ||
ufwUserFound = False | ||
for line in lines: | ||
if "ufw-user" in line: | ||
ufwUserFound = True | ||
break | ||
if not ufwUserFound: | ||
print("firewallinactive") | ||
# Check for firewalld | ||
elif (jfiles.does_file_exist("/usr/bin/firewalld")): | ||
lines = jessentials.run_command("/usr/bin/firewall-cmd --list-all", False, True) | ||
if (len(lines) > 1): | ||
pass | ||
else: | ||
print("firewallinactive") | ||
else: | ||
print("nofirewall") | ||
|
||
# Check for Xrdp | ||
lines = jessentials.run_command("/usr/bin/systemctl status xrdp", False, True) | ||
if (len(lines) > 1): | ||
print("xrdprunning") | ||
# Check for ssh: | ||
lines = jessentials.run_command("/usr/bin/systemctl status ssh", False, True) | ||
if (len(lines) > 1): | ||
print("sshrunning") | ||
lines = jessentials.run_command("/usr/bin/systemctl status fail2ban", False, True) | ||
if (len(lines) == 0): | ||
print("fail2bannotrunning") | ||
|
||
if __name__ == "__main__": | ||
jessentials.ensure_root_privileges() | ||
get_additional_sources() | ||
get_available_updates() | ||
check_home_folder_rights(jessentials.get_value_from_arguments("home", "")) | ||
check_server_access() | ||
print("#!script ran successfully.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Build bundle | ||
VERSION="$( cat version )" | ||
|
||
sed -i "s/pkgver=.*/pkgver=\"$VERSION\"/" pkg/PKGBUILD | ||
|
||
makepkg -s --skipchecksums |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
Feature,Flatpak,Debian,Ubuntu,Linux Mint,LMDE,PopOS,MX Linux,Zorin OS,KDE neon,openSUSE,Fedora,Gnome,Xfce,Cinnamon,KDE,Notes | ||
Adabtable dark mode,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes *,yes,yes,yes,"*) depends on window theme,not gtk " | ||
Hotkey handling,yes,yes *,yes *,yes,yes,yes,yes,yes,yes,yes,yes *,yes *,yes,yes,yes,*) only works on wayland with workaround described in #24 | ||
Feedback function,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
Automatic recognition of environment,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes, | ||
App search,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes, | ||
Folder structure search,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes, | ||
Bookmark/Places folder search,yes,-,-,-,-,-,-,-,-,-,-,yes,yes,yes,yes, | ||
Recent file search,yes,-,-,-,-,-,-,-,-,-,-,yes,yes,yes,yes, | ||
Favorite file search,yes,-,-,-,-,-,-,-,-,-,-,no,no,yes,no, | ||
Browser bookmark search,yes,yes,?,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes," Currently works with firefox,chromium and chrome; needs to checked with firefox on snap " | ||
Security check,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes, | ||
Health check,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,,,,, | ||
After installation routine,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes, | ||
Warpinator,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,Only works if flatpak is installed/available in the sources | ||
Nvidia installation,-,(yes),yes,yes,(yes),(yes),(yes),(yes),(yes),no,no,-,-,-,-, | ||
Multimedia codecs installation,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
Timeshift setup,yes,yes,yes,yes,yes,yes,yes,yes *,yes,no,no,-,-,-,-,*) When you start timeshift the welcome dialog with config is started. But the timeshift.json is configured successfully?? | ||
Automatic update setup,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-,integrates on Linux Mint with mintupdate | ||
Update full system (all packages of all pack. man.),yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
Search and installation of system packages,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
General integration of system package manager,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
General integration of flatpak,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
General integration of snapd,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
Recognition of drive space utilization,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,,,,, | ||
Change user passwort dialog,yes,-,-,-,-,-,yes,-,no,-,yes,yes,yes,yes,no, | ||
open system information,yes,-,-,-,-,-,yes,-,no,-,yes,yes,yes,yes,no, | ||
automatic update check & install of linux assistant,no,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
openAdditionalSoftwareSourcesSettings,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes *,-,-,-,-,*) We can only open gnome-software here | ||
Change Power Mode,yes,yes,yes,yes,yes,yes,yes,no,yes,?,yes,-,-,-,-, | ||
Change user profile,yes,-,-,-,yes,-,yes,-,no,-,yes,yes,yes,yes,no, | ||
hardinfo,yes,yes,yes,yes,yes,yes,yes,yes,yes,?,no *,-,-,-,-,*) Fedora does not package hardinfo anymore | ||
redshift,yes,yes,yes,yes,yes,yes,yes,yes,yes,?,yes,yes,yes,yes,yes, | ||
makeCurrentUserToAdministrator,?,yes,yes,yes,yes,yes,yes,yes,yes,?,yes,-,-,-,-, | ||
setupSnapAndInstallSnapStore,?,yes,yes,yes,yes,yes,yes,yes,yes,no,yes,-,-,-,-, | ||
Commands in Searchbar,?,-,-,-,-,-,-,-,-,-,-,yes,yes,yes,yes, | ||
AutomaticRepairOfPackageManager,?,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
Feature,Flatpak,Debian,Ubuntu,Linux Mint,LMDE,PopOS,MX Linux,Zorin OS,KDE neon,openSUSE,Fedora,Arch,Gnome,Xfce,Cinnamon,KDE,Notes | ||
Adabtable dark mode,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes *,yes,yes,yes,"*) depends on window theme,not gtk " | ||
Hotkey handling,yes,yes *,yes *,yes,yes,yes,yes,yes,yes,yes,yes *,yes,yes *,yes,yes,yes,*) only works on wayland with workaround described in #24 | ||
Feedback function,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
Automatic recognition of environment,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes, | ||
App search,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes, | ||
Folder structure search,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes, | ||
Bookmark/Places folder search,yes,-,-,-,-,-,-,-,-,-,-,-,yes,yes,yes,yes, | ||
Recent file search,yes,-,-,-,-,-,-,-,-,-,-,-,yes,yes,yes,yes, | ||
Favorite file search,yes,-,-,-,-,-,-,-,-,-,-,-,no,no,yes,no, | ||
Browser bookmark search,yes,yes,?,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes," Currently works with firefox,chromium and chrome; needs to checked with firefox on snap " | ||
Security check,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes, | ||
Health check,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,,,,, | ||
After installation routine,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes, | ||
Warpinator,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,Only works if flatpak is installed/available in the sources | ||
Nvidia installation,-,(yes),yes,yes,(yes),(yes),(yes),(yes),(yes),no,no,no,-,-,-,-, | ||
Multimedia codecs installation,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
Timeshift setup,yes,yes,yes,yes,yes,yes,yes,yes *,yes,no,no,yes,-,-,-,-,*) When you start timeshift the welcome dialog with config is started. But the timeshift.json is configured successfully?? | ||
Automatic update setup,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,no,-,-,-,-,integrates on Linux Mint with mintupdate | ||
Update full system (all packages of all pack. man.),yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
Search and installation/uninstallation of system packages,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
General integration of system package manager,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
General integration of flatpak,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
General integration of snapd,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,-,-,-,-, | ||
Recognition of drive space utilization,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,,,,, | ||
Change user passwort dialog,yes,-,-,-,-,-,yes,-,no,-,yes,-,yes,yes,yes,no, | ||
open system information,yes,-,-,-,-,-,yes,-,no,-,yes,-,yes,yes,yes,no, | ||
automatic update check & install of linux assistant,no,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,no,-,-,-,-, | ||
openAdditionalSoftwareSourcesSettings,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes *,no,-,-,-,-,*) We can only open gnome-software here | ||
Change Power Mode,yes,yes,yes,yes,yes,yes,yes,no,yes,?,yes,yes,-,-,-,-, | ||
Change user profile,yes,-,-,-,yes,-,yes,-,no,-,yes,-,yes,yes,yes,no, | ||
hardinfo,yes,yes,yes,yes,yes,yes,yes,yes,yes,?,no *,no *,-,-,-,-,*) Fedora and arch do not have package hardinfo anymore | ||
redshift,yes,yes,yes,yes,yes,yes,yes,yes,yes,?,yes,no *,yes,yes,yes,yes,*) Does only work with further complicated setup. | ||
makeCurrentUserToAdministrator,?,yes,yes,yes,yes,yes,yes,yes,yes,?,yes,yes,-,-,-,-, | ||
setupSnapAndInstallSnapStore,?,yes,yes,yes,yes,yes,yes,yes,yes,no,yes,yes,-,-,-,-, | ||
Commands in Searchbar,?,-,-,-,-,-,-,-,-,-,-,-,yes,yes,yes,yes, | ||
AutomaticRepairOfPackageManager,?,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,no,-,-,-,-, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.