Join Stack Overflow to learn, share knowledge, and build your career. Connect and share knowledge within a single location that is structured and easy to search. What I do is I have a file called onboot. Contents of that file would be:. The L is optional. It will create a file called screenlog.
Thank you for your feedback!
In this tutorial I'll go over how to setup a VPS instance aka droplet on DigitalOcean, transfer your code to it using git and FileZilla, and have the code run either all the time, and link to resources that explain how to run it periodically using cron. This tutorial is aimed at total beginners and will go over every step of the process with all the necessary code and screenshots being included and will not focus on the more advanced stuff. Because of the target audience I will not focus on some of the things that you should do when setting up a server such as using an ssh key, creating a new non-root user, fail2ban etc. Every section will also have a short summary of the content - mostly so you can easily create notes or go over the steps again if necessary without reading the whole thing.
1. Creating a droplet
If you have a VPS or Dedicated server , you might be interested in finding the status of that server without having to wait at a terminal window. Instead, you can run a script that emails you this information about the status of your server. This only applies to your web server. The script is named status. Once you've downloaded the script successfully, you must make sure that the mailx package is installed on your PS. You can only install mailx on a Dedicated server with an admin user. This is because it requires sudo. Once logged in, run the following command:. View the Crontab article for details on how to create a cron job under your shell user. Enter the following command in the panel when creating the cron job:.
VPS benchmark script — based on the popular bench. Work fast with our official CLI. Learn more. If nothing happens, download GitHub Desktop and try again. If nothing happens, download Xcode and try again. If nothing happens, download the GitHub extension for Visual Studio and try again. The script was originally intended to be used only by me, so I didn't put much effort into ensuring safety, security, and interoperability.