mirror of
https://github.com/lalanza808/xmr.sh.git
synced 2025-05-12 16:32:11 -04:00
support CentOS not Arch
This commit is contained in:
parent
7be8a6fb21
commit
cfcf947e6f
2 changed files with 23 additions and 9 deletions
16
README.md
16
README.md
|
@ -1,2 +1,18 @@
|
||||||
# xmr.sh
|
# xmr.sh
|
||||||
|
|
||||||
A Monero node installer in a single command
|
A Monero node installer in a single command
|
||||||
|
|
||||||
|
Tested in:
|
||||||
|
|
||||||
|
- Debian 11
|
||||||
|
- Ubuntu Focal
|
||||||
|
- Fedora 36
|
||||||
|
- CentOS 10 Stream
|
||||||
|
|
||||||
|
ToDo:
|
||||||
|
|
||||||
|
[ ] Add wizard for DNS domain selection.
|
||||||
|
[ ] Status and node info at finish.
|
||||||
|
[ ] Make tor service optional
|
||||||
|
[ ] Optional block explorer
|
||||||
|
[ ] Grafana with stats
|
||||||
|
|
16
installer.sh
16
installer.sh
|
@ -103,9 +103,7 @@ install_pkg() {
|
||||||
if grep -q "debian" /etc/os-release; then
|
if grep -q "debian" /etc/os-release; then
|
||||||
apt-get update >>"${XMRSH_LOG_FILE}" 2>&1
|
apt-get update >>"${XMRSH_LOG_FILE}" 2>&1
|
||||||
apt-get install -y $1 >>"${XMRSH_LOG_FILE}" 2>&1
|
apt-get install -y $1 >>"${XMRSH_LOG_FILE}" 2>&1
|
||||||
elif grep -q "arch" /etc/os-release; then
|
elif grep -q "fedora" /etc/os-release || grep -q "centos" /etc/os-release; then
|
||||||
pacman -Sy --noconfirm $1 >>"${XMRSH_LOG_FILE}" 2>&1
|
|
||||||
elif grep -q "fedora" /etc/os-release; then
|
|
||||||
dnf install -y $1 >>"${XMRSH_LOG_FILE}" 2>&1
|
dnf install -y $1 >>"${XMRSH_LOG_FILE}" 2>&1
|
||||||
else
|
else
|
||||||
echo -e "${ErrBullet}Cannot detect your distribution package manager.${Off}"
|
echo -e "${ErrBullet}Cannot detect your distribution package manager.${Off}"
|
||||||
|
@ -152,8 +150,8 @@ install_docker() { (
|
||||||
# Docker Installer as provided in
|
# Docker Installer as provided in
|
||||||
curl -fsSL https://get.docker.com -o - | bash >>"${XMRSH_LOG_FILE}" 2>&1
|
curl -fsSL https://get.docker.com -o - | bash >>"${XMRSH_LOG_FILE}" 2>&1
|
||||||
check_return $?
|
check_return $?
|
||||||
# Fedora and Arch need to enable & start the daemon
|
# Fedora and Centos need to enable & start the daemon
|
||||||
if grep -q "fedora" /etc/os-release || grep -q "arch" /etc/os-release; then
|
if grep -q "fedora" /etc/os-release || grep -q "centos" /etc/os-release; then
|
||||||
systemctl enable docker
|
systemctl enable docker
|
||||||
systemctl start docker >>"${XMRSH_LOG_FILE}" 2>&1
|
systemctl start docker >>"${XMRSH_LOG_FILE}" 2>&1
|
||||||
fi
|
fi
|
||||||
|
@ -196,13 +194,13 @@ start_xmrsh() {
|
||||||
|
|
||||||
start_xmrsh_tor() {
|
start_xmrsh_tor() {
|
||||||
pushd "${XMRSH_DIR}" >>"${XMRSH_LOG_FILE}" 2>&1
|
pushd "${XMRSH_DIR}" >>"${XMRSH_LOG_FILE}" 2>&1
|
||||||
"${OkBullet}Starting tor hidden service... ${Off}"
|
echo -ne "${OkBullet}Starting tor hidden service... ${Off}"
|
||||||
docker-compose -f docker-compose.yml -f docker-compose.tor.yml up -d >>"${XMRSH_LOG_FILE}" 2>&1
|
docker-compose -f docker-compose.yml -f docker-compose.tor.yml up -d >>"${XMRSH_LOG_FILE}" 2>&1
|
||||||
check_return $?
|
check_return $?
|
||||||
sleep 3
|
sleep 3
|
||||||
ONION=$(docker logs tor 2>&1 | grep Entrypoint | cut -d " " -f 1)
|
ONION=$(docker logs tor 2>&1 | grep Entrypoint | cut -d " " -f 8)
|
||||||
echo -e "${Ok}"
|
echo -e "${Ok}"
|
||||||
"${OkBullet}Tor hidden service ready at: ${ONION} ${Off}"
|
echo -e "${OkBullet}Tor hidden service ready at: ${ONION} ${Off}"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_return() {
|
check_return() {
|
||||||
|
@ -215,7 +213,7 @@ check_return() {
|
||||||
|
|
||||||
completed() {
|
completed() {
|
||||||
# FIXME: Show domain / public IP
|
# FIXME: Show domain / public IP
|
||||||
"${OkBullet}Deployment complete!!${Off}"
|
echo -e "${OkBullet}Deployment complete!!${Off}"
|
||||||
}
|
}
|
||||||
|
|
||||||
header
|
header
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue