fixed service name in systemctl call

This commit is contained in:
Specoolazius 2022-04-02 22:13:11 +02:00
parent 88c4bd1992
commit 9ac6d5ecb1

View File

@ -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()