mirror of
https://github.com/Specoolazius/mcserver-discordbot.git
synced 2024-11-25 02:59:42 +01:00
fixed service name in systemctl call
This commit is contained in:
parent
88c4bd1992
commit
9ac6d5ecb1
@ -40,6 +40,7 @@ class Admin(discord.Cog):
|
|||||||
async def __restart_service(self, ctx: discord.ApplicationContext) -> None:
|
async def __restart_service(self, ctx: discord.ApplicationContext) -> None:
|
||||||
await ctx.respond('attempting restart...')
|
await ctx.respond('attempting restart...')
|
||||||
self.bot.logger.info('Restarting bot...')
|
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()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user