diff --git a/rootfs/standard/etc/systemd/system/specter.service b/rootfs/standard/etc/systemd/system/specter.service index f633afa6..664f3675 100644 --- a/rootfs/standard/etc/systemd/system/specter.service +++ b/rootfs/standard/etc/systemd/system/specter.service @@ -3,12 +3,11 @@ [Unit] Description=Specter -Wants=bitcoind.service lnd.service -After=bitcoind.service lnd.service +Wants=bitcoind.service +After=bitcoind.service [Service] ExecStartPre=/usr/bin/is_not_shutting_down.sh -ExecStartPre=/usr/bin/wait_on_lnd.sh ExecStartPre=/usr/bin/mynode_gen_cert.sh specter 825 #ExecStartPre=/usr/bin/mynode_pre_specter.sh WorkingDirectory=/opt/mynode/specter diff --git a/rootfs/standard/usr/bin/mynode_startup.sh b/rootfs/standard/usr/bin/mynode_startup.sh index 7bd68aa0..964ef032 100755 --- a/rootfs/standard/usr/bin/mynode_startup.sh +++ b/rootfs/standard/usr/bin/mynode_startup.sh @@ -132,6 +132,7 @@ mkdir -p /mnt/hdd/mynode/docker mkdir -p /mnt/hdd/mynode/rtl_backup mkdir -p /mnt/hdd/mynode/whirlpool mkdir -p /mnt/hdd/mynode/lnbits +mkdir -p /mnt/hdd/mynode/specter mkdir -p /tmp/flask_uploads echo "drive_mounted" > $MYNODE_DIR/.mynode_status chmod 777 $MYNODE_DIR/.mynode_status @@ -257,6 +258,19 @@ if [ -d /opt/mynode/lnbits ]; then chown bitcoin:bitcoin /opt/mynode/lnbits/.env fi +# Setup Specter +if [ -d /home/bitcoin/.specter ]; then + # Migrate to HDD + cp -r -f /home/bitcoin/.specter/* /mnt/hdd/mynode/specter/ + chown -R bitcoin:bitcoin /mnt/hdd/mynode/specter + rm -rf /home/bitcoin/.specter + sync +fi +if [ ! -L /home/bitcoin/.specter ]; then + # Setup symlink to HDD + sudo -u bitcoin ln -s /mnt/hdd/mynode/specter /home/bitcoin/.specter +fi + # Setup udev chown root:root /etc/udev/rules.d/* || true udevadm trigger @@ -325,6 +339,10 @@ USER=$(stat -c '%U' /mnt/hdd/mynode/lnbits) if [ "$USER" != "bitcoin" ]; then chown -R bitcoin:bitcoin /mnt/hdd/mynode/lnbits fi +USER=$(stat -c '%U' /mnt/hdd/mynode/specter) +if [ "$USER" != "bitcoin" ]; then + chown -R bitcoin:bitcoin /mnt/hdd/mynode/specter +fi USER=$(stat -c '%U' /mnt/hdd/mynode/redis) if [ "$USER" != "redis" ]; then chown -R redis:redis /mnt/hdd/mynode/redis