Compare commits
44 Commits
981f24ec8e
...
master
Author | SHA1 | Date | |
---|---|---|---|
c786299e91 | |||
d9b6d6b3c5 | |||
7a23304c9c | |||
eeecf8df23 | |||
5f289995ba | |||
5542e2ab9a | |||
43cca1cb99 | |||
e2de8ac908 | |||
da2f64b165 | |||
ddbd422e11 | |||
7e9f60c3ec | |||
84a19253c0 | |||
d1e9c221a3 | |||
86c1d119e1 | |||
d1474f7522 | |||
ff60ec22e5 | |||
c82ab68762 | |||
9774c9bccb | |||
e0156f36d9 | |||
48238e0c69 | |||
ccb3595db7 | |||
75e0782e01 | |||
d1bc6670fc | |||
a488e9c456 | |||
823e728a8d | |||
932ba2906c | |||
841ee333cf | |||
97e883237d | |||
143e9bb6fb | |||
86bc1b0a7d | |||
d374017931 | |||
a40728af77 | |||
56b71c6f61 | |||
8da16f9de6 | |||
26c0e76abc | |||
777ce925d8 | |||
a84a159552 | |||
898d0c1d5c | |||
eed18bf679 | |||
cf87160b26 | |||
b97f6b0229 | |||
2eb31d7a7b | |||
61639c60a5 | |||
4a51a06fae |
36
88x2bu.sh
Executable file
36
88x2bu.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
GITHUB_REPO="https://github.com/RinCat/RTL88x2BU-Linux-Driver.git"
|
||||
TEMPDIR="/tmp"
|
||||
|
||||
|
||||
dependencies_(){
|
||||
if [ -f /usr/bin/dnf ];then
|
||||
dnf install make kernel-devel git
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
clone_(){
|
||||
if [ ! -d "${TEMPDIR}"/88xbu ];then
|
||||
git clone "${GITHUB_REPO}" "${TEMPDIR}"/88xbu
|
||||
fi
|
||||
}
|
||||
|
||||
build_(){
|
||||
if [ -d "${TEMPDIR}"/88xbu ];then
|
||||
cd "${TEMPDIR}"/88xbu
|
||||
make clean
|
||||
make "${1}"
|
||||
make install
|
||||
else
|
||||
echo "${TEMPDIR}/88xbu does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
dependencies_
|
||||
clone_
|
||||
build_ "${1}"
|
2
aping.sh
2
aping.sh
@@ -87,7 +87,7 @@ withoutLoop(){
|
||||
elif [ $? = "1" ];then
|
||||
|
||||
if [ "${play_sound}" = "true" ];then
|
||||
${sound_player} ${player_opts} ${sound_file} "${sound_message}" &
|
||||
${sound_player} "${player_opts}" "${sound_file}" "${sound_message}" &
|
||||
fi
|
||||
|
||||
|
||||
|
66
billpay.sh
Executable file
66
billpay.sh
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
|
||||
electricBill="https://login.auth.aps.com/apsprodb2c.onmicrosoft.com/oauth2/v2.0/authorize?p=b2c_1a_aps_paassitecoresignin&response_type=code&client_id=874546d6-0a39-4299-b663-68cd9346f21f&redirect_uri=https://www.aps.com/authorization/loginredirect&scope=https://APSPRODB2C.onmicrosoft.com/APSBusinessAPI/user_impersonation%20offline_access%20openid&nonce=f0984d65-2e3a-479c-9bdb-3ad6ca7ef21c&response_mode=form_post&resource=%20https%3A%2F%2FAPSPRODB2C.onmicrosoft.com%2FAPSBusinessAPI"
|
||||
gasBill="https://uesaz.com"
|
||||
internetBill="https://customer.sparklight.com/securelogin/login.aspx"
|
||||
waterBill="https://xpressbillpay.com/"
|
||||
|
||||
main_menu(){
|
||||
PS3="Enter a number: "
|
||||
select bill in Electric Gas Internet Water
|
||||
do
|
||||
|
||||
case "${REPLY}" in
|
||||
1) xdg-open "${electricBill}"
|
||||
;;
|
||||
|
||||
2) xdg-open "${gasBill}"
|
||||
;;
|
||||
|
||||
3) xdg-open "${internetBill}"
|
||||
;;
|
||||
|
||||
4) xdg-open "${waterBill}"
|
||||
;;
|
||||
|
||||
q) exit 0
|
||||
;;
|
||||
|
||||
*) echo "Please choose an existing option"
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
case "${1}" in
|
||||
|
||||
-e) xdg-open "${electricBill}"
|
||||
;;
|
||||
|
||||
-g) xdg-open "${gasBill}"
|
||||
;;
|
||||
|
||||
-i) xdg-open "${internetBill}"
|
||||
;;
|
||||
|
||||
-w) xdg-open "${waterBill}"
|
||||
;;
|
||||
|
||||
-h|--help|help)
|
||||
|
||||
echo """
|
||||
$0 [-e] [-g] [-i] [-w]
|
||||
|
||||
-e Electric bill
|
||||
-g Gas bill
|
||||
-i Internet bill
|
||||
-w Water bill
|
||||
"""
|
||||
;;
|
||||
|
||||
*) main_menu
|
||||
;;
|
||||
|
||||
esac
|
44
config
44
config
@@ -1,8 +1,3 @@
|
||||
Host gitbutter-server
|
||||
HostName gitbutter.pw
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host jsearch.pw
|
||||
HostName jsearch.pw
|
||||
User mollusk
|
||||
@@ -23,7 +18,42 @@ Host void-ryzen
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host gitea
|
||||
Host gitbutter.xyz
|
||||
HostName gitbutter.xyz
|
||||
User git
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host zolfite.net
|
||||
HostName zolfite.net
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host cloud.zolfite.net
|
||||
HostName cloud.zolfite.net
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host mooretalk.live
|
||||
HostName mooretalk.live
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host sickstream.net
|
||||
HostName sickstream.net
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host nightcrew.rip
|
||||
HostName nightcrew.rip
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host gitea-server
|
||||
HostName gitbutter.xyz
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
||||
Host pihole
|
||||
HostName 192.168.1.200
|
||||
User mollusk
|
||||
IdentityFile ~/.ssh/thinkpadt420
|
||||
|
82
d2-setup.sh
82
d2-setup.sh
@@ -1,27 +1,65 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
BWHITE="\e[1m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Wine Prefix Environment
|
||||
PREFIX="/home/$USER/diablo"
|
||||
ARCH="win32"
|
||||
|
||||
|
||||
notice(){
|
||||
echo -e "${YELLOW}NOTICE: Currently you must move & rename the installer directories to the following: ${NC}\n"
|
||||
echo -e "${LCYAN}Base Game: ${HOME}/D2${NC}"
|
||||
echo -e "${LCYAN}Expansion: ${HOME}/LOD${NC}"
|
||||
echo -e "${YELLOW}\nThen run this script with the following option:${NC}"
|
||||
echo -e "${LCYAN}${0} -a${NC}"
|
||||
echo -e "${YELLOW}\nThe script will then kick off the process of grabbing debs, setting the prefix and installing the game.${NC}"
|
||||
echo -e "${YELLOW}User intervention is required to click through the installer setups${NC}"
|
||||
}
|
||||
|
||||
installD2(){
|
||||
notice
|
||||
read -n 1 -p "~~~~~~ Press enter to continue ~~~~~~"
|
||||
|
||||
D2_INSTALLER_PATH="/home/$USER/D2"
|
||||
|
||||
echo -e "\nInstalling Diablo II...\n"
|
||||
echo -e "\n${LGREEN}Installing Diablo II...${NC}\n"
|
||||
|
||||
if [ ! -d "${D2_INSTALLER_PATH}" ];then
|
||||
echo -e "${D2_INSTALLER_PATH} not found, edit script and set correct path\n"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
cd ${D2_INSTALLER_PATH}
|
||||
cd "${D2_INSTALLER_PATH}" || exit 1
|
||||
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine Installer.exe
|
||||
|
||||
}
|
||||
|
||||
installLOD(){
|
||||
|
||||
notice
|
||||
read -n 1 -p "~~~~~~ Press enter to continue ~~~~~~"
|
||||
|
||||
LOD_INSTALLER_PATH="/home/$USER/LOD"
|
||||
|
||||
echo -e "\nInstalling Diablo II: Lord of Destruction...\n"
|
||||
@@ -31,7 +69,7 @@ installLOD(){
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
cd ${LOD_INSTALLER_PATH}
|
||||
cd "${LOD_INSTALLER_PATH}" || exit 1
|
||||
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine Installer.exe
|
||||
}
|
||||
@@ -60,20 +98,20 @@ getTricks(){
|
||||
|
||||
getGlide(){
|
||||
if [ ! -f /tmp/gl32ogl14e.zip ];then
|
||||
cd /tmp
|
||||
cd /tmp || exit 1
|
||||
wget http://www.svenswrapper.de/gl32ogl14e.zip
|
||||
|
||||
unzip gl32ogl14e.zip
|
||||
|
||||
echo -e "\nCopying Files to Diablo game directory...\n"
|
||||
|
||||
cp -v {glide-init.exe,glide3x.dll} ${PREFIX}/drive_c/"Program Files"/"Diablo II"/
|
||||
cp -v {glide-init.exe,glide3x.dll} "${PREFIX}/drive_c/Program Files/Diablo II/"
|
||||
|
||||
echo -e "\nCleaning up temp files...\n"
|
||||
|
||||
rm {glide-readme.txt,glide-liesmich.txt,glide-init.exe,glide3x.dll,gl32ogl14e.zip}
|
||||
|
||||
cd ${PREFIX}/drive_c/"Program Files"/"Diablo II"/
|
||||
cd "${PREFIX}/drive_c/"Program Files"/"Diablo II"/" || exit 1
|
||||
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine glide-init.exe
|
||||
|
||||
@@ -82,21 +120,34 @@ getGlide(){
|
||||
}
|
||||
runGame(){
|
||||
|
||||
cd ${PREFIX}/drive_c/"Program Files"/"Diablo II"/
|
||||
cd "${PREFIX}/drive_c/Program Files/Diablo II/" || exit 1
|
||||
|
||||
|
||||
echo -n -e "\nRun game now?(Y/n): "
|
||||
read choice
|
||||
echo -n -e "\n${LGREEN}Run game now?(Y/n): ${NC}"
|
||||
read -r choice
|
||||
|
||||
if [ "${choice}" = "n" ];then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine "Diablo II.exe" "-3dfx"
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine "Diablo II.exe" " -3dfx"
|
||||
|
||||
|
||||
}
|
||||
|
||||
run_glide(){
|
||||
|
||||
|
||||
cd "${PREFIX}/drive_c/Program Files/Diablo II/" || exit 1
|
||||
|
||||
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine "glide-init.exe"
|
||||
|
||||
}
|
||||
|
||||
run_tricks(){
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" winetricks "${1}" "${2}"
|
||||
}
|
||||
runWinecfg(){
|
||||
WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" winecfg
|
||||
}
|
||||
@@ -131,6 +182,15 @@ case "${1}" in
|
||||
cfg|-c)
|
||||
runWinecfg
|
||||
;;
|
||||
|
||||
rg| --run-glide)
|
||||
run_glide
|
||||
;;
|
||||
|
||||
tricks)
|
||||
run_tricks "${1}" "${2}"
|
||||
;;
|
||||
|
||||
all|-a)
|
||||
getDeps
|
||||
installD2
|
||||
@@ -144,4 +204,4 @@ case "${1}" in
|
||||
echo -e "\nUsage: $0 [-a] [all] [-p] [play] [-gt] [gettricks] [-gd] [getdeps] [getglide] [-gg] [id2] [--install-d2] [ilod] [--install-lod]\n"
|
||||
;;
|
||||
|
||||
esac
|
||||
esac
|
||||
|
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
KEYFILE="/home/${USER}/.ssh/github_key"
|
||||
|
||||
eval "$(ssh-agent -s)"
|
||||
ssh-add ${KEYFILE}
|
13
flatjerk.sh
13
flatjerk.sh
@@ -37,11 +37,14 @@ addFlatpakRepo(){
|
||||
}
|
||||
|
||||
getPackages(){
|
||||
printf "\nInstalling Gradio..\n"
|
||||
flatpak install flathub de.haeckerfelix.gradio
|
||||
echo -e "\nInstalling Shortwave..\n"
|
||||
flatpak install flathub shortwave -y
|
||||
|
||||
printf "\nInstalling Adapta Theme...\n"
|
||||
echo -e "\nInstalling Adapta Theme...\n"
|
||||
flatpak install flathub org.gtk.Gtk3theme.Adapta-Nokto-Eta
|
||||
|
||||
echo -e "Installing Bitwarden...\n"
|
||||
flatpak install flathub bitwarden -y
|
||||
}
|
||||
|
||||
helpFile(){
|
||||
@@ -61,4 +64,8 @@ case ${1} in
|
||||
addFlatpakRepo
|
||||
getPackages
|
||||
;;
|
||||
|
||||
-r)
|
||||
addFlatpakRepo
|
||||
;;
|
||||
esac
|
51
genswap.sh
51
genswap.sh
@@ -57,28 +57,29 @@ function autoSwap(){
|
||||
read markswap
|
||||
|
||||
if [ "${markswap}" = "n" ] || [ "${markswap}" = "N" ];then
|
||||
echo "\n${LCYAN}Not making ${SWAPPATH}/${SWAPFILE} as swap...${NC}\n"
|
||||
echo -e "\n${LCYAN}Not making ${SWAPPATH}/${SWAPFILE} as swap...${NC}\n"
|
||||
else
|
||||
|
||||
echo -e "\n${LCYAN}Marking ${SWAPPATH}${SWAPNAME} as swap...\n\n${NC}"
|
||||
mkswap ${SWAPPATH}${SWAPNAME}
|
||||
|
||||
echo -e "${LCYAN}Enabling Swap file for use...${NC}\n"
|
||||
swapon ${SWAPPATH}${SWAPNAME}
|
||||
fi
|
||||
|
||||
echo -e "\n${LCYAN}Marking ${SWAPPATH}${SWAPNAME} as swap...\n\n${NC}"
|
||||
mkswap ${SWAPPATH}${SWAPNAME}
|
||||
|
||||
echo -e "${LCYAN}Enabling Swap file for use...${NC}\n"
|
||||
swapon ${SWAPPATH}${SWAPNAME}
|
||||
|
||||
echo -e -n "\n${YELLOW}Do you want to add swapfile to fstab?(Y/n): ${NC}"
|
||||
read addfstab
|
||||
|
||||
if [ "${addfstab}" = "n" ];then
|
||||
if [ "${addfstab}" = "n" ] || [[ "${addfstab}" = "N" ]];then
|
||||
echo -e "\n${LCYAN} Not adding ${SWAPPATH}${SWAPNAME} to fstab${NC}\n"
|
||||
else
|
||||
|
||||
echo -e "\n${LCYAN}Creating backup of /etc/fstab ...\n${NC}"
|
||||
cp -v /etc/fstab /etc/fstab.bak
|
||||
|
||||
|
||||
echo -e "${LCYAN}Adding ${SWAPPATH}${SWAPNAME} to /etc/fstab ..\n${NC}"
|
||||
echo "${SWAPPATH}${SWAPNAME} none swap sw 0 0" | sudo tee -a /etc/fstab
|
||||
fi
|
||||
|
||||
echo -e "\n${LCYAN}Creating backup of /etc/fstab ...\n${NC}"
|
||||
cp -v /etc/fstab /etc/fstab.bak
|
||||
|
||||
echo -e "${LCYAN}Adding ${SWAPPATH}${SWAPNAME} to /etc/fstab ..\n${NC}"
|
||||
echo "${SWAPPATH}${SWAPNAME} none swap sw 0 0" | sudo tee -a /etc/fstab
|
||||
|
||||
CHECKFSTAB=$(cat /etc/fstab | grep "swap" | gawk '/swap/{print $1}')
|
||||
|
||||
if [ "${CHECKFSTAB}" != "/swapfile" ];then
|
||||
@@ -87,18 +88,8 @@ function autoSwap(){
|
||||
else
|
||||
echo -e "${LGREEN}Swap successfully added to /etc/fstab! Reboot to verify success...${NC}\n"
|
||||
|
||||
echo -e "${YELLOW}Do you want to reboot your system now?(n/Y): ${NC}"
|
||||
read rebootCheck
|
||||
|
||||
if [ "${rebootCheck}" = "y" ] || [ "${rebootCheck}" = "Y" ];then
|
||||
echo -e "${LRED}Rebooting system in 3 seconds...${NC}\n"
|
||||
|
||||
sleep 3
|
||||
|
||||
sudo reboot
|
||||
else
|
||||
echo -e "\n${LGREEN}Swapfile setup complete, setting swappiness level...${NC}\n"
|
||||
fi
|
||||
echo -e "\n${LGREEN}Swapfile setup complete, setting swappiness level...${NC}\n"
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -176,7 +167,7 @@ liveSwappiness(){
|
||||
echo -e "${LGREEN}${CURRENTSWAPPINESS}${NC}\n"
|
||||
}
|
||||
|
||||
function help(){
|
||||
function helpFile(){
|
||||
echo -e "\nUsage: $0 [-a] [--auto] [-s] [--swappiness]\n\n"
|
||||
echo -e "-a | --auto Automatically create and size swapfile based on physical memory\n"
|
||||
echo -e "-ss | --set-swappiness Set the swappiness value to minimize swap usage\n\n"
|
||||
@@ -222,6 +213,6 @@ case "${1}" in
|
||||
;;
|
||||
|
||||
*)
|
||||
help
|
||||
helpFile
|
||||
;;
|
||||
esac
|
||||
|
21
insanity.py
Executable file
21
insanity.py
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
from time import sleep
|
||||
timer = 0.000001
|
||||
num = 100000 ** 1000
|
||||
print(num)
|
||||
while True:
|
||||
# Even Number
|
||||
if (num % 2) == 0:
|
||||
num = num // 2
|
||||
print(num)
|
||||
sleep(timer)
|
||||
else:
|
||||
# Odd Number
|
||||
num = num * 3 + 1
|
||||
print(num)
|
||||
sleep(timer)
|
||||
|
||||
if num == 1:
|
||||
exit(0)
|
||||
|
16
mkuser.sh
16
mkuser.sh
@@ -6,14 +6,14 @@ Create_user(){
|
||||
|
||||
echo
|
||||
echo -n "Username: "
|
||||
read uname
|
||||
read -r uname
|
||||
|
||||
echo "Additional Groups: "
|
||||
echo
|
||||
echo "[1] - Arch Linux Defaults"
|
||||
echo "[2] - Void Linux Defaults"
|
||||
echo "[3] - Custom"
|
||||
read dgroups
|
||||
read -r dgroups
|
||||
|
||||
if [ "${dgroups}" = "1" ];then
|
||||
addgroups="power, wheel, optical network, video, audio, storage"
|
||||
@@ -21,16 +21,16 @@ Create_user(){
|
||||
addgroups="disk,wheel,storage,audio,video,optical,lp,network,dbus,xbuilder"
|
||||
elif [ "${dgroups}" = "3" ];then
|
||||
echo -n "Enter desired groups (comma separated): "
|
||||
read custgroups
|
||||
read -r custgroups
|
||||
addgroups="${custgroups}"
|
||||
fi
|
||||
echo "${addgroups}"
|
||||
read -n 1 -p "wait"
|
||||
useradd -m -g users -G "${addgroups}" -s /bin/bash ${uname}
|
||||
read -r -n 1 -p "wait"
|
||||
useradd -m -g users -G "${addgroups}" -s /bin/bash "${uname}"
|
||||
passwd "${uname}"
|
||||
echo
|
||||
|
||||
if [ -d /home/${uname} ];then
|
||||
if [ -d /home/"${uname}" ];then
|
||||
echo "User ${uname} created"
|
||||
else
|
||||
echo "User creation failed"
|
||||
@@ -40,7 +40,7 @@ Create_user(){
|
||||
Remove_user(){
|
||||
echo
|
||||
echo -n "Username to delete: "
|
||||
read duser
|
||||
read -r duser
|
||||
|
||||
userdel ${duser}
|
||||
if [ -d /home/${duser} ];then
|
||||
@@ -59,7 +59,7 @@ main(){
|
||||
echo "[2] - Remove User"
|
||||
echo
|
||||
echo -n "Choose: "
|
||||
read choice
|
||||
read -r choice
|
||||
|
||||
|
||||
if [ "${choice}" = "1" ];then
|
||||
|
10
noagendastream.sh
Executable file
10
noagendastream.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
if [ -f /usr/bin/mpv ];then
|
||||
mpv "http://listen.noagendastream.com/noagenda"
|
||||
elif [ -f "/usr/bin/vlc" ];then
|
||||
vlc "http://listen.noagendastream.com/noagenda"
|
||||
else [ -f "/usr/bin/xdg-open" ];then
|
||||
xdg-open "http://listen.noagendastream.com/noagenda"
|
||||
fi
|
12
parlink.sh
12
parlink.sh
@@ -47,7 +47,7 @@ PARSEC_BIN="/usr/bin/parsecd"
|
||||
PARSEC_ARGS="app_daemon=1"
|
||||
PARSEC_URL="https://parsecgaming.com"
|
||||
PARSEC_PROCESS=$(ps -A | grep -c parsecd)
|
||||
|
||||
AUTO_RESTART=true
|
||||
###########################################
|
||||
set_video_driver(){
|
||||
declare -a driver_name
|
||||
@@ -102,9 +102,11 @@ start_parsec(){
|
||||
while [[ ${PARSEC_PROCESS} != "1" ]];do
|
||||
if [[ ! -f ${PARSEC_BIN} ]];then
|
||||
xdg-open ${PARSEC_URL}
|
||||
elif [[ "${1}" = "-b" ]];then
|
||||
fi
|
||||
|
||||
if [[ "${AUTO_RESTART}" = false ]];then
|
||||
${PARSEC_BIN} ${PARSEC_ARGS}
|
||||
break
|
||||
exit
|
||||
|
||||
else
|
||||
${PARSEC_BIN} ${PARSEC_ARGS}
|
||||
@@ -120,9 +122,9 @@ case "${1}" in
|
||||
|
||||
if [[ ! -z "${2}" ]];then
|
||||
set_video_driver "${2}"
|
||||
start_parsec "-b"
|
||||
start_parsec
|
||||
else
|
||||
start_parsec "-b"
|
||||
start_parsec
|
||||
fi
|
||||
;;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
audio_quality = {high, medium, low}
|
||||
#autostart_station = stationid
|
||||
|
||||
password = guitar
|
||||
password = %4*dxXKQf9AmF5
|
||||
user = silvernode@gmail.com
|
||||
|
@@ -1,45 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
pkgname="master"
|
||||
pkgurl="git@github.com:cilynx/rtl88x2bu/${pkgname}.zip"
|
||||
installcmd="dnf install"
|
||||
installcmdextra="dnf group install"
|
||||
pkgdeps="wget unzip dnsmasq hostapd bc dkms kernel-headers rsync"
|
||||
pkgdepsextra='"Development Tools"'
|
||||
tmpdir="/tmp"
|
||||
pkgname="rtl88x2bu-git"
|
||||
pkgurl="https://github.com/RinCat/RTL88x2BU-Linux-Driver.git"
|
||||
tmpdir="/usr/src"
|
||||
|
||||
_fetch_deps(){
|
||||
${installcmd} ${pkgdeps}
|
||||
${installcmdextra} ${pkgdepsextra}
|
||||
if [ -f /usr/bin/apt ];then
|
||||
sudo apt install git dnsmasq hostapd bc build-essential dkms wget unzip rsync
|
||||
|
||||
elif [ -f /usr/bin/dnf ];then
|
||||
sudo dnf group install "Development Tools"
|
||||
sudo dnf install unzip dnsmasq hostapd bc dkms kernel-headers rsync wget
|
||||
else
|
||||
echo "No supported package manager"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
_download(){
|
||||
if [ ! -f ${tmpdir}/${pkgname}.zip ];then
|
||||
wget ${pkgurl} -P ${tmpdir}
|
||||
if [ ! -d "${tmpdir}"/"${pkgname}" ];then
|
||||
sudo git clone "${pkgurl}" "${tmpdir}"/"${pkgname}"
|
||||
fi
|
||||
}
|
||||
|
||||
_extract(){
|
||||
if [ -f $(which unzip) ];then
|
||||
cd ${tmpdir}
|
||||
unzip ${pkgname}.zip
|
||||
else
|
||||
echo "Install unzip"
|
||||
fi
|
||||
|
||||
_apply_patch(){
|
||||
wget "https://github.com/cilynx/rtl88x2bu/pull/58.patch"
|
||||
git apply 58.patch
|
||||
}
|
||||
|
||||
_install(){
|
||||
cd ${tmpdir}/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959-master
|
||||
VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)
|
||||
rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
|
||||
dkms add -m rtl88x2bu -v ${VER}
|
||||
dkms build -m rtl88x2bu -v ${VER}
|
||||
dkms install -m rtl88x2bu -v ${VER}
|
||||
sed -i 's/PACKAGE_VERSION="@PKGVER@"/PACKAGE_VERSION="git"/g' /usr/src/rtl88x2bu-git/dkms.conf
|
||||
sudo dkms add -m rtl88x2bu -v git
|
||||
sudo dkms autoinstall
|
||||
sudo modprobe 88x2bu
|
||||
}
|
||||
|
||||
_fetch_deps
|
||||
_download
|
||||
_extract
|
||||
_install
|
||||
_install
|
||||
|
14
steamloop.sh
Executable file
14
steamloop.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Running Steam in Wine causes Steam on Linux to lose connection
|
||||
# This makes it hard to use Steam link if Steam has to be closed to reset
|
||||
# This script just reopens Steam on the host so that Steam link can reconnect.
|
||||
|
||||
while true;do
|
||||
|
||||
if [ -z "$(pidof steam)" ];then
|
||||
sleep 10s
|
||||
/usr/bin/steam
|
||||
fi
|
||||
|
||||
done
|
159
svc.sh
159
svc.sh
@@ -17,20 +17,25 @@
|
||||
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
##############################################################################################
|
||||
|
||||
RED='\033[0;31m'
|
||||
LRED="\033[1;31m"
|
||||
BLUE="\033[0;34m"
|
||||
LBLUE="\033[1;34m"
|
||||
GREEN="\033[0;32m"
|
||||
LGREEN="\033[1;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
CYAN="\033[0;36m"
|
||||
LCYAN="\033[1;36m"
|
||||
PURPLE="\033[0;35m"
|
||||
LPURPLE="\033[1;35m"
|
||||
BWHITE="\e[1m"
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
|
||||
if [[ -f "/usr/bin/sv " ]];then
|
||||
serviceManager="runit"
|
||||
echo -e "${LGREEN}Detected Runit${NC}\n"
|
||||
elif [[ -f "/usr/bin/systemctl" ]];then
|
||||
serviceManager="systemd"
|
||||
echo -e "${LGREEN}Detected SystemD${NC}\n"
|
||||
else
|
||||
echo -e "${LRED}no supported service manager found${NC}\n"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
help(){
|
||||
printf """
|
||||
svc - Service Commander - frontend for the sv command
|
||||
@@ -53,49 +58,113 @@ up Show status of running services
|
||||
"""
|
||||
}
|
||||
|
||||
case $1 in
|
||||
runit(){
|
||||
case $1 in
|
||||
|
||||
enable | --enable-service )
|
||||
ln -v -s /etc/sv/"${2}" /var/service/
|
||||
;;
|
||||
enable | --enable-service )
|
||||
ln -v -s /etc/sv/"${2}" /var/service/
|
||||
;;
|
||||
|
||||
disable | --remove-service )
|
||||
rm -v /var/service/"${2}"
|
||||
;;
|
||||
disable | --remove-service )
|
||||
rm -v /var/service/"${2}"
|
||||
;;
|
||||
|
||||
enabled | --enabled-services )
|
||||
cd /etc/sv && find -xtype l -exec ls -l {} \;
|
||||
;;
|
||||
enabled | --enabled-services )
|
||||
cd /etc/sv && find -xtype l -exec ls -l {} \;
|
||||
;;
|
||||
|
||||
list | ls | --list )
|
||||
list | ls | --list )
|
||||
|
||||
echo
|
||||
echo -e "${LGREEN}Available Services (/etc/sv/):${NC}\n"
|
||||
ls /etc/sv
|
||||
echo
|
||||
echo -e "${LCYAN}Enabled Services (/var/service):${NC}\n"
|
||||
echo
|
||||
ls /var/service
|
||||
echo
|
||||
;;
|
||||
echo
|
||||
echo -e "${LGREEN}Available Services (/etc/sv/):${NC}\n"
|
||||
ls /etc/sv
|
||||
echo
|
||||
echo -e "${LCYAN}Enabled Services (/var/service):${NC}\n"
|
||||
echo
|
||||
ls /var/service
|
||||
echo
|
||||
;;
|
||||
|
||||
up )
|
||||
sv s /var/service/*
|
||||
;;
|
||||
up )
|
||||
sv s /var/service/*
|
||||
;;
|
||||
|
||||
start )
|
||||
sv start "${2}"
|
||||
;;
|
||||
start )
|
||||
sv start "${2}"
|
||||
;;
|
||||
|
||||
restart )
|
||||
sv restart "${2}"
|
||||
;;
|
||||
restart )
|
||||
sv restart "${2}"
|
||||
;;
|
||||
|
||||
stop )
|
||||
sv stop "${2}"
|
||||
;;
|
||||
stop )
|
||||
sv stop "${2}"
|
||||
;;
|
||||
|
||||
--help | -h | help )
|
||||
help
|
||||
;;
|
||||
esac
|
||||
--help | -h | help )
|
||||
help
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
systemd(){
|
||||
|
||||
case "${1}" in
|
||||
enable | --enable-service)
|
||||
systemctl enable "${2}"
|
||||
;;
|
||||
|
||||
disable | --disable-service)
|
||||
systemctl disable "${2}"
|
||||
;;
|
||||
|
||||
enabled | --enabled-services)
|
||||
systemctl list-unit-files --state=enabled
|
||||
;;
|
||||
|
||||
list | ls | --list)
|
||||
echo
|
||||
echo -e "${LGREEN}Available Services (/etc/systemd/system):${NC}\n"
|
||||
ls /etc/systemd/system/
|
||||
echo
|
||||
echo -e "${LCYAN}Enabled Services:${NC}\n"
|
||||
systemctl list-unit-files --state=enabled
|
||||
echo
|
||||
;;
|
||||
up)
|
||||
if [[ ! -z "${2}" ]];then
|
||||
systemctl status "${2}"
|
||||
else
|
||||
systemctl --type=service --state=running
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
start)
|
||||
systemctl start "${2}"
|
||||
;;
|
||||
|
||||
restart)
|
||||
systemctl restart "${2}"
|
||||
;;
|
||||
|
||||
stop)
|
||||
systemctl stop "${2}"
|
||||
;;
|
||||
|
||||
--help | -help | help)
|
||||
help
|
||||
;;
|
||||
|
||||
|
||||
|
||||
|
||||
esac
|
||||
}
|
||||
|
||||
if [[ "${serviceManager}" = "runit" ]];then
|
||||
runit "${1}" "${2}"
|
||||
elif [[ "${serviceManager}" = "systemd" ]];then
|
||||
systemd "${1}" "${2}"
|
||||
fi
|
Reference in New Issue
Block a user