rename process using pm2 programmatic api : <p>I have an electron app which uses pm2 to start some apps using the pm2 module.Everything is fine.However I am trying to implement the following feature:Renaming an app you have started.I know that using the cli I can do the following:</p>

<p><code>pm2 restart app --name"New name"</code>;</p>

<p>So I found the <code>pm2.restart</code> function which takes an Object and a callback as a parameter.So I tried this:</p>

<pre><code>var options = {app:"Blogsport App",name:"New name"};
var callback = function(err){
   if(err) {console.log('Failed')}
   else {console.log('App renamed')}
};

pm2.restart(options,callback);
</code></pre>

<p>This will always log "App renamed".However If I do <code>pm2 list</code> I see that the app has not be renamed.Is there anything I can do to rename an app without deleting it and start it again with a different name?</p>
