abenkbp commited on
Commit
2f6cf8a
·
1 Parent(s): 584c69a
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -16,8 +16,9 @@ if not os.path.exists("/home/user/.flag"):
16
  subprocess.Popen("curl -o- file:///home/user/app/data/config_nginx.sh | bash", shell=True, executable='/bin/bash').wait()
17
  subprocess.Popen("curl -o- file:///home/user/app/data/setup.sh | bash", shell=True, executable='/bin/bash').wait()
18
  subprocess.Popen("source /home/user/.bashrc && source /home/user/.nvm/nvm.sh && nvm install --lts && npm update -g npm", shell=True, executable='/bin/bash').wait()
19
- subprocess.Popen("npm install -g n8n", shell=True, executable='/bin/bash').wait()
20
- subprocess.Popen("npm install -g forever", shell=True, executable='/bin/bash').wait()
 
21
  node_version_dir = subprocess.check_output("ls ~/.nvm/versions/node", shell=True, executable='/bin/bash').strip().decode('utf-8')
22
  node_path = f"/home/user/.nvm/versions/node/{node_version_dir}/bin/"
23
  subprocess.Popen(["forever", "start", f"{node_path}n8n"]).wait()
 
16
  subprocess.Popen("curl -o- file:///home/user/app/data/config_nginx.sh | bash", shell=True, executable='/bin/bash').wait()
17
  subprocess.Popen("curl -o- file:///home/user/app/data/setup.sh | bash", shell=True, executable='/bin/bash').wait()
18
  subprocess.Popen("source /home/user/.bashrc && source /home/user/.nvm/nvm.sh && nvm install --lts && npm update -g npm", shell=True, executable='/bin/bash').wait()
19
+ subprocess.Popen("npm install n8n@latest -g", shell=True, executable='/bin/bash').wait()
20
+ subprocess.Popen("npm install forever@latest -g", shell=True, executable='/bin/bash').wait()
21
+ subprocess.Popen("npm install pm2@latest -g", shell=True, executable='/bin/bash').wait()
22
  node_version_dir = subprocess.check_output("ls ~/.nvm/versions/node", shell=True, executable='/bin/bash').strip().decode('utf-8')
23
  node_path = f"/home/user/.nvm/versions/node/{node_version_dir}/bin/"
24
  subprocess.Popen(["forever", "start", f"{node_path}n8n"]).wait()