Fix start/upgrade scripts to properly restart the backend processes
This commit is contained in:
		
							parent
							
								
									648f9960a3
								
							
						
					
					
						commit
						d0d578350a
					
				@ -22,7 +22,7 @@
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "build": "tsc",
 | 
			
		||||
    "start": "npm run build && node dist/index.js",
 | 
			
		||||
    "production": "until false;do npm install;npm run build;node dist/index.js;sleep 1;done",
 | 
			
		||||
    "production": "npm install && npm run build && node dist/index.js",
 | 
			
		||||
    "test": "echo \"Error: no test specified\" && exit 1"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
for site in mainnet liquid testnet
 | 
			
		||||
do
 | 
			
		||||
    cd "${HOME}/${site}/backend/"
 | 
			
		||||
    screen -dmS "${site}" npm run production
 | 
			
		||||
    screen -dmS "${site}" sh -c 'while true;do npm run production;sleep 1;done'
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
#cd "${HOME}/webhook/"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user