@porosys/pss
Version:
Porosys Server Setup (pss): General-purpose server setup and automation tool (including Netdata management)
16 lines (15 loc) • 521 B
JavaScript
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);
}
};