I'm currently working on making a text file of the whole process of setting up my server for my normal usage.
And would like to know if there is any way to write a shell script so that I can make the "nano" insert content, save it, exit it, and then continue with the rest of my commands.
Cause when I put all of this into the shell script:
sudo nano /etc/apache2/conf-available/fqdn.conf
ServerName localhost
sudo a2enconf fqdn
Then it shows the "nano" file editor with this content:
ServerName localhost
sudo a2enconf fqdn
Well, while I wanted it to save and exit after the ServerName localhost
, so that my script could continue.
Would that be posibble anyhow?