TiagoShadow
Cadet
- Joined
- Dec 15, 2021
- Messages
- 7
Hi Everyone,
I've recently installed TrueNAS on my server, it was previously a Windows machine for general Game Servers and NodeJs Web App, but I wanted to have a personal cloud service so I decided to try this, so I'm recently new to TrueNas and unexperienced when it comes to Linux.
I was able to configure and set up Nextcloud with localstorage and a mountpoint to a windows shared dataset, so I could access my cloud folders from the network, there was a lot of documentation and videos explaining.
But when it comes to NodeJS there is no almost nothing online, I've created a default jail, and installed node and npm packages to it. I wanted to run nodejs server from a folder inside nextcloud, I was able to do achieve, the only setback was since the I've these folders also shared with windows network, I cannot install node modules in those folders, only globally
So all I had to do to start Node was to 'envset' the path to Nodejs global modules, and then I could run my nodejs app with no problems in shell, but if I close the window my server closes and when I open the shell again the 'envset' I've created is gone. I've looked and the solution for this was to create a rc script
I've created the following script and saved it on '/ect/rc.d' folder, but it does not work. When I restart the jail nothing happens...
I've recently installed TrueNAS on my server, it was previously a Windows machine for general Game Servers and NodeJs Web App, but I wanted to have a personal cloud service so I decided to try this, so I'm recently new to TrueNas and unexperienced when it comes to Linux.
I was able to configure and set up Nextcloud with localstorage and a mountpoint to a windows shared dataset, so I could access my cloud folders from the network, there was a lot of documentation and videos explaining.
But when it comes to NodeJS there is no almost nothing online, I've created a default jail, and installed node and npm packages to it. I wanted to run nodejs server from a folder inside nextcloud, I was able to do achieve, the only setback was since the I've these folders also shared with windows network, I cannot install node modules in those folders, only globally
So all I had to do to start Node was to 'envset' the path to Nodejs global modules, and then I could run my nodejs app with no problems in shell, but if I close the window my server closes and when I open the shell again the 'envset' I've created is gone. I've looked and the solution for this was to create a rc script
I've created the following script and saved it on '/ect/rc.d' folder, but it does not work. When I restart the jail nothing happens...