From a42ec680ff49d114beeb0bfcc87c04df3545623e Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Thu, 16 Jan 2025 13:25:21 +0500 Subject: [PATCH] Update --- skel/.config/autostart/dnscrypt.sh.desktop | 8 ++++++++ skel/.config/autostart/key-sign.sh.desktop | 2 +- skel/.config/autostart/reset-layout.desktop | 2 +- .../autostart/set-default-web-browser.desktop | 2 +- skel/.config/autostart/tor.sh.desktop | 8 ++++++++ skel/.config/autostart/tuned.sh.desktop | 8 ++++++++ skel/.local/bin/dnscrypt.sh | 15 +++++++++++++++ skel/.local/bin/tor.sh | 15 +++++++++++++++ skel/.local/bin/tuned.sh | 16 ++++++++++++++++ 9 files changed, 73 insertions(+), 3 deletions(-) create mode 100755 skel/.config/autostart/dnscrypt.sh.desktop create mode 100755 skel/.config/autostart/tor.sh.desktop create mode 100755 skel/.config/autostart/tuned.sh.desktop create mode 100755 skel/.local/bin/dnscrypt.sh create mode 100755 skel/.local/bin/tor.sh create mode 100755 skel/.local/bin/tuned.sh diff --git a/skel/.config/autostart/dnscrypt.sh.desktop b/skel/.config/autostart/dnscrypt.sh.desktop new file mode 100755 index 0000000..d4d958b --- /dev/null +++ b/skel/.config/autostart/dnscrypt.sh.desktop @@ -0,0 +1,8 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Exec=/bin/sh -c '~/.local/bin/dnscrypt.sh' +Icon= +Name=dnscrypt.sh +Path= +Terminal=false +Type=Application diff --git a/skel/.config/autostart/key-sign.sh.desktop b/skel/.config/autostart/key-sign.sh.desktop index 6d1ce2f..9649c9e 100755 --- a/skel/.config/autostart/key-sign.sh.desktop +++ b/skel/.config/autostart/key-sign.sh.desktop @@ -1,6 +1,6 @@ #!/usr/bin/env xdg-open [Desktop Entry] -Exec=/usr/bin/konsole -e ~/.local/bin/key-sign.sh +Exec=/usr/bin/konsole -e '~/.local/bin/key-sign.sh' Icon= Name=key-sign.sh Path= diff --git a/skel/.config/autostart/reset-layout.desktop b/skel/.config/autostart/reset-layout.desktop index 9846241..34be344 100755 --- a/skel/.config/autostart/reset-layout.desktop +++ b/skel/.config/autostart/reset-layout.desktop @@ -1,6 +1,6 @@ #!/usr/bin/env xdg-open [Desktop Entry] -Exec=/usr/bin/bash ~/.local/bin/reset-layout.sh +Exec=/bin/sh -c '~/.local/bin/reset-layout.sh' Icon= Name=reset-layout.sh Path= diff --git a/skel/.config/autostart/set-default-web-browser.desktop b/skel/.config/autostart/set-default-web-browser.desktop index 17cd7a0..c5b4012 100755 --- a/skel/.config/autostart/set-default-web-browser.desktop +++ b/skel/.config/autostart/set-default-web-browser.desktop @@ -1,6 +1,6 @@ #!/usr/bin/env xdg-open [Desktop Entry] -Exec=/usr/bin/bash ~/.local/bin/set-default-web-browser.sh +Exec=/bin/sh -c '~/.local/bin/set-default-web-browser.sh' Icon= Name=set-default-web-browser.sh Path= diff --git a/skel/.config/autostart/tor.sh.desktop b/skel/.config/autostart/tor.sh.desktop new file mode 100755 index 0000000..8839050 --- /dev/null +++ b/skel/.config/autostart/tor.sh.desktop @@ -0,0 +1,8 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Exec=/bin/sh -c '~/.local/bin/tor.sh' +Icon= +Name=tor.sh +Path= +Terminal=false +Type=Application diff --git a/skel/.config/autostart/tuned.sh.desktop b/skel/.config/autostart/tuned.sh.desktop new file mode 100755 index 0000000..7e32e96 --- /dev/null +++ b/skel/.config/autostart/tuned.sh.desktop @@ -0,0 +1,8 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Exec=/bin/sh -c '~/.local/bin/tuned.sh' +Icon= +Name=tuned.sh +Path= +Terminal=false +Type=Application diff --git a/skel/.local/bin/dnscrypt.sh b/skel/.local/bin/dnscrypt.sh new file mode 100755 index 0000000..9d84a33 --- /dev/null +++ b/skel/.local/bin/dnscrypt.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [[ "$UID" != 0 ]]; then + echo "USER NOT ROOT" + sudo "$0" + exit +else + echo "USER IS ROOT" +fi + +$status=$(systemctl status dnscrypt-proxy.service) + +if [[ "$status" != 0 ]]; then + systemctl restart dnscrypt-proxy.service +fi diff --git a/skel/.local/bin/tor.sh b/skel/.local/bin/tor.sh new file mode 100755 index 0000000..f35e566 --- /dev/null +++ b/skel/.local/bin/tor.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [[ "$UID" != 0 ]]; then + echo "USER NOT ROOT" + sudo "$0" + exit +else + echo "USER IS ROOT" +fi + +$status=$(systemctl status tor) + +if [[ "$status" != 0 ]]; then + systemctl restart tor +fi diff --git a/skel/.local/bin/tuned.sh b/skel/.local/bin/tuned.sh new file mode 100755 index 0000000..b7db89c --- /dev/null +++ b/skel/.local/bin/tuned.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [[ "$UID" != 0 ]]; then + echo "USER NOT ROOT" + sudo "$0" + exit +else + echo "USER IS ROOT" +fi + +$status=$(systemctl status tuned tuned-ppd) + +if [[ "$status" != 0 ]]; then + systemctl restart tuned tuned-ppd +# systemctl --user restart plasma-plasmashell +fi