let watcher self update
This commit is contained in:
parent
b7ae6c6464
commit
582f74ceb1
@ -24,9 +24,13 @@ export async function main(ns : NS) : Promise<void> {
|
|||||||
})
|
})
|
||||||
|
|
||||||
for(const process of processes) {
|
for(const process of processes) {
|
||||||
|
if(process.filename != ns.getScriptName()) {
|
||||||
ns.tprint(`INFO: Restarting ${process.filename} ${process.args} -t ${process.threads}`)
|
ns.tprint(`INFO: Restarting ${process.filename} ${process.args} -t ${process.threads}`)
|
||||||
ns.kill(process.pid, ns.getHostname())
|
ns.kill(process.pid, ns.getHostname())
|
||||||
ns.run(process.filename, process.threads, ...process.args)
|
ns.run(process.filename, process.threads, ...process.args)
|
||||||
|
} else {
|
||||||
|
ns.spawn(process.filename, process.threads, ...process.args)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hashes[file] = hash
|
hashes[file] = hash
|
||||||
|
Loading…
Reference in New Issue
Block a user