From 03b5e60a979f5fe56e45f2a0a66e5e3e33b8fb5b Mon Sep 17 00:00:00 2001 From: Michael De Roover Date: Sat, 1 Jan 2022 22:40:27 +0100 Subject: [PATCH] Use /var/ubot as data directory --- bin/ubot | 2 +- install | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/ubot b/bin/ubot index 2ee894a..620b306 100755 --- a/bin/ubot +++ b/bin/ubot @@ -2,7 +2,7 @@ from telethon import TelegramClient, events from config import * -client = TelegramClient('ubot', api_id, api_hash) +client = TelegramClient('/var/ubot/ubot', api_id, api_hash) @client.on(events.NewMessage) async def edit(event): diff --git a/install b/install index 8e49bac..ae00482 100755 --- a/install +++ b/install @@ -41,9 +41,9 @@ mkuser(){ addfiles(){ # Install executable and config - mkdir /etc/ubot - install -o root -g bot -m640 config.py /etc/ubot/config.py - install -m755 bin/ubot /usr/bin/ubot + install -m770 -o root -g bot /var/ubot + install -m640 -o root -g bot config.py /var/ubot/config.py + install -m755 -o root -g root bin/ubot /usr/bin/ubot # Install service files on installed inits if [ -e /sbin/openrc ]