Skip to content

ToddCostella/system-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

system-utils

Utility Scripts to manage environment.

update-hosts

Used to replace/add entries in /etc/hosts.

Assumes IP address to add is in system clipboard. Useful when spinning up digital ocean instances that I want to associate with hosts entry.

sudo update-hosts <alias>

If is not defined the default do-dev will be used.

Utility Script

Copy update-hosts.groovy to /usr/local/bin/update-hosts

sudo ./deploy-script.sh

Root shell configuration

Groovy and Java need to be configured in the root shell as the update-hosts needs to run as root (due to changing /etc/hosts)

sudo su
curl -s "https://get.sdkman.io" | bash
source "/root/.sdkman/bin/sdkman-init.sh"
sdk i groovy
sdk i java
ln -sf /root/.sdkman/candidates/groovy/current/bin/groovy /usr/bin/groovy

Add following line to /usr/bin/groovy

export JAVA_HOME=/root/.sdkman/candidates/java/11.0.7.hs-adpt

Other useful bits

Change /etc/ssh/ssh_config HashKnownHosts no (makes reading ~/.ssh/known_hosts easier)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published