From 39c1deacc0c05c2b6d85e892ffe8fe64fa5ad652 Mon Sep 17 00:00:00 2001 From: Michael De Roover Date: Thu, 30 Dec 2021 15:22:35 +0100 Subject: [PATCH] Separate user creation --- install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install b/install index 43a6f49..8e49bac 100755 --- a/install +++ b/install @@ -23,7 +23,7 @@ mkconfig(){ echo "logchat = $logchat" >> config.py } -addfiles(){ +mkuser(){ # Create user account, distro mess awaits here... # Debian has both useradd and adduser if [ -e /sbin/useradd ] @@ -37,7 +37,9 @@ addfiles(){ adduser -S bot return 0 fi +} +addfiles(){ # Install executable and config mkdir /etc/ubot install -o root -g bot -m640 config.py /etc/ubot/config.py @@ -58,6 +60,8 @@ addfiles(){ pip3 install -U telethon # Generate config if not built yet [ ! -f config.py ] && mkconfig +# Create a new user +mkuser # Install files if config is (now) present [ -f config.py ] && addfiles