NethServer Version: 6.10
How do I set the scheduled restart?
It can be done by using a cron job:
Why would you want to?
Because the hardware on which nethsecurity is installed has little RAM and lately the system, in some situations it becomes very slow, even a restart becomes difficult. It also happens that some Hosts are unable to surf the internet, a proxy problem. I believe that setting a reboot scheduled in a time of non-use, for example at night, could benefit the system, but it is naturally just my guess
It seems like the better solution would be to use adequate hardware for your use case, rather than band-aid over the problem with a periodic restart.
You’re right, however, RAM costs a lot for servers. For the moment I wanted to solve this, or at least try
If I wanted to create a script instead. How can it be done?
It’s just one command so I’d recommend to use the crontab manager in this case.
To use a script create a file, for example /usr/local/sbin/yourscript
, with following content:
#!/bin/bash
/sbin/shutdown -r now
Make it executable
chmod a+x /usr/local/sbin/yourscript
If you don’t want to use the crontab manager you may put a line to /etc/crontab
as described here:
Other option could be split the installation in two, disengaging Firewall and Proxy from the other server functions.
An old PC should fit, with 4gb of ram and at least dual core CPU, if it’s an old business PC also power consumption should be not that much (120-150W)
Instead of a full shutdown and restart - why not just restart the various services?
Is it easier to do? What advantages does this solution offer?
Its not easier to do, but its not more difficult either. Its just a case of running a couple of systemctl restart <servicename>
commands.
The benefit of doing this is that your entire server (and all of the services) do not go down completely for 5-15 minutes (or however long it takes for the server to go down and com back up completely).
The added benefit is that the services will become available more quickly as opposed to a reboot of the server.
@nicovon how’s going your troubleshotting session?
I didn’t make any changes anymore because I think it’s useless