forked from engineering/cloudservices
fixes
parent
dfa6e6e642
commit
07e3e7ffdb
|
@ -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]);
|
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();
|
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.');
|
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
|
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]}'`);
|
||||||
tatus ${args[0]}'`);
|
|
||||||
if (cmd.includes('could not be found')) return this.error(message.channel, 'The service name you provided doesn\'t exist.');
|
if (cmd.includes('could not be found')) return this.error(message.channel, 'The service name you provided doesn\'t exist.');
|
||||||
const embed = new RichEmbed();
|
const embed = new RichEmbed();
|
||||||
embed.setTitle(`SystemD Status | ${args[0]}`);
|
embed.setTitle(`SystemD Status | ${args[0]}`);
|
||||||
|
|
Loading…
Reference in New Issue