From 73e5cd6a83692fdabaa2a270590bb39582a82b84 Mon Sep 17 00:00:00 2001 From: Kunal Singh Date: Thu, 14 Dec 2023 21:33:07 +0530 Subject: [PATCH] feat: running app as current user, not as meltcd user --- scripts/install.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index e21f315..6e26d03 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -105,13 +105,20 @@ install_success() { trap install_success EXIT configure_systemd() { - if ! id meltcd >/dev/null 2>&1; then - status "Creating meltcd user..." - $SUDO useradd -r -s /bin/false -m -d /usr/share/meltcd meltcd - fi - - status "Adding current user to meltcd group..." - $SUDO usermod -a -G meltcd $(whoami) + # Running meltcd application as meltcd user + # if enabled in future then add the bellow 2 linex in the meltcd.service file + # --- + # User=meltcd + # Group=meltcd + # --- + # + # if ! id meltcd >/dev/null 2>&1; then + # status "Creating meltcd user..." + # $SUDO useradd -r -s /bin/false -m -d /usr/share/meltcd meltcd + # fi + + # status "Adding current user to meltcd group..." + # $SUDO usermod -a -G meltcd $(whoami) status "Creating meltcd systemd service..." cat </dev/null @@ -121,8 +128,6 @@ After=network-online.target [Service] ExecStart=$BINDIR/meltcd serve -User=meltcd -Group=meltcd Restart=always RestartSec=3 Environment="PATH=$PATH"