This commit is contained in:
Justin (shocknet) 2024-07-05 16:37:13 -04:00
parent 9203f55ae7
commit 8c458feb63

View file

@ -1,7 +1,12 @@
#!/bin/bash #!/bin/bash
start_services() { start_services() {
USER_HOME=$(eval echo ~$(whoami)) if [ "$EUID" -eq 0 ]; then
USER_HOME=$(getent passwd ${SUDO_USER} | cut -d: -f6)
else
USER_HOME=$HOME
fi
if [ "$OS" = "Linux" ]; then if [ "$OS" = "Linux" ]; then
if [ "$SYSTEMCTL_AVAILABLE" = true ]; then if [ "$SYSTEMCTL_AVAILABLE" = true ]; then
sudo bash -c "cat > /etc/systemd/system/lnd.service <<EOF sudo bash -c "cat > /etc/systemd/system/lnd.service <<EOF