1
0
Fork 0
refactor/models
Matthew 2020-07-01 00:54:29 -04:00
parent dfa6e6e642
commit 07e3e7ffdb
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 1 additions and 2 deletions

View File

@ -15,8 +15,7 @@ export default class SystemD_Status extends Command {
if (!args[0]) return this.client.commands.get('help').run(message, ['systemd', this.name]);
const account = await this.client.db.Account.findOne({ userID: message.author.id }).lean().exec();
if (!account) return this.error(message.channel, 'You do not have a Cloud Services account.');
const cmd = await this.client.util.exec(`runuser ${account.username} -c 'DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/\${UID}/bus" systemctl --user s
tatus ${args[0]}'`);
const cmd = await this.client.util.exec(`runuser ${account.username} -c 'DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/\${UID}/bus" systemctl --user status ${args[0]}'`);
if (cmd.includes('could not be found')) return this.error(message.channel, 'The service name you provided doesn\'t exist.');
const embed = new RichEmbed();
embed.setTitle(`SystemD Status | ${args[0]}`);