Fix installer

I must be really tired...
This commit is contained in:
Michael De Roover 2022-01-02 04:36:02 +01:00
parent dd528c01e5
commit 4000af3d58
Signed by: vim
GPG Key ID: 075496E232CE04CB

View File

@ -29,6 +29,7 @@ mkuser(){
if [ -e /sbin/adduser ] if [ -e /sbin/adduser ]
then then
adduser -S telelog adduser -S telelog
addgroup -S telelog
return 0 return 0
fi fi
} }
@ -36,7 +37,7 @@ mkuser(){
addfiles(){ addfiles(){
# Install executable and config # Install executable and config
install -dm770 -o root -g telelog /var/telelog install -dm770 -o root -g telelog /var/telelog
install -m640 -o root -g telelog config.py /var/ubot/config.py install -m640 -o root -g telelog config.py /var/telelog/config.py
install -m755 -o root -g root bin/telelog /usr/bin/telelog install -m755 -o root -g root bin/telelog /usr/bin/telelog
# Install service files on installed inits # Install service files on installed inits
@ -64,7 +65,6 @@ mkuser
[ -f config.py ] && addfiles [ -f config.py ] && addfiles
# Run Telethon for the first time # Run Telethon for the first time
echo "Please log in to Telegram now."
umask 0077 umask 0077
[ -f setup.py ] && su bot -s /usr/bin/python3 $PWD/setup [ -f setup.py ] && su bot -s /usr/bin/python3 $PWD/setup