From 9ac6d5ecb143f30c3c7b680355aefda59e4d12e0 Mon Sep 17 00:00:00 2001 From: Specoolazius Date: Sat, 2 Apr 2022 22:13:11 +0200 Subject: [PATCH] fixed service name in systemctl call --- bot/extensions/admin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot/extensions/admin.py b/bot/extensions/admin.py index ac67a5b..6f9f053 100644 --- a/bot/extensions/admin.py +++ b/bot/extensions/admin.py @@ -40,6 +40,7 @@ class Admin(discord.Cog): async def __restart_service(self, ctx: discord.ApplicationContext) -> None: await ctx.respond('attempting restart...') self.bot.logger.info('Restarting bot...') - process = await asyncio.create_subprocess_shell(cmd='sudo systemctl restart') - await process.communicate() + + process = await asyncio.create_subprocess_shell(cmd=f'sudo systemctl restart {self.bot.config.service_name}') + # await process.communicate()