sudo in restart

This commit is contained in:
Vladless
2024-11-29 00:01:48 +03:00
parent 00efebc377
commit 2dd3d3e2a7
+1 -1
View File
@@ -259,7 +259,7 @@ async def confirm_restart_bot(callback_query: CallbackQuery, state: FSMContext):
builder.row(InlineKeyboardButton(text="🔙 Вернуться в меню", callback_data="admin"))
try:
subprocess.run(
["systemctl", "restart", "bot.service"],
["sudo", "systemctl", "restart", "bot.service"],
check=True,
capture_output=True,
text=True,