mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			359 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			359 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| apt-get update
 | |
| apt-get install -y npm
 | |
| apt-get install -y nodejs
 | |
| npm install -g forever
 | |
| ln -s /usr/bin/nodejs /usr/bin/node
 | |
| DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/server
 | |
| forever stopall
 | |
| CMD="forever start -l /var/log/zoff.log -a --workingDir $DIR $DIR/server.js"
 | |
| crontab -l | { cat; echo "@reboot" $CMD; } | crontab -
 | |
| $CMD
 | |
| echo $CMD
 |