Mayank
5 years ago
No known key found for this signature in database
GPG Key ID: D037D60476CE748C
6 changed files with
5 additions and
58 deletions
-
stage2/01-sys-tweaks/files/rc.local
-
stage2/02-net-tweaks/00-packages
-
stage2/06-prepare-home-dir/01-run.sh
-
stage2/07-set-bitcoind-perms/01-run.sh
-
stage2/08-configure-tor/01-run.sh
-
stage2/08-configure-tor/files/torrc
|
|
@ -39,19 +39,11 @@ if [ ! -f /home/umbrel/statuses/disk-partitioned ]; then |
|
|
|
fi |
|
|
|
|
|
|
|
if [ ! -f /home/umbrel/statuses/service-configured ]; then |
|
|
|
if [ -f /home/umbrel/bin/rpcauth.py ]; then |
|
|
|
echo "Running rpcauth.py, and generating secrets for bitcoind" |
|
|
|
cd /home/umbrel/bin/ |
|
|
|
./rpcauth.py lncm | tee /home/umbrel/secrets/generated.txt | head -2 | tail -1 > /home/umbrel/secrets/rpcauth.txt |
|
|
|
tail -1 /home/umbrel/secrets/generated.txt > /home/umbrel/secrets/rpcpass.txt |
|
|
|
echo "Updating bitcoin.conf" |
|
|
|
cat /home/umbrel/secrets/rpcauth.txt >> /home/umbrel/bitcoin/bitcoin.conf |
|
|
|
# Update RPC Passwords for both LND and INVOICER |
|
|
|
RPCPASS=`cat /home/umbrel/secrets/rpcpass.txt` |
|
|
|
sed -i "s/RPCPASS/${RPCPASS}/g;" /home/umbrel/docker-compose.yml |
|
|
|
sed -i "s/RPCPASS/${RPCPASS}/g;" /home/umbrel/lnd/lnd.conf |
|
|
|
|
|
|
|
# Making this as done so we don't go through updates again |
|
|
|
if [ -f /home/umbrel/configure-box.sh ]; then |
|
|
|
echo "Running configuration script" |
|
|
|
cd /home/umbrel |
|
|
|
./configure-box.sh || exit 1 |
|
|
|
# Marking this as done so we don't do configuration again |
|
|
|
touch /home/umbrel/statuses/service-configured |
|
|
|
chown -R umbrel.umbrel /home/umbrel/statuses/service-configured |
|
|
|
fi |
|
|
|
|
|
@ -2,7 +2,6 @@ wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libert |
|
|
|
raspberrypi-net-mods |
|
|
|
dhcpcd5 |
|
|
|
net-tools |
|
|
|
tor |
|
|
|
libzbar-dev |
|
|
|
libzbar0 |
|
|
|
python3-pip |
|
|
|
|
|
@ -1,7 +0,0 @@ |
|
|
|
# Save password (for createwallet script). |
|
|
|
# We will remove this later when a more suitable secure system is finalized. |
|
|
|
touch $ROOTFS_DIR/home/$FIRST_USER_NAME/.save_password |
|
|
|
|
|
|
|
echo "Executables directory" |
|
|
|
mkdir -p $ROOTFS_DIR/home/$FIRST_USER_NAME/bin |
|
|
|
|
|
|
@ -1,10 +0,0 @@ |
|
|
|
# TODO: configure username and password (internally) |
|
|
|
|
|
|
|
echo "Downloading password utility" |
|
|
|
cd ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/bin |
|
|
|
curl "https://raw.githubusercontent.com/bitcoin/bitcoin/master/share/rpcauth/rpcauth.py" 2>/dev/null 1>rpcauth.py |
|
|
|
chmod 755 rpcauth.py |
|
|
|
|
|
|
|
on_chroot << EOF |
|
|
|
chown -R ${FIRST_USER_NAME}:${FIRST_USER_NAME} /home/${FIRST_USER_NAME} |
|
|
|
EOF |
|
|
@ -1,6 +0,0 @@ |
|
|
|
# TODO: configure username and password (internally) |
|
|
|
|
|
|
|
chmod 644 files/torrc |
|
|
|
mkdir -p ${ROOTFS_DIR}/etc/tor/ |
|
|
|
echo "Overriding TORRC" |
|
|
|
cp files/torrc ${ROOTFS_DIR}/etc/tor/torrc |
|
|
@ -1,21 +0,0 @@ |
|
|
|
SocksPort 9050 # Default: Bind to localhost:9050 for local connections. |
|
|
|
|
|
|
|
Log notice syslog |
|
|
|
Log debug file /var/log/tor/debug.log |
|
|
|
|
|
|
|
#RunAsDaemon 1 |
|
|
|
|
|
|
|
DataDirectory /var/lib/tor |
|
|
|
ControlPort 9051 |
|
|
|
# Default password for umbrel tor |
|
|
|
HashedControlPassword 16:50A873DF18C00F4A6048BF1CEF7E7AA66478F0B5134DA4369D80657F26 |
|
|
|
# Backwards compatibility |
|
|
|
CookieAuthentication 1 |
|
|
|
|
|
|
|
# Allow this for now |
|
|
|
# TOR HOSTNAME |
|
|
|
HiddenServiceDir /var/lib/tor/sshd |
|
|
|
HiddenServicePort 22 127.0.0.1:22 |
|
|
|
|
|
|
|
HiddenServiceDir /var/lib/tor/web |
|
|
|
HiddenServicePort 80 127.0.0.1:80 |