mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 08:17:03 +00:00
when app is running, server restarts when it exits or disconnects
This commit is contained in:
@@ -52,11 +52,22 @@ function server() {
|
||||
console.error(`server: ${data}`)
|
||||
})
|
||||
|
||||
proc.on('exit', () => {
|
||||
console.log('Restarting...');
|
||||
server();
|
||||
})
|
||||
|
||||
proc.on('disconnect', () => {
|
||||
console.log('Restarting...');
|
||||
server();
|
||||
})
|
||||
|
||||
process.on('exit', () => {
|
||||
proc.kill()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function installCLI() {
|
||||
const symlinkPath = '/usr/local/bin/ollama'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user