wiki-plugin-allyabase 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/server.js +6 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-plugin-allyabase",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Allyabase management plugin for the federated wiki",
5
5
  "keywords": [
6
6
  "wiki",
package/server/server.js CHANGED
@@ -153,17 +153,17 @@ function killProcessByPort(port) {
153
153
  });
154
154
  }
155
155
 
156
- // Function to stop PM2 and all managed services
156
+ // Function to stop PM2-managed allyabase services (not the daemon itself,
157
+ // since wiki may also be running under PM2)
157
158
  async function stopPM2() {
158
- console.log('[wiki-plugin-allyabase] Stopping PM2 and all services...');
159
+ console.log('[wiki-plugin-allyabase] Stopping allyabase services...');
159
160
 
160
161
  return new Promise((resolve) => {
161
- // Try to stop PM2 gracefully using pm2 kill
162
- exec('pm2 kill', (err, stdout, stderr) => {
162
+ exec('pm2 stop all', (err, stdout, stderr) => {
163
163
  if (err) {
164
- console.log(`[wiki-plugin-allyabase] PM2 kill failed (might not be running): ${err.message}`);
164
+ console.log(`[wiki-plugin-allyabase] pm2 stop all failed (might not be running): ${err.message}`);
165
165
  } else {
166
- console.log(`[wiki-plugin-allyabase] PM2 killed successfully`);
166
+ console.log(`[wiki-plugin-allyabase] Allyabase services stopped`);
167
167
  }
168
168
 
169
169
  // Clean up PID file