feat(cli): Add uninstall command to CLI and update shutdown delay for graceful VM shutdown
This commit is contained in:
@ -514,9 +514,10 @@ export class NupstSnmp {
|
||||
public async initiateShutdown(reason: string): Promise<void> {
|
||||
console.log(`Initiating system shutdown due to: ${reason}`);
|
||||
try {
|
||||
// Execute shutdown command
|
||||
const { stdout } = await execAsync('shutdown -h +1 "UPS battery critical, shutting down in 1 minute"');
|
||||
// Execute shutdown command with 5 minute delay to allow for VM graceful shutdown
|
||||
const { stdout } = await execAsync('shutdown -h +5 "UPS battery critical, shutting down in 5 minutes"');
|
||||
console.log('Shutdown initiated:', stdout);
|
||||
console.log('Allowing 5 minutes for VMs to shut down safely');
|
||||
} catch (error) {
|
||||
console.error('Failed to initiate shutdown:', error);
|
||||
// Try a different method if first one fails
|
||||
|
Reference in New Issue
Block a user