summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-05-31 21:19:26 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-05-31 21:19:26 +0900
commit3f6cecd3eda3feb18a0a3b0227c189d78785fc25 (patch)
tree9449a14a5b2f8bdf4a8aff2249319e4a1e578155
parent60a19f0f33b52e66141a587b8129cf9a859d736a (diff)
Updates
-rwxr-xr-xpublic/thesiah.sh162
-rwxr-xr-xstatic/thesiah.sh162
2 files changed, 162 insertions, 162 deletions
diff --git a/public/thesiah.sh b/public/thesiah.sh
index 3aca943..341e2c1 100755
--- a/public/thesiah.sh
+++ b/public/thesiah.sh
@@ -13,7 +13,7 @@ webrepo="https://github.com/TheSiahxyz/THESIAH.git"
progsfile="https://raw.githubusercontent.com/TheSiahxyz/THESIAH/main/static/progs.csv"
aurhelper="yay"
repobranch="main"
-initsys="$(readlink /sbin/init | awk -F'-' '{print $1}')"
+initsys="$(basename "$(readlink -f /sbin/init)" | sed 's/-init//g')"
export TERM=ansi
### FUNCTIONS ###
@@ -96,17 +96,17 @@ adduserandpass() {
refreshkeys() {
case "$(readlink -f /sbin/init)" in
- *systemd*)
- whiptail --infobox "Refreshing Arch Keyring..." 7 40
- pacman --noconfirm -S archlinux-keyring >/dev/null 2>&1
- installpkg arch-install-scripts
- ;;
- *)
- whiptail --infobox "Enabling Arch Repositories for more a more extensive software collection..." 7 40
- pacman --noconfirm --needed -S \
- artix-keyring artix-archlinux-support >/dev/null 2>&1
- grep -q "^\[extra\]" /etc/pacman.conf ||
- echo "[extra]
+ *systemd*)
+ whiptail --infobox "Refreshing Arch Keyring..." 7 40
+ pacman --noconfirm -S archlinux-keyring >/dev/null 2>&1
+ installpkg arch-install-scripts
+ ;;
+ *)
+ whiptail --infobox "Enabling Arch Repositories for more a more extensive software collection..." 7 40
+ pacman --noconfirm --needed -S \
+ artix-keyring artix-archlinux-support >/dev/null 2>&1
+ grep -q "^\[extra\]" /etc/pacman.conf ||
+ echo "[extra]
Include = /etc/pacman.d/mirrorlist-arch\n
[multilib]
Include = /etc/pacman.d/mirrorlist-arch" >>/etc/pacman.conf
@@ -191,17 +191,17 @@ initinstall() {
--infobox "Installing the package \`$1\` and the corresponding init package \'$initpkg'\ ($n of $total). $1 $initpkg $2" 9 70
installpkg "$1" && installpkg "$initpkg" || error "Failed to install package $1 and init package $initpkg"
case "$initsys" in
- "runit")
- ln -s /etc/runit/sv/"$1" /run/runit/service/ >/dev/null 2>&1 || error "Failed to add $1 service."
- sv start "$1" >/dev/null 2>&1 || error "Failed to run $1 service."
- ;;
- "openrc")
- rc-update add "$1" default >/dev/null 2>&1 || error "Faild to add $1 service."
- rc-service "$1" start >/dev/null 2>&1 || error "Faild to start $1 service."
- ;;
- "s6")
- s6-rc -u change "$1" >/dev/null 2>&1 || error "Failed to start $1 service."
- ;;
+ "runit")
+ ln -s /etc/runit/sv/"$1" /run/runit/service/ >/dev/null 2>&1 || error "Failed to add $1 service."
+ sv start "$1" >/dev/null 2>&1 || error "Failed to run $1 service."
+ ;;
+ "openrc")
+ rc-update add "$1" default >/dev/null 2>&1 || error "Faild to add $1 service."
+ rc-service "$1" start >/dev/null 2>&1 || error "Faild to start $1 service."
+ ;;
+ "s6")
+ s6-rc -u change "$1" >/dev/null 2>&1 || error "Failed to start $1 service."
+ ;;
esac
}
@@ -215,11 +215,11 @@ installationloop() {
echo "$comment" | grep -q "^\".*\"$" &&
comment="$(echo "$comment" | sed -E "s/(^\"|\"$)//g")"
case "$tag" in
- "A") aurinstall "$program" "$comment" ;;
- "G") gitmakeinstall "$program" "$comment" ;;
- "P") pipinstall "$program" "$comment" ;;
- "R") initinstall "$program" "$comment" ;;
- *) maininstall "$program" "$comment" ;;
+ "A") aurinstall "$program" "$comment" ;;
+ "G") gitmakeinstall "$program" "$comment" ;;
+ "P") pipinstall "$program" "$comment" ;;
+ "R") initinstall "$program" "$comment" ;;
+ *) maininstall "$program" "$comment" ;;
esac
done </tmp/progs.csv
}
@@ -344,19 +344,19 @@ ufwsetup() {
ufw allow in 'Postfix SMTPS' >/dev/null 2>&1
ufw allow in 'Mail Submission' >/dev/null 2>&1
ufw enable >/dev/null 2>&1
- case "$(readlink -f /sbin/init)" in
- "runit")
- ln -s /etc/runit/sv/ufw /run/runit/service/ >/dev/null 2>&1
- sv start ufw >/dev/null 2>&1
- ;;
- "openrc")
- rc-update add ufw default >/dev/null 2>&1
- rc-service ufw start >/dev/null 2>&1
- ;;
- "s6")
- ln -s /etc/s6/sv/ufw /run/s6/services/ >/dev/null 2>&1
- s6-svc -u /run/s6/services/ufw >/dev/null 2>&1
- ;;
+ case "$initsys" in
+ "runit")
+ ln -s /etc/runit/sv/ufw /run/runit/service/ >/dev/null 2>&1
+ sv start ufw >/dev/null 2>&1
+ ;;
+ "openrc")
+ rc-update add ufw default >/dev/null 2>&1
+ rc-service ufw start >/dev/null 2>&1
+ ;;
+ "s6")
+ ln -s /etc/s6/sv/ufw /run/s6/services/ >/dev/null 2>&1
+ s6-svc -u /run/s6/services/ufw >/dev/null 2>&1
+ ;;
esac
}
@@ -373,22 +373,22 @@ sambasetup() {
ufw reload >/dev/null 2>&1
$pass1 | smbpasswd -a "$name" >/dev/null 2>&1
case "$initsys" in
- "runit")
- ln -s /etc/runit/sv/smbd /run/runit/service/ >/dev/null 2>&1
- ln -s /etc/runit/sv/nmbd /run/runit/service/ >/dev/null 2>&1
- sv start smbd >/dev/null 2>&1
- sv start nmbd >/dev/null 2>&1
- ;;
- "openrc")
- rc-update add samba default >/dev/null 2>&1
- rc-service samba start >/dev/null 2>&1
- ;;
- "s6")
- ln -s /etc/s6/sv/smbd /run/s6/services/ >/dev/null 2>&1
- ln -s /etc/s6/sv/nmbd /run/s6/services/ >/dev/null 2>&1
- s6-svc -u /run/s6/services/smbd >/dev/null 2>&1
- s6-svc -u /run/s6/services/nmbd >/dev/null 2>&1
- ;;
+ "runit")
+ ln -s /etc/runit/sv/smbd /run/runit/service/ >/dev/null 2>&1
+ ln -s /etc/runit/sv/nmbd /run/runit/service/ >/dev/null 2>&1
+ sv start smbd >/dev/null 2>&1
+ sv start nmbd >/dev/null 2>&1
+ ;;
+ "openrc")
+ rc-update add samba default >/dev/null 2>&1
+ rc-service samba start >/dev/null 2>&1
+ ;;
+ "s6")
+ ln -s /etc/s6/sv/smbd /run/s6/services/ >/dev/null 2>&1
+ ln -s /etc/s6/sv/nmbd /run/s6/services/ >/dev/null 2>&1
+ s6-svc -u /run/s6/services/smbd >/dev/null 2>&1
+ s6-svc -u /run/s6/services/nmbd >/dev/null 2>&1
+ ;;
esac
}
@@ -404,18 +404,18 @@ cronsetup() {
pacman -Qq cronie >/dev/null 2>&1 || installpkg cronie
pacman -Qq cronie-"$initsys" >/dev/null 2>&1 || installpkg cronie-"$initsys"
case "$initsys" in
- "runit")
- ln -s /etc/runit/sv/cronie /run/runit/service/ >/dev/null 2>&1
- sv start cronie >/dev/null 2>&1
- ;;
- "openrc")
- rc-update add cronie default >/dev/null 2>&1
- rc-service cronie start >/dev/null 2>&1
- ;;
- "s6")
- ln -s /etc/s6/sv/cronie /run/s6/services/ >/dev/null 2>&1
- s6-svc -u /run/s6/services/cronie >/dev/null 2>&1
- ;;
+ "runit")
+ ln -s /etc/runit/sv/cronie /run/runit/service/ >/dev/null 2>&1
+ sv start cronie >/dev/null 2>&1
+ ;;
+ "openrc")
+ rc-update add cronie default >/dev/null 2>&1
+ rc-service cronie start >/dev/null 2>&1
+ ;;
+ "s6")
+ ln -s /etc/s6/sv/cronie /run/s6/services/ >/dev/null 2>&1
+ s6-svc -u /run/s6/services/cronie >/dev/null 2>&1
+ ;;
esac
}
@@ -431,18 +431,18 @@ tlpsetup() {
s/^#(START_CHARGE_THRESH_BAT1=).*/\150/g;
s/^#(STOP_CHARGE_THRESH_BAT1=).*/\175/g" >/dev/null 2>&1
case "$initsys" in
- "runit")
- ln -s /etc/runit/sv/tlp /run/runit/service/ >/dev/null 2>&1
- sv start tlp >/dev/null 2>&1
- ;;
- "openrc")
- rc-update add tlp default >/dev/null 2>&1
- rc-service tlp start >/dev/null 2>&1
- ;;
- "s6")
- ln -s /etc/s6/sv/tlp /run/s6/services/ >/dev/null 2>&1
- s6-svc -u /run/s6/services/tlp >/dev/null 2>&1
- ;;
+ "runit")
+ ln -s /etc/runit/sv/tlp /run/runit/service/ >/dev/null 2>&1
+ sv start tlp >/dev/null 2>&1
+ ;;
+ "openrc")
+ rc-update add tlp default >/dev/null 2>&1
+ rc-service tlp start >/dev/null 2>&1
+ ;;
+ "s6")
+ ln -s /etc/s6/sv/tlp /run/s6/services/ >/dev/null 2>&1
+ s6-svc -u /run/s6/services/tlp >/dev/null 2>&1
+ ;;
esac
tlp start >/dev/null 2>&1
}
diff --git a/static/thesiah.sh b/static/thesiah.sh
index 3aca943..341e2c1 100755
--- a/static/thesiah.sh
+++ b/static/thesiah.sh
@@ -13,7 +13,7 @@ webrepo="https://github.com/TheSiahxyz/THESIAH.git"
progsfile="https://raw.githubusercontent.com/TheSiahxyz/THESIAH/main/static/progs.csv"
aurhelper="yay"
repobranch="main"
-initsys="$(readlink /sbin/init | awk -F'-' '{print $1}')"
+initsys="$(basename "$(readlink -f /sbin/init)" | sed 's/-init//g')"
export TERM=ansi
### FUNCTIONS ###
@@ -96,17 +96,17 @@ adduserandpass() {
refreshkeys() {
case "$(readlink -f /sbin/init)" in
- *systemd*)
- whiptail --infobox "Refreshing Arch Keyring..." 7 40
- pacman --noconfirm -S archlinux-keyring >/dev/null 2>&1
- installpkg arch-install-scripts
- ;;
- *)
- whiptail --infobox "Enabling Arch Repositories for more a more extensive software collection..." 7 40
- pacman --noconfirm --needed -S \
- artix-keyring artix-archlinux-support >/dev/null 2>&1
- grep -q "^\[extra\]" /etc/pacman.conf ||
- echo "[extra]
+ *systemd*)
+ whiptail --infobox "Refreshing Arch Keyring..." 7 40
+ pacman --noconfirm -S archlinux-keyring >/dev/null 2>&1
+ installpkg arch-install-scripts
+ ;;
+ *)
+ whiptail --infobox "Enabling Arch Repositories for more a more extensive software collection..." 7 40
+ pacman --noconfirm --needed -S \
+ artix-keyring artix-archlinux-support >/dev/null 2>&1
+ grep -q "^\[extra\]" /etc/pacman.conf ||
+ echo "[extra]
Include = /etc/pacman.d/mirrorlist-arch\n
[multilib]
Include = /etc/pacman.d/mirrorlist-arch" >>/etc/pacman.conf
@@ -191,17 +191,17 @@ initinstall() {
--infobox "Installing the package \`$1\` and the corresponding init package \'$initpkg'\ ($n of $total). $1 $initpkg $2" 9 70
installpkg "$1" && installpkg "$initpkg" || error "Failed to install package $1 and init package $initpkg"
case "$initsys" in
- "runit")
- ln -s /etc/runit/sv/"$1" /run/runit/service/ >/dev/null 2>&1 || error "Failed to add $1 service."
- sv start "$1" >/dev/null 2>&1 || error "Failed to run $1 service."
- ;;
- "openrc")
- rc-update add "$1" default >/dev/null 2>&1 || error "Faild to add $1 service."
- rc-service "$1" start >/dev/null 2>&1 || error "Faild to start $1 service."
- ;;
- "s6")
- s6-rc -u change "$1" >/dev/null 2>&1 || error "Failed to start $1 service."
- ;;
+ "runit")
+ ln -s /etc/runit/sv/"$1" /run/runit/service/ >/dev/null 2>&1 || error "Failed to add $1 service."
+ sv start "$1" >/dev/null 2>&1 || error "Failed to run $1 service."
+ ;;
+ "openrc")
+ rc-update add "$1" default >/dev/null 2>&1 || error "Faild to add $1 service."
+ rc-service "$1" start >/dev/null 2>&1 || error "Faild to start $1 service."
+ ;;
+ "s6")
+ s6-rc -u change "$1" >/dev/null 2>&1 || error "Failed to start $1 service."
+ ;;
esac
}
@@ -215,11 +215,11 @@ installationloop() {
echo "$comment" | grep -q "^\".*\"$" &&
comment="$(echo "$comment" | sed -E "s/(^\"|\"$)//g")"
case "$tag" in
- "A") aurinstall "$program" "$comment" ;;
- "G") gitmakeinstall "$program" "$comment" ;;
- "P") pipinstall "$program" "$comment" ;;
- "R") initinstall "$program" "$comment" ;;
- *) maininstall "$program" "$comment" ;;
+ "A") aurinstall "$program" "$comment" ;;
+ "G") gitmakeinstall "$program" "$comment" ;;
+ "P") pipinstall "$program" "$comment" ;;
+ "R") initinstall "$program" "$comment" ;;
+ *) maininstall "$program" "$comment" ;;
esac
done </tmp/progs.csv
}
@@ -344,19 +344,19 @@ ufwsetup() {
ufw allow in 'Postfix SMTPS' >/dev/null 2>&1
ufw allow in 'Mail Submission' >/dev/null 2>&1
ufw enable >/dev/null 2>&1
- case "$(readlink -f /sbin/init)" in
- "runit")
- ln -s /etc/runit/sv/ufw /run/runit/service/ >/dev/null 2>&1
- sv start ufw >/dev/null 2>&1
- ;;
- "openrc")
- rc-update add ufw default >/dev/null 2>&1
- rc-service ufw start >/dev/null 2>&1
- ;;
- "s6")
- ln -s /etc/s6/sv/ufw /run/s6/services/ >/dev/null 2>&1
- s6-svc -u /run/s6/services/ufw >/dev/null 2>&1
- ;;
+ case "$initsys" in
+ "runit")
+ ln -s /etc/runit/sv/ufw /run/runit/service/ >/dev/null 2>&1
+ sv start ufw >/dev/null 2>&1
+ ;;
+ "openrc")
+ rc-update add ufw default >/dev/null 2>&1
+ rc-service ufw start >/dev/null 2>&1
+ ;;
+ "s6")
+ ln -s /etc/s6/sv/ufw /run/s6/services/ >/dev/null 2>&1
+ s6-svc -u /run/s6/services/ufw >/dev/null 2>&1
+ ;;
esac
}
@@ -373,22 +373,22 @@ sambasetup() {
ufw reload >/dev/null 2>&1
$pass1 | smbpasswd -a "$name" >/dev/null 2>&1
case "$initsys" in
- "runit")
- ln -s /etc/runit/sv/smbd /run/runit/service/ >/dev/null 2>&1
- ln -s /etc/runit/sv/nmbd /run/runit/service/ >/dev/null 2>&1
- sv start smbd >/dev/null 2>&1
- sv start nmbd >/dev/null 2>&1
- ;;
- "openrc")
- rc-update add samba default >/dev/null 2>&1
- rc-service samba start >/dev/null 2>&1
- ;;
- "s6")
- ln -s /etc/s6/sv/smbd /run/s6/services/ >/dev/null 2>&1
- ln -s /etc/s6/sv/nmbd /run/s6/services/ >/dev/null 2>&1
- s6-svc -u /run/s6/services/smbd >/dev/null 2>&1
- s6-svc -u /run/s6/services/nmbd >/dev/null 2>&1
- ;;
+ "runit")
+ ln -s /etc/runit/sv/smbd /run/runit/service/ >/dev/null 2>&1
+ ln -s /etc/runit/sv/nmbd /run/runit/service/ >/dev/null 2>&1
+ sv start smbd >/dev/null 2>&1
+ sv start nmbd >/dev/null 2>&1
+ ;;
+ "openrc")
+ rc-update add samba default >/dev/null 2>&1
+ rc-service samba start >/dev/null 2>&1
+ ;;
+ "s6")
+ ln -s /etc/s6/sv/smbd /run/s6/services/ >/dev/null 2>&1
+ ln -s /etc/s6/sv/nmbd /run/s6/services/ >/dev/null 2>&1
+ s6-svc -u /run/s6/services/smbd >/dev/null 2>&1
+ s6-svc -u /run/s6/services/nmbd >/dev/null 2>&1
+ ;;
esac
}
@@ -404,18 +404,18 @@ cronsetup() {
pacman -Qq cronie >/dev/null 2>&1 || installpkg cronie
pacman -Qq cronie-"$initsys" >/dev/null 2>&1 || installpkg cronie-"$initsys"
case "$initsys" in
- "runit")
- ln -s /etc/runit/sv/cronie /run/runit/service/ >/dev/null 2>&1
- sv start cronie >/dev/null 2>&1
- ;;
- "openrc")
- rc-update add cronie default >/dev/null 2>&1
- rc-service cronie start >/dev/null 2>&1
- ;;
- "s6")
- ln -s /etc/s6/sv/cronie /run/s6/services/ >/dev/null 2>&1
- s6-svc -u /run/s6/services/cronie >/dev/null 2>&1
- ;;
+ "runit")
+ ln -s /etc/runit/sv/cronie /run/runit/service/ >/dev/null 2>&1
+ sv start cronie >/dev/null 2>&1
+ ;;
+ "openrc")
+ rc-update add cronie default >/dev/null 2>&1
+ rc-service cronie start >/dev/null 2>&1
+ ;;
+ "s6")
+ ln -s /etc/s6/sv/cronie /run/s6/services/ >/dev/null 2>&1
+ s6-svc -u /run/s6/services/cronie >/dev/null 2>&1
+ ;;
esac
}
@@ -431,18 +431,18 @@ tlpsetup() {
s/^#(START_CHARGE_THRESH_BAT1=).*/\150/g;
s/^#(STOP_CHARGE_THRESH_BAT1=).*/\175/g" >/dev/null 2>&1
case "$initsys" in
- "runit")
- ln -s /etc/runit/sv/tlp /run/runit/service/ >/dev/null 2>&1
- sv start tlp >/dev/null 2>&1
- ;;
- "openrc")
- rc-update add tlp default >/dev/null 2>&1
- rc-service tlp start >/dev/null 2>&1
- ;;
- "s6")
- ln -s /etc/s6/sv/tlp /run/s6/services/ >/dev/null 2>&1
- s6-svc -u /run/s6/services/tlp >/dev/null 2>&1
- ;;
+ "runit")
+ ln -s /etc/runit/sv/tlp /run/runit/service/ >/dev/null 2>&1
+ sv start tlp >/dev/null 2>&1
+ ;;
+ "openrc")
+ rc-update add tlp default >/dev/null 2>&1
+ rc-service tlp start >/dev/null 2>&1
+ ;;
+ "s6")
+ ln -s /etc/s6/sv/tlp /run/s6/services/ >/dev/null 2>&1
+ s6-svc -u /run/s6/services/tlp >/dev/null 2>&1
+ ;;
esac
tlp start >/dev/null 2>&1
}