UNPKG

@porosys/pss

Version:

Porosys Server Setup (pss): General-purpose server setup and automation tool (including Netdata management)

17 lines (16 loc) 496 B
export const uninstallStatsd = async () => { const { execa } = await import('execa'); const { existsSync } = await import('fs'); if (!existsSync('/opt/statsd/stats.js')) { console.log( 'ℹ️ statsd is not installed at /opt/statsd. Nothing to uninstall.', ); return; } try { await execa('rm', ['-rf', '/opt/statsd']); console.log('✅ statsd uninstalled from /opt/statsd'); } catch (err) { console.error('❌ Failed to uninstall statsd:', err); } };