mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-17 13:21:44 +01:00
commit
d237e10b8c
@ -255,6 +255,8 @@ if [ $(cat /etc/os-release 2>/dev/null | grep -c 'Debian') -gt 0 ]; then
|
||||
fi
|
||||
elif [ $(cat /etc/os-release 2>/dev/null | grep -c 'Ubuntu') -gt 0 ]; then
|
||||
baseimage="ubuntu"
|
||||
elif [ $(cat /etc/os-release 2>/dev/null | grep -c 'Armbian') -gt 0 ]; then
|
||||
baseimage="armbian"
|
||||
else
|
||||
echo "\n# FAIL: Base Image cannot be detected or is not supported."
|
||||
cat /etc/os-release 2>/dev/null
|
||||
@ -392,7 +394,7 @@ echo -e "\n*** PREPARE ${baseimage} ***"
|
||||
# make sure the pi user is present
|
||||
if [ "$(compgen -u | grep -c pi)" -eq 0 ];then
|
||||
echo "# Adding the user pi"
|
||||
adduser --disabled-password --gecos "" pi
|
||||
adduser --system --group --home /home/pi pi
|
||||
adduser pi sudo
|
||||
fi
|
||||
|
||||
@ -535,7 +537,7 @@ service rsyslog restart
|
||||
echo -e "\n*** ADDING MAIN USER admin ***"
|
||||
# based on https://raspibolt.org/system-configuration.html#add-users
|
||||
# using the default password 'raspiblitz'
|
||||
adduser --disabled-password --gecos "" admin
|
||||
adduser --system --group --home /home/admin admin
|
||||
echo "admin:raspiblitz" | chpasswd
|
||||
adduser admin sudo
|
||||
chsh admin -s /bin/bash
|
||||
@ -553,7 +555,7 @@ fi
|
||||
echo -e "\n*** ADDING SERVICE USER bitcoin"
|
||||
# based on https://raspibolt.org/guide/raspberry-pi/system-configuration.html
|
||||
# create user and set default password for user
|
||||
adduser --disabled-password --gecos "" bitcoin
|
||||
adduser --system --group --home /home/bitcoin bitcoin
|
||||
echo "bitcoin:raspiblitz" | chpasswd
|
||||
# make home directory readable
|
||||
chmod 755 /home/bitcoin
|
||||
|
224
ci/README.md
224
ci/README.md
@ -4,23 +4,27 @@
|
||||
<details>
|
||||
<summary>Table of Contents</summary>
|
||||
|
||||
- [Ready made images](#ready-made-images)
|
||||
- [Write the image to a disk connected with USB](#write-the-image-to-a-disk-connected-with-usb)
|
||||
- [Option 1 - requires less disk space](#option-1---requires-less-disk-space)
|
||||
- [Write the .qcow2 file directly to disk with `qemu-image dd`](#write-the-qcow2-file-directly-to-disk-with-qemu-image-dd)
|
||||
- [Option 2 - convert to a raq disk image first](#option-2---convert-to--a-raq-disk-image-first)
|
||||
- [Convert the .qcow2 volume to a raw disk image](#convert-the-qcow2-volume-to-a-raw-disk-image)
|
||||
- [Write the .img to the disk](#write-the-img-to-the-disk)
|
||||
- [The first boot](#the-first-boot)
|
||||
- [Lean image with Gnome desktop (default image)](#lean-image-with-gnome-desktop-default-image)
|
||||
- [Extend the root partition (optional - recommended)](#extend-the-root-partition-optional---recommended)
|
||||
- [Add wifi driver (optional)](#add-wifi-driver-optional)
|
||||
- [Local build](#local-build)
|
||||
- [Generate an arm64-rpi image](#generate-an-arm64-rpi-image)
|
||||
- [Generate an amd64 image](#generate-an-amd64-image)
|
||||
- [amd64-lean-desktop-uefi-image](#amd64-lean-desktop-uefi-image)
|
||||
- [amd64-lean-server-legacyboot-image](#amd64-lean-server-legacyboot-image)
|
||||
- [Images generated in github actions](#images-generated-in-github-actions)
|
||||
- [Write the image to a disk connected with USB](#write-the-image-to-a-disk-connected-with-usb)
|
||||
- [Convert the qcow2 volume to a raw disk image](#convert-the-qcow2-volume-to-a-raw-disk-image)
|
||||
- [Write to a disk connected with USB with Balena Etcher or `dd`](#write-to-a-disk-connected-with-usb-with-balena-etcher-or-dd)
|
||||
- [The first boot](#the-first-boot)
|
||||
- [Lean image with Gnome desktop (default image)](#lean-image-with-gnome-desktop-default-image)
|
||||
- [Lean server image without Gnome desktop](#lean-server-image-without-gnome-desktop)
|
||||
- [Notes for the lean server image without Gnome desktop](#notes-for-the-lean-server-image-without-gnome-desktop)
|
||||
- [After the boot](#after-the-boot)
|
||||
- [Connect to wifi from the command line (optional)](#connect-to-wifi-from-the-command-line-optional)
|
||||
- [Add Gnome desktop to the server image (optional)](#add-gnome-desktop-to-the-server-image-optional)
|
||||
- [Fatpack images](#fatpack-images)
|
||||
- [Extend the root partition (optional - recommended)](#extend-the-root-partition-optional---recommended)
|
||||
- [Add wifi (optional)](#add-wifi-optional)
|
||||
- [Add wifi driver (optional)](#add-wifi-driver-optional)
|
||||
- [Fatpack images](#fatpack-images)
|
||||
- [Workflow notes](#workflow-notes)
|
||||
- [VNC](#vnc)
|
||||
- [Packer settings](#packer-settings)
|
||||
@ -28,6 +32,99 @@
|
||||
|
||||
</details>
|
||||
|
||||
## Ready made images
|
||||
* The images are built in GitHub actions
|
||||
* To see the downloadable artifacts will need to log in to GitHub
|
||||
* Find the latest successful build of the default amd64 image:
|
||||
https://github.com/rootzoll/raspiblitz/actions/workflows/amd64-lean-image.yml?query=workflow%3Aamd64-lean-image-build+branch%3Adev+is%3Asuccess++
|
||||
```
|
||||
# unzip to the same directory
|
||||
unzip ./raspiblitz-amd64-image-*.zip
|
||||
```
|
||||
## Write the image to a disk connected with USB
|
||||
### Option 1 - requires less disk space
|
||||
#### Write the .qcow2 file directly to disk with `qemu-image dd`
|
||||
* the .qcow2 volume is 8.1 GB
|
||||
* identify the connected disk with `lsblk` e.g., `/dev/sdk`
|
||||
```
|
||||
sudo apt install -y qemu-utils
|
||||
disk="/dev/sdk"
|
||||
sudo qemu-img dd if=./raspiblitz-amd64-debian-lean.qcow2 of=${disk} bs=4M
|
||||
```
|
||||
### Option 2 - convert to a raq disk image first
|
||||
#### Convert the .qcow2 volume to a raw disk image
|
||||
* the raw .img is 30GB
|
||||
```
|
||||
# unzip
|
||||
gzip -dkv raspiblitz-amd64-debian-lean.qcow2.gz
|
||||
# install qemu-utils
|
||||
sudo apt install -y qemu-utils
|
||||
# convert
|
||||
qemu-img convert ./raspiblitz-amd64-debian-lean.qcow2 ./raspiblitz-amd64-debian-lean.img
|
||||
```
|
||||
#### Write the .img to the disk
|
||||
* identify the connected disk with `lsblk` e.g., `/dev/sdk`
|
||||
* use [Balena Etcher](https://www.balena.io/etcher/)
|
||||
* or `dd` to write the .img to disk
|
||||
```
|
||||
disk="/dev/sdk"
|
||||
sudo dd if=./raspiblitz-amd64-debian-lean.img of=${disk} bs=4M status=progress
|
||||
```
|
||||
|
||||
## The first boot
|
||||
### Lean image with Gnome desktop (default image)
|
||||
* log in on screen:
|
||||
* username: `admin`
|
||||
* password: `raspiblitz`
|
||||
* start a terminal for guidance
|
||||
* alternatively connect with ssh over the LAN
|
||||
* username: `admin`
|
||||
* password: `raspiblitz`
|
||||
|
||||
### Extend the root partition (optional - recommended)
|
||||
* The default image is 30GB. The partition can be extended to the full size of the disk.
|
||||
* The lvm partition can be extended while mounted so this step can be done later as well while the system is running.
|
||||
* CLI (recommended)
|
||||
```
|
||||
# identify the USB connected disk
|
||||
lsblk
|
||||
df -h
|
||||
# select the disk carefully
|
||||
disk="/dev/sde"
|
||||
# resize the extended partition to the full size of the disk
|
||||
sudo parted ${disk} -- resizepart 2 100%
|
||||
# resize the lvm partition to the full size of the disk
|
||||
sudo parted ${disk} -- resizepart 5 100%
|
||||
# extend the physical volume to size of the lvm partition
|
||||
sudo pvresize ${disk}5
|
||||
# extend the root lvm to the full free space and resize the filesystem
|
||||
sudo lvextend -r -l +100%FREE /dev/mapper/raspiblitz--amd64--vg-root
|
||||
```
|
||||
* GUI with GParted
|
||||
```
|
||||
# install
|
||||
sudo apt install gparted
|
||||
# start the gparted GUI
|
||||
sudo gparted
|
||||
# resize the extended partition to the full size of the disk
|
||||
# extend the lvm to the full free space and resize the filesystem (extends the swap space by default)
|
||||
# in CLI: extend the root lvm
|
||||
sudo lvextend -r -l +100%FREE /dev/mapper/raspiblitz--amd64--vg-root
|
||||
```
|
||||
|
||||
### Add wifi driver (optional)
|
||||
* as in https://wiki.debian.org/iwlwifi
|
||||
* add the component `non-free` after `deb http://deb.debian.org/debian bullseye main` in `/etc/apt/sources.list`
|
||||
* install the wifi driver for the mentioned cards:
|
||||
```
|
||||
sudo apt update && sudo apt install firmware-iwlwifi
|
||||
```
|
||||
* alternatively download the deb package from: http://ftp.debian.org/debian/pool/non-free-firmware/f/firmware-nonfree/firmware-iwlwifi_20230210-5_all.deb
|
||||
* install with:
|
||||
```
|
||||
sudo dpkg -i firmware-iwlwifi_20230210-5_all.deb
|
||||
```
|
||||
|
||||
## Local build
|
||||
with the [Makefile](https://github.com/rootzoll/raspiblitz/blob/dev/Makefile)
|
||||
* needs ~20 GB free space
|
||||
@ -78,54 +175,19 @@ with the [Makefile](https://github.com/rootzoll/raspiblitz/blob/dev/Makefile)
|
||||
amd64-lean-server-legacyboot-image
|
||||
```
|
||||
|
||||
## Images generated in github actions
|
||||
* To see the downloadable artifacts will need to log in to GitHub
|
||||
* Find the latest successful build of the default amd64 image:
|
||||
https://github.com/rootzoll/raspiblitz/actions/workflows/amd64-lean-image.yml?query=workflow%3Aamd64-lean-image-build+branch%3Adev+is%3Asuccess++
|
||||
```
|
||||
# unzip to the same directory
|
||||
unzip ./raspiblitz-amd64-image-YEAR-MM-DD-COMMITHASH.zip
|
||||
```
|
||||
## Write the image to a disk connected with USB
|
||||
### Convert the qcow2 volume to a raw disk image
|
||||
* the raw image is 30GB
|
||||
```
|
||||
# unzip
|
||||
gzip -dkv raspiblitz-amd64-debian-lean.qcow2.gz
|
||||
# convert
|
||||
qemu-img convert ./raspiblitz-amd64-debian-lean.qcow2 ./raspiblitz-amd64-debian-lean.img
|
||||
```
|
||||
|
||||
### Write to a disk connected with USB with Balena Etcher or `dd`
|
||||
* identify the connected disk with `lsblk` eg,: `/dev/sdk`
|
||||
* [Balena Etcher](https://www.balena.io/etcher/) to write the .img to disk
|
||||
* dd to write the .img to disk
|
||||
```
|
||||
disk="/dev/sdk"
|
||||
sudo dd if=./raspiblitz-amd64-debian-lean.img of=${disk} bs=4M status=progress
|
||||
```
|
||||
* qemu-image dd to write the .qcow2 directly to disk
|
||||
```
|
||||
sudo apt install -y qemu-utils
|
||||
disk="/dev/sdk"
|
||||
sudo qemu-img dd if=./raspiblitz-amd64-debian-lean.qcow2 of=${disk} bs=4M
|
||||
```
|
||||
|
||||
## The first boot
|
||||
### Lean image with Gnome desktop (default image)
|
||||
* log in on screen:
|
||||
* username: `admin`
|
||||
* password: `raspiblitz`
|
||||
* start a terminal for guidance
|
||||
* connect with ssh over the LAN
|
||||
* username: `admin`
|
||||
* password: `raspiblitz`
|
||||
|
||||
### Lean server image without Gnome desktop
|
||||
## Notes for the lean server image without Gnome desktop
|
||||
### After the boot
|
||||
* press any key to get to a login prompt after the splash screen
|
||||
* username: `admin`
|
||||
* password: `raspiblitz`
|
||||
|
||||
### Connect to wifi from the command line (optional)
|
||||
* if the wifi driver is included in the FOSS Debian distro
|
||||
* in the command line run the network manager interface to connect:
|
||||
```
|
||||
sudo nmtui
|
||||
```
|
||||
|
||||
#### Add Gnome desktop to the server image (optional)
|
||||
* Connect to the internet (easiest to plug in a LAN cable - use a USB - LAN adapter if have no port)
|
||||
```
|
||||
@ -133,63 +195,13 @@ https://github.com/rootzoll/raspiblitz/actions/workflows/amd64-lean-image.yml?qu
|
||||
systemctl start gdm
|
||||
```
|
||||
|
||||
### Fatpack images
|
||||
## Fatpack images
|
||||
* can open a browser and go to:
|
||||
* http://localhost
|
||||
* can also open the WebUI on another computer
|
||||
* Find the the RaspiBlitz_IP in your router dashboard, in the terminal prompt or with `hostname -I`
|
||||
* open: http://RaspiBlitz_IP
|
||||
|
||||
### Extend the root partition (optional - recommended)
|
||||
* The default image is 30GB. The partition can be extended to the full size of the disk.
|
||||
* The lvm partition can be extended while mounted so this step can be done later as well while the system is running.
|
||||
* CLI (recommended)
|
||||
```
|
||||
# identify the USB connected disk
|
||||
lsblk
|
||||
df -h
|
||||
# select the disk carefully
|
||||
disk="/dev/sde"
|
||||
# resize the extended partition to the full size of the disk
|
||||
sudo parted ${disk} -- resizepart 2 100%
|
||||
# resize the lvm partition to the full size of the disk
|
||||
sudo parted ${disk} -- resizepart 5 100%
|
||||
# extend the physical volume to size of the lvm partition
|
||||
sudo pvresize ${disk}5
|
||||
# extend the root lvm to the full free space and resize the filesystem
|
||||
sudo lvextend -r -l +100%FREE /dev/mapper/raspiblitz--amd64--vg-root
|
||||
```
|
||||
* GUI with GParted
|
||||
```
|
||||
# install
|
||||
sudo apt install gparted
|
||||
# start the gparted GUI
|
||||
sudo gparted
|
||||
# resize the extended partition to the full size of the disk
|
||||
# extend the lvm to the full free space and resize the filesystem (extends the swap space by default)
|
||||
# in CLI: extend the root lvm
|
||||
sudo lvextend -r -l +100%FREE /dev/mapper/raspiblitz--amd64--vg-root
|
||||
```
|
||||
|
||||
### Add wifi (optional)
|
||||
* if the wifi driver is included in the FOSS Debian distro
|
||||
* in the command line run the network manager interface to connect:
|
||||
```
|
||||
sudo nmtui
|
||||
```
|
||||
### Add wifi driver (optional)
|
||||
* as in https://wiki.debian.org/iwlwifi
|
||||
* add the component `non-free` after `deb http://deb.debian.org/debian bullseye main` in `/etc/apt/sources.list`
|
||||
* install the wifi driver for the mentioned cards:
|
||||
```
|
||||
sudo apt update && sudo apt install firmware-iwlwifi
|
||||
```
|
||||
* alternatively download the deb package from: http://ftp.debian.org/debian/pool/non-free-firmware/f/firmware-nonfree/firmware-iwlwifi_20230210-5_all.deb
|
||||
* install with:
|
||||
```
|
||||
sudo dpkg -i firmware-iwlwifi_20230210-5_all.deb
|
||||
```
|
||||
|
||||
## Workflow notes
|
||||
The github workflow files are the equivalent of the Makefile commands run locally.
|
||||
The local repo owner (`GITHUB_ACTOR`) and branch (`GITHUB_HEAD_REF`) is picked up.
|
||||
|
@ -250,6 +250,30 @@ do
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################
|
||||
# SYSTEM LOG FILE SIZES
|
||||
###############################
|
||||
|
||||
# check every 15min
|
||||
recheckSync=$(($counter % 900))
|
||||
if [ ${recheckSync} -eq 1 ]; then
|
||||
echo "*** CHECK LOG FILE SIZES ***"
|
||||
# check if log file is getting too big
|
||||
logsMegaByte=$(sudo du -c -m /var/log | grep "total" | awk '{print $1;}')
|
||||
if [ ${logsMegaByte} -gt 5000 ]; then
|
||||
echo "WARN # Logs /var/log in are bigger then 5GB .. starting repair"
|
||||
debuginfo=$(ls -la /var/log/ 2>/dev/null)
|
||||
# dont delete directories - can make services crash
|
||||
sudo rm /var/log/*
|
||||
sudo service rsyslog restart
|
||||
/home/admin/config.scripts/blitz.error.sh _background.sh "log-delete" "REPAIR: /var/log/ >5GB" "Logs in /var/log in were bigger then 5GB and got emergency delete to prevent fillup." "${debuginfo}"
|
||||
sleep 10
|
||||
else
|
||||
echo "OK - logs are at ${logsMegaByte} MB - within safety limit"
|
||||
fi
|
||||
echo ""
|
||||
fi
|
||||
|
||||
####################################################
|
||||
# MONITOR Initial Syncing of Bitcoin & Lightning
|
||||
# - turn off recovery mode
|
||||
|
@ -181,6 +181,7 @@ if [ ${logsMegaByte} -gt 1000 ]; then
|
||||
sudo service rsyslog restart
|
||||
/home/admin/_cache.sh set message "WARNING: /var/log/ >1GB"
|
||||
echo "WARN # Logs in /var/log in were bigger then 1GB and got emergency delete to prevent fillup." >> $logFile
|
||||
sudo ls -la /var/log >> $logFile
|
||||
echo "If you see this in the logs please report to the GitHub issues, so LOG config needs to be optimized." >> $logFile
|
||||
sleep 10
|
||||
else
|
||||
|
@ -1,3 +1,3 @@
|
||||
# RaspiBlitz Version - always [major].[main].[sub] (sub can be a string like '2rc1')
|
||||
codeVersion="1.10.0rc5"
|
||||
codeVersion="1.10.0"
|
||||
# keep last line with comment
|
@ -27,7 +27,7 @@ if [ "$1" = "install" ]; then
|
||||
cd /home/admin/download || exit 1
|
||||
|
||||
# receive signer key
|
||||
if ! gpg --keyserver hkp://keyserver.ubuntu.com --recv-key "71A3 B167 3540 5025 D447 E8F2 7481 0B01 2346 C9A6"
|
||||
if ! gpg --keyserver hkps://keys.openpgp.org --recv-key "71A3 B167 3540 5025 D447 E8F2 7481 0B01 2346 C9A6"
|
||||
then
|
||||
echo "# FAIL # Couldn't download Wladimir J. van der Laan's PGP pubkey"
|
||||
exit 1
|
||||
|
@ -717,6 +717,11 @@ if [ "$1" = "format" ]; then
|
||||
|
||||
# formatting old: EXT4
|
||||
if [ "$2" = "ext4" ]; then
|
||||
if [ $(echo "${hdd}" | grep -c "nvme") = 0 ]; then
|
||||
nvp=""
|
||||
else
|
||||
nvp="p"
|
||||
fi
|
||||
# prepare temp mount point
|
||||
mkdir -p /tmp/ext4 1>/dev/null
|
||||
if [ $ext4IsPartition -eq 0 ]; then
|
||||
@ -733,7 +738,7 @@ if [ "$1" = "format" ]; then
|
||||
>&2 echo "# waiting until the partition gets available"
|
||||
sleep 2
|
||||
sync
|
||||
loopdone=$(lsblk -o NAME | grep -c ${hdd}1)
|
||||
loopdone=$(lsblk -o NAME | grep -c ${hdd}${nvp}1)
|
||||
loopcount=$(($loopcount +1))
|
||||
if [ ${loopcount} -gt 10 ]; then
|
||||
>&2 echo "# partition failed"
|
||||
@ -754,7 +759,7 @@ if [ "$1" = "format" ]; then
|
||||
fi
|
||||
>&2 echo "# Formatting"
|
||||
if [ $ext4IsPartition -eq 0 ]; then
|
||||
mkfs.ext4 -F -L BLOCKCHAIN /dev/${hdd}1 1>/dev/null
|
||||
mkfs.ext4 -F -L BLOCKCHAIN /dev/${hdd}${nvp}1 1>/dev/null
|
||||
else
|
||||
mkfs.ext4 -F -L BLOCKCHAIN /dev/${hdd} 1>/dev/null
|
||||
fi
|
||||
|
@ -467,6 +467,10 @@ echo "*** SYSTEM CACHE STATUS ***"
|
||||
/home/admin/_cache.sh "export" ln_default | grep -v "ln_default_address"
|
||||
/home/admin/_cache.sh "export" btc_default | grep -v "btc_default_address"
|
||||
|
||||
echo "*** POSSIBLE ERROR REPORTS ***"
|
||||
ls -1 /home/admin/error* 2>/dev/null
|
||||
echo
|
||||
|
||||
echo
|
||||
echo "*** OPTION: SHARE THIS DEBUG OUTPUT ***"
|
||||
echo "An easy way to share this debug output on GitHub or on a support chat"
|
||||
|
@ -237,7 +237,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
rm -r /home/blitzapi/blitz_api 2>/dev/null
|
||||
|
||||
# create user
|
||||
adduser --disabled-password --gecos "" blitzapi
|
||||
adduser --system --group --home /home/blitzapi blitzapi
|
||||
|
||||
# sudo capability for manipulating passwords
|
||||
/usr/sbin/usermod --append --groups sudo blitzapi
|
||||
|
@ -36,7 +36,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo ""
|
||||
|
||||
# create user
|
||||
sudo adduser --disabled-password --gecos "" bitcoinminds 2>/dev/null
|
||||
sudo adduser --system --group --home /home/bitcoinminds bitcoinminds
|
||||
|
||||
# add local directory to path and set PATH for the user
|
||||
sudo bash -c "echo 'PATH=\$PATH:/home/bitcoinminds/.local/bin' >> /home/bitcoinminds/.profile"
|
||||
|
@ -194,7 +194,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
/home/admin/config.scripts/bonus.nodejs.sh on
|
||||
|
||||
# create bos user
|
||||
sudo adduser --disabled-password --gecos "" bos
|
||||
sudo adduser --system --group --home /home/bos bos
|
||||
|
||||
echo "# Create data folder on the disk"
|
||||
# move old data if present
|
||||
|
@ -207,7 +207,7 @@ if [ "$1" = "install" ]; then
|
||||
/home/admin/config.scripts/bonus.nodejs.sh on
|
||||
|
||||
# add btcrpcexplorer user
|
||||
sudo adduser --disabled-password --gecos "" btcrpcexplorer
|
||||
sudo adduser --system --group --home /home/btcrpcexplorer btcrpcexplorer
|
||||
|
||||
# install btc-rpc-explorer
|
||||
cd /home/btcrpcexplorer
|
||||
|
@ -346,7 +346,7 @@ if [ "$1" = "install" ]; then
|
||||
fi
|
||||
|
||||
echo "# create btcpay user"
|
||||
sudo adduser --disabled-password --gecos "" btcpay
|
||||
sudo adduser --system --group --home /home/btcpay btcpay
|
||||
cd /home/btcpay || exit 1
|
||||
|
||||
echo "# install .NET"
|
||||
|
@ -77,7 +77,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# get Go vars
|
||||
source /etc/profile
|
||||
# create dedicated user
|
||||
sudo adduser --disabled-password --gecos "" circuitbreaker
|
||||
sudo adduser --system --group --home /home/circuitbreaker circuitbreaker
|
||||
# set PATH for the user
|
||||
sudo bash -c "echo 'PATH=\$PATH:/home/circuitbreaker/go/bin/' >> /home/circuitbreaker/.profile"
|
||||
|
||||
|
@ -99,7 +99,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo apt install -y virtualenv python-dev libusb-1.0-0-dev libudev-dev
|
||||
|
||||
# create dedicated user
|
||||
sudo adduser --disabled-password --gecos "" ckbunker
|
||||
sudo adduser --system --group --home /home/ckbunker ckbunker
|
||||
|
||||
# add the user to the Tor group
|
||||
sudo usermod -a -G debian-tor ckbunker
|
||||
|
@ -274,7 +274,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo
|
||||
echo "# Creating the electrs user"
|
||||
echo
|
||||
sudo adduser --disabled-password --gecos "" electrs
|
||||
sudo adduser --system --group --home /home/electrs electrs
|
||||
cd /home/electrs
|
||||
|
||||
echo
|
||||
|
@ -157,7 +157,7 @@ if [ "${mode}" = "on" ] || [ "${mode}" = "1" ]; then
|
||||
|
||||
# create dedicated user
|
||||
echo "# Add the 'faraday' user"
|
||||
sudo adduser --disabled-password --gecos "" faraday
|
||||
sudo adduser --system --group --home /home/faraday faraday
|
||||
|
||||
# set PATH for the user
|
||||
sudo bash -c "echo 'PATH=\$PATH:/home/faraday/bin/' >> /home/faraday/.profile"
|
||||
|
@ -196,7 +196,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
|
||||
# create a dedicated user for the app
|
||||
echo "# create user"
|
||||
sudo adduser --disabled-password --gecos "" ${APPID} || exit 1
|
||||
sudo adduser --system --group --home /home/${APPID} ${APPID} || exit 1
|
||||
|
||||
# add user to special groups with special access rights
|
||||
# echo "# add use to special groups"
|
||||
|
@ -30,7 +30,7 @@ if [ "$1" = on ]; then
|
||||
fi
|
||||
|
||||
# create a dedicated user
|
||||
sudo adduser --disabled-password --gecos "" fulcrum
|
||||
sudo adduser --system --group --home /home/fulcrum fulcrum
|
||||
cd /home/fulcrum || exit 1
|
||||
|
||||
sudo apt install -y libssl-dev # was needed on Debian Bullseye
|
||||
|
@ -86,7 +86,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
###############
|
||||
|
||||
# create helipad user:
|
||||
sudo adduser --disabled-password --gecos "" $HELIPAD_USER
|
||||
sudo adduser --system --group --home /home/$HELIPAD_USER $HELIPAD_USER
|
||||
|
||||
# install system dependencies:
|
||||
sudo apt --assume-yes update
|
||||
|
@ -128,7 +128,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
if [ ${isInstalled} -eq 0 ]; then
|
||||
|
||||
# add homer user
|
||||
sudo adduser --disabled-password --gecos "" homer
|
||||
sudo adduser --system --group --home /home/homer homer
|
||||
|
||||
# install homer
|
||||
cd /home/homer
|
||||
|
@ -261,7 +261,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# BACKGROUND is here to seperate running apps by unix users
|
||||
# and only give file write access to the rest of the system where needed.
|
||||
echo "# Create user"
|
||||
sudo adduser --disabled-password --gecos "" ${APPID}
|
||||
sudo adduser --system --group --home /home/${APPID} ${APPID}
|
||||
|
||||
# create a data directory on /mnt/hdd/app-data/ for the app
|
||||
# BACKGROUND is that any critical data that needs to survive an update should
|
||||
|
@ -99,7 +99,7 @@ if [ "$1" = "install" ]; then
|
||||
echo "# *** INSTALL JAM (user & code) ***"
|
||||
|
||||
echo "# Creating the ${USERNAME} user"
|
||||
sudo adduser --disabled-password --gecos "" ${USERNAME}
|
||||
sudo adduser --system --group --home /home/${USERNAME} ${USERNAME}
|
||||
|
||||
# install nodeJS
|
||||
/home/admin/config.scripts/bonus.nodejs.sh on
|
||||
|
@ -57,7 +57,7 @@ if [ "$1" = "install" ]; then
|
||||
sudo userdel -rf joinmarket 2>/dev/null
|
||||
|
||||
echo "# add the 'joinmarket' user"
|
||||
adduser --disabled-password --gecos "" joinmarket
|
||||
adduser --system --group --home /home/joinmarket joinmarket
|
||||
|
||||
# add to sudo group (required for installation)
|
||||
adduser joinmarket sudo || exit 1
|
||||
|
@ -37,7 +37,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
/home/admin/config.scripts/bonus.nodejs.sh on
|
||||
|
||||
# add user
|
||||
sudo adduser --disabled-password --gecos "" $USERNAME
|
||||
sudo adduser --system --group --home /home/$USERNAME $USERNAME
|
||||
|
||||
# install kindle-display
|
||||
echo "# install .."
|
||||
|
@ -52,7 +52,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
source /etc/profile
|
||||
|
||||
# create dedicated user
|
||||
sudo adduser --disabled-password --gecos "" lightningtipbot
|
||||
sudo adduser --system --group --home /home/lightningtipbot lightningtipbot
|
||||
|
||||
# install from source
|
||||
cd /home/lightningtipbot
|
||||
|
@ -90,7 +90,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
if [ ${isInstalled} -eq 0 ]; then
|
||||
|
||||
# create dedicated user
|
||||
sudo adduser --disabled-password --gecos "" lit
|
||||
sudo adduser --system --group --home /home/lit lit
|
||||
# make sure symlink to central app-data directory exists
|
||||
sudo rm -rf /home/lit/.lnd # not a symlink.. delete it silently
|
||||
# create symlink
|
||||
|
@ -621,7 +621,7 @@ if [ "$1" = "install" ]; then
|
||||
|
||||
# add lnbits user
|
||||
echo "*** Add the 'lnbits' user ***"
|
||||
sudo adduser --disabled-password --gecos "" lnbits
|
||||
sudo adduser --system --group --home /home/lnbits lnbits
|
||||
|
||||
# get optional github parameter
|
||||
githubUser="lnbits"
|
||||
|
@ -129,7 +129,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
###############
|
||||
|
||||
# create lndg user
|
||||
sudo adduser --disabled-password --gecos "" lndg
|
||||
sudo adduser --system --group --home /home/lndg lndg
|
||||
# add user to group with admin access to lnd
|
||||
sudo /usr/sbin/usermod --append --groups lndadmin lndg
|
||||
# make sure symlink to central app-data directory exists
|
||||
|
@ -54,7 +54,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
/home/admin/config.scripts/bonus.go.sh on
|
||||
|
||||
# create lnproxy user
|
||||
sudo adduser --disabled-password --gecos "" lnproxy
|
||||
sudo adduser --system --group --home /home/lnproxy lnproxy
|
||||
|
||||
# create macaroon
|
||||
cd /home/bitcoin || exit 1
|
||||
|
@ -53,7 +53,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
source /etc/profile
|
||||
|
||||
# create dedicated user
|
||||
sudo adduser --disabled-password --gecos "" loop
|
||||
sudo adduser --system --group --home /home/loop loop
|
||||
|
||||
# set PATH for the user
|
||||
sudo bash -c "echo 'PATH=\$PATH:/home/loop/go/bin/' >> /home/loop/.profile"
|
||||
|
@ -132,7 +132,7 @@ if [ "$1" = "install" ]; then
|
||||
sudo apt-get install -y mariadb-server mariadb-client
|
||||
|
||||
# add mempool user
|
||||
sudo adduser --disabled-password --gecos "" mempool
|
||||
sudo adduser --system --group --home /home/mempool mempool
|
||||
|
||||
# install mempool
|
||||
cd /home/mempool
|
||||
|
@ -40,7 +40,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
if [ ${isInstalled} -eq 0 ]; then
|
||||
|
||||
# create dedicated user
|
||||
sudo adduser --disabled-password --gecos "" pool
|
||||
sudo adduser --system --group --home /home/pool pool
|
||||
|
||||
echo "# persist settings in app-data"
|
||||
echo "# make sure the data directory exists"
|
||||
|
@ -29,7 +29,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo "*** INSTALL pyblocks***"
|
||||
|
||||
# create pyblock user
|
||||
sudo adduser --disabled-password --gecos "" pyblock
|
||||
sudo adduser --system --group --home /home/pyblock pyblock
|
||||
cd /home/pyblock
|
||||
sudo -u pyblock mkdir /home/pyblock/config
|
||||
|
||||
|
@ -136,7 +136,7 @@ if [ "$1" = "install" ]; then
|
||||
|
||||
# create rtl user (one for all instances)
|
||||
if [ $(compgen -u | grep -c rtl) -eq 0 ]; then
|
||||
sudo adduser --disabled-password --gecos "" rtl || exit 1
|
||||
sudo adduser --system --group --home /home/rtl rtl || exit 1
|
||||
fi
|
||||
|
||||
# download source code and set to tag release
|
||||
|
@ -213,7 +213,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo apt update
|
||||
sudo apt-get install -y virtualenv libffi-dev libusb-1.0.0-dev libudev-dev
|
||||
|
||||
sudo adduser --disabled-password --gecos "" specter
|
||||
sudo adduser --system --group --home /home/specter specter
|
||||
if [ "$(ls /home | grep -c "specter")" == "0" ]; then
|
||||
echo "error='was not able to create user specter'"
|
||||
exit 1
|
||||
|
@ -387,7 +387,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
/home/admin/config.scripts/lnd.keysend.sh on
|
||||
|
||||
echo "*** Add the 'sphinxrelay' user ***"
|
||||
sudo adduser --disabled-password --gecos "" sphinxrelay
|
||||
sudo adduser --system --group --home /home/sphinxrelay sphinxrelay
|
||||
sudo /usr/sbin/usermod --append --groups lndadmin sphinxrelay
|
||||
sudo /usr/sbin/usermod --append --groups lndsigner sphinxrelay
|
||||
sudo /usr/sbin/usermod --append --groups lndrouter sphinxrelay
|
||||
|
@ -110,7 +110,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
if [ ${isInstalled} -eq 0 ]; then
|
||||
|
||||
echo "*** Add the 'squeaknode' user ***"
|
||||
sudo adduser --disabled-password --gecos "" squeaknode
|
||||
sudo adduser --system --group --home /home/squeaknode squeaknode
|
||||
|
||||
# make sure needed debian packages are installed
|
||||
echo "# installing needed packages"
|
||||
|
@ -28,7 +28,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
/home/admin/config.scripts/bonus.nodejs.sh on
|
||||
|
||||
# add user
|
||||
sudo adduser --disabled-password --gecos "" $USERNAME
|
||||
sudo adduser --system --group --home /home/$USERNAME $USERNAME
|
||||
|
||||
# install stacking-sats-kraken
|
||||
cd $HOME_DIR
|
||||
|
@ -63,7 +63,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
/home/admin/config.scripts/bonus.nodejs.sh on
|
||||
|
||||
# add user
|
||||
sudo adduser --disabled-password --gecos "" $USERNAME
|
||||
sudo adduser --system --group --home /home/$USERNAME $USERNAME
|
||||
|
||||
# install tallycoin_connect
|
||||
cd $HOME_DIR
|
||||
|
@ -161,7 +161,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# BACKGROUND is here to seperate running apps by unix users
|
||||
# and only give file write access to the rest of the system where needed.
|
||||
echo "# create user"
|
||||
sudo adduser --disabled-password --gecos "" ${APPID} || exit 1
|
||||
sudo adduser --system --group --home /home/${APPID} ${APPID} || exit 1
|
||||
|
||||
# add user to special groups with special access rights
|
||||
# BACKGROUND there are some unix groups available that will give the access to
|
||||
|
@ -96,7 +96,7 @@ if [ "$1" = "install" ]; then
|
||||
/home/admin/config.scripts/bonus.nodejs.sh on
|
||||
|
||||
# create thunderhub user
|
||||
sudo adduser --disabled-password --gecos "" thunderhub
|
||||
sudo adduser --system --group --home /home/thunderhub thunderhub
|
||||
|
||||
# download and install
|
||||
sudo -u thunderhub git clone https://github.com/apotdevin/thunderhub.git /home/thunderhub/thunderhub
|
||||
|
Loading…
x
Reference in New Issue
Block a user