Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
995d5772ff | |||
97c1dfa3d3 | |||
9b81f94eae | |||
3fd6313c1e |
16
genswap.sh
16
genswap.sh
@ -85,20 +85,10 @@ function autoSwap(){
|
|||||||
echo -e "${LRED}Swap line does not exist in /etc/fstab, please manually check this.${NC}\n"
|
echo -e "${LRED}Swap line does not exist in /etc/fstab, please manually check this.${NC}\n"
|
||||||
|
|
||||||
else
|
else
|
||||||
echo -e "${LGREEN}Swap successfully added to /etc/fstab! Reboot to verify success...${NC}\n"
|
echo -e "${LGREEN}Swap successfully added to /etc/fstab${NC}\n"
|
||||||
|
|
||||||
echo -e "${YELLOW}Do you want to reboot your system now?(n/Y): ${NC}"
|
echo -e "\n${LGREEN}Swapfile setup complete${NC}\n"
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
36
get-lbry.sh
36
get-lbry.sh
@ -1,36 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
appname="LBRY"
|
|
||||||
version="0.15.0"
|
|
||||||
arch="amd64"
|
|
||||||
url="https://github.com/lbryio/lbry-app/releases/download/v${version}/${appname}_${version}_${arch}.deb"
|
|
||||||
depends="gnome-keyring nodejs npm binutils xz"
|
|
||||||
tmpdir="/tmp"
|
|
||||||
output_file="lbry.deb"
|
|
||||||
desc="Content distribution platform using blockchain technology"
|
|
||||||
|
|
||||||
fetch_deps(){
|
|
||||||
sudo dnf install ${depends}
|
|
||||||
}
|
|
||||||
|
|
||||||
fetch_url(){
|
|
||||||
if [ ! -f ${tmpdir}/${output_file} ];then
|
|
||||||
wget -O ${tmpdir}/${output_file} ${url}
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
extract_file(){
|
|
||||||
cd ${tmpdir}
|
|
||||||
sudo ar x ${output_file} data.tar.xz
|
|
||||||
sudo tar xvf data.tar.xz
|
|
||||||
}
|
|
||||||
|
|
||||||
install(){
|
|
||||||
sudo cp -rv ${tmpdir}/usr/* /usr/
|
|
||||||
sudo cp -rv ${tmpdir}/opt/* /opt/
|
|
||||||
}
|
|
||||||
|
|
||||||
fetch_deps
|
|
||||||
fetch_url
|
|
||||||
extract_file
|
|
||||||
install
|
|
74
svc.sh
74
svc.sh
@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# SVC - SV Commander - frontend for the sv command
|
# SVC - SV Commander - frontend for the sv command
|
||||||
|
|
||||||
###############################################################################################
|
###############################################################################################
|
||||||
## Copyright (c) 2015, Justin Moore
|
## Copyright (c) 2015 - 2020, Justin Moore
|
||||||
##
|
##
|
||||||
## Permission to use, copy, modify, and/or distribute this software
|
## Permission to use, copy, modify, and/or distribute this software
|
||||||
## for any purpose with or without fee is hereby granted,
|
## for any purpose with or without fee is hereby granted,
|
||||||
@ -35,7 +35,7 @@ help(){
|
|||||||
printf """
|
printf """
|
||||||
svc - Service Commander - frontend for the sv command
|
svc - Service Commander - frontend for the sv command
|
||||||
|
|
||||||
Usage: svc enable | unenable | enableed | list | up | start | restart | stop <service>
|
Usage: svc enable | disable | enabled | list | up | start | restart | stop <service>
|
||||||
|
|
||||||
|
|
||||||
For detailed help, see the commands below:
|
For detailed help, see the commands below:
|
||||||
@ -45,10 +45,10 @@ start Start an enabled service
|
|||||||
restart Restart a enabled service
|
restart Restart a enabled service
|
||||||
stop Stop an enabled service
|
stop Stop an enabled service
|
||||||
enable Symenlink directory/file to /var/service
|
enable Symenlink directory/file to /var/service
|
||||||
unenable Remove symlink from /var/service
|
disable Remove symlink from /var/service
|
||||||
enabled View synlinked paths of all services
|
enabled View synlinked paths of all services
|
||||||
ls List enabled and unenabled service files
|
ls List enabled and disabled service files
|
||||||
up Show status of running services
|
up Show status of running services
|
||||||
|
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
@ -57,45 +57,45 @@ case $1 in
|
|||||||
|
|
||||||
enable | --enable-service )
|
enable | --enable-service )
|
||||||
ln -v -s /etc/sv/"${2}" /var/service/
|
ln -v -s /etc/sv/"${2}" /var/service/
|
||||||
;;
|
;;
|
||||||
|
|
||||||
unenable | --remove-service )
|
disable | --remove-service )
|
||||||
rm -v /var/service/"${2}"
|
rm -v /var/service/"${2}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
enabled | --enabled-services )
|
enabled | --enabled-services )
|
||||||
cd /etc/sv && find -xtype l -exec ls -l {} \;
|
cd /etc/sv && find -xtype l -exec ls -l {} \;
|
||||||
;;
|
;;
|
||||||
|
|
||||||
list | ls | --list )
|
list | ls | --list )
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo -e "${LGREEN}Available Services (/etc/sv/):${NC}\n"
|
echo "${LGREEN}Available Services (/etc/sv/):${NC}\n"
|
||||||
ls /etc/sv
|
ls /etc/sv
|
||||||
echo
|
echo
|
||||||
echo -e "${LCYAN}Enabled Services (/var/service):${NC}\n"
|
echo "${LCYAN}Enabled Services (/var/service):${NC}\n"
|
||||||
echo
|
echo
|
||||||
ls /var/service
|
ls /var/service
|
||||||
echo
|
echo
|
||||||
;;
|
;;
|
||||||
|
|
||||||
up )
|
up )
|
||||||
sv s /var/service/*
|
sv s /var/service/*
|
||||||
;;
|
;;
|
||||||
|
|
||||||
start )
|
start )
|
||||||
sv start "${2}"
|
sv start "${2}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
restart )
|
restart )
|
||||||
sv restart "${2}"
|
sv restart "${2}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
stop )
|
stop )
|
||||||
sv stop "${2}"
|
sv stop "${2}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--help | -h | help )
|
*)
|
||||||
help
|
help
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user