-
Create a script file
nano autoUpdateHostsOnSystemRestart.sh
and save it in your desired directory. (Here, I've saved it in my/home/user
directory) -
Paste the below script content in the file.
-
Remember to make your script executable using the command
chmod +x autoUpdateHostsOnSystemRestart.sh
. Then you can run your script with./autoUpdateHostsOnSystemRestart.sh
. -
Create a new service file in /etc/systemd/system/ with a .service extension, for example myscript.service. You can use
sudo nano /etc/systemd/system/updateHosts.service
to open a new file in the nano text editor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Stop the mongod process | |
sudo systemctl stop mongod | |
# Remove any MongoDB packages that you had previously installed. | |
sudo apt-get purge mongodb* | |
# Remove MongoDB databases and log files. | |
sudo rm -r /var/log/mongodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Stop the mongod process | |
sudo systemctl stop mongod | |
# Remove any MongoDB packages that you had previously installed. | |
sudo apt-get purge mongodb* | |
# Remove MongoDB databases and log files. | |
sudo rm -r /var/log/mongodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// XPath CheatSheet | |
// To test XPath in your Chrome Debugger: $x('/html/body') | |
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
// 0. XPath Examples. | |
// More: http://xpath.alephzarro.com/content/cheatsheet.html | |
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker: node index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file was initially generated by Windows Terminal 1.0.1401.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", |
NewerOlder