services: start outside of install scripts

This commit is contained in:
openoms
2019-12-25 01:41:31 +01:00
parent d6d44f10fc
commit 45bfa65e89
5 changed files with 9 additions and 20 deletions

View File

@@ -128,18 +128,20 @@ if [ "${loop}" != "${choice}" ]; then
errorOnInstall=$?
if [ "${choice}" = "on" ]; then
if [ ${errorOnInstall} -eq 0 ]; then
# add Go vars to current session
sudo systemctl start loopd
if [ ${#GOPATH} -eq 0 ]; then
whiptail --title " Installed the Lightning Loop Service (loopd) " --msgbox "\
Usage and examples: https://github.com/lightninglabs/loop#loop-out-swaps\n
Start a new terminal session (log in again with ssh) and
start from the command line by typing 'loop' to see the options.
Start from the command line after the reboot
Use the command 'loop' to see the options.
" 11 75
needsReboot=1
else
whiptail --title " Installed the Lightning Loop Service (loopd) " --msgbox "\
Usage and examples: https://github.com/lightninglabs/loop#loop-out-swaps\n
Use can use command 'loop' to see the options.
Use the command 'loop' to see the options.
" 10 75
needsReboot=0
fi
else
l1="FAILED to install Lightning LOOP"
@@ -319,6 +321,7 @@ if [ "${rtlWebinterface}" != "${choice}" ]; then
errorOnInstall=$?
if [ "${choice}" = "on" ]; then
if [ ${errorOnInstall} -eq 0 ]; then
sudo systemctl start RTL
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
if [ "${runBehindTor}" = "on" ]; then
TOR_ADDRESS=$(sudo cat /mnt/hdd/tor/RTL/hostname)
@@ -356,6 +359,7 @@ if [ "${BTCRPCexplorer}" != "${choice}" ]; then
errorOnInstall=$?
if [ "${choice}" = "on" ]; then
if [ ${errorOnInstall} -eq 0 ]; then
sudo sytemctl start btc-rpc-explorer
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
if [ "${runBehindTor}" = "on" ]; then
TOR_ADDRESS=$(sudo cat /mnt/hdd/tor/btc-rpc-explorer/hostname)
@@ -443,6 +447,7 @@ if [ "${ElectRS}" != "${choice}" ]; then
errorOnInstall=$?
if [ "${choice}" = "on" ]; then
if [ ${errorOnInstall} -eq 0 ]; then
sudo systemctl start electrs
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
if [ "${runBehindTor}" = "on" ]; then
TOR_ADDRESS=$(sudo cat /mnt/hdd/tor/electrs/hostname)

View File

@@ -156,10 +156,6 @@ EOF
echo "BTC-RPC-explorer already installed."
fi
# start service
echo "Starting service"
sudo systemctl start btc-rpc-explorer 2>/dev/null
# setting value in raspi blitz config
sudo sed -i "s/^BTCRPCexplorer=.*/BTCRPCexplorer=on/g" /mnt/hdd/raspiblitz.conf

View File

@@ -266,7 +266,6 @@ RestartSec=60
WantedBy=multi-user.target
" | sudo tee -a /etc/systemd/system/electrs.service
sudo systemctl enable electrs
sudo systemctl start electrs
# manual start:
# sudo -u electrs /home/electrs/.cargo/bin/cargo run --release -- --index-batch-size=10 --electrum-rpc-addr="0.0.0.0:50001"
echo ""
@@ -277,9 +276,6 @@ WantedBy=multi-user.target
else
echo "ElectRS is already installed."
# start service
echo "start service"
sudo systemctl start electrs 2>/dev/null
fi
# setting value in raspiblitz config

View File

@@ -63,10 +63,6 @@ WantedBy=multi-user.target
else
echo "Loop service already installed."
fi
# start service
echo "Starting service"
sudo systemctl start loopd 2>/dev/null
# setting value in raspi blitz config
sudo sed -i "s/^loop=.*/loop=on/g" /mnt/hdd/raspiblitz.conf

View File

@@ -93,10 +93,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo "RTL already installed."
fi
# start service
echo "Starting service"
sudo systemctl start RTL 2>/dev/null
# setting value in raspi blitz config
sudo sed -i "s/^rtlWebinterface=.*/rtlWebinterface=on/g" /mnt/hdd/raspiblitz.conf