{"size": 813, "ext": "js", "max_stars_repo_path": "archived-scripts/shutdown.js", "max_stars_repo_name": "annapoulakos/bitburner", "max_stars_repo_stars_event_min_datetime": "2022-02-02T04:28:48.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-02T04:28:48.000Z", "max_issues_repo_path": "archived-scripts/shutdown.js", "max_issues_repo_name": "annapoulakos/bitburner", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "archived-scripts/shutdown.js", "max_forks_repo_name": "annapoulakos/bitburner", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.6363636364, "max_line_length": 60, "alphanum_fraction": 0.6125461255}
import * as utils from '/scripts/lib/utilities.js';
const localStorage = globalThis['window'].localStorage;
let ns;

/**
    * @param {NS} _ns
    */
export async function main(_ns) {
    ns = _ns;
    utils.configure(_ns);

    utils.log('[shutdown:main] => stopping service mesh');
    //* InfoDaemon
    const infoPid = localStorage.getItem('pid:info-daemon');
    ns.kill('/bin/info-daemon.js', 1);
    //*/

    /* KubeDaemon
    ns.exec('/bin/kube-daemon.js', 'home', 1);
    localStorage.setItem('pid:kube-daemon', infoPid);
    //*/

    /* BatchDaemon
    ns.exec('/bin/batch-daemon.js', 'home', 1);
    localStorage.setItem('pid:batch-daemon', infoPid);
    //*/

    /* HacknetDaemon
    ns.exec('/bin/hacknet-daemon.js', 'home', 1);
    localStorage.setItem('pid:hacknet-daemon', infoPid);
    //*/
}
