1
0

fix binary path

This commit is contained in:
andrea
2025-07-26 19:09:34 +02:00
parent a948db5af3
commit 4d3dd5c781

4
bot.py
View File

@@ -39,11 +39,11 @@ async def update_bot(update, context):
chat_id = update.effective_chat.id chat_id = update.effective_chat.id
if update.message.chat.id not in _botsyms.SUPER_USERS: return _log.log_warning(f'update_bot: user {chat_id} not allowed') if update.message.chat.id not in _botsyms.SUPER_USERS: return _log.log_warning(f'update_bot: user {chat_id} not allowed')
_log.log_debug(f'update_bot: {chat_id} bot is updating...') _log.log_debug(f'update_bot: {chat_id} bot is updating...')
err= _os.system(f'cd {_botsyms.BOT_PATH}; git pull') err= _os.system(f'cd {_botsyms.BOT_PATH}; /usr/bin/git pull')
if err: if err:
_log.log_error(f'update_bot: {chat_id} error {err} while trying to update the app') _log.log_error(f'update_bot: {chat_id} error {err} while trying to update the app')
return await update.message.reply_text('Errore durante l\'aggiornamento del Bot') return await update.message.reply_text('Errore durante l\'aggiornamento del Bot')
err= _os.system('systemctl --user start battle_royale.service') err= _os.system('/usr/bin/systemctl --user start battle_royale.service')
if err: if err:
_log.log_error(f'update_bot: {chat_id} error {err} while trying to upstart the app') _log.log_error(f'update_bot: {chat_id} error {err} while trying to upstart the app')
return await update.message.reply_text('Errore durante il riavvio del Bot') return await update.message.reply_text('Errore durante il riavvio del Bot')