And I could not execute this to the required solution.
At first, I created a
.sh file with a cron job, and it's not working. I also tried the other answers too, but I could not figure out why shell script doesn't run.
And I even tried executing it directly by the below commands.
sh solr_startup.sh sh solr_startup.sh
But I got an error that 1. Cannot find the directory 2. Cannot execute the Java file and script code below
#!/bin/bash cd /opt/solr/example/solr/example java -jar start.jar
/opt/solr/example is my Solr home directory.
Is there a way to create a cron or automated job or a file that can run on startup?