How to Auto Start Mirroring Service on Linux Host

We have successfully configured the mirroring service, but we currently have to manually restart the service after the host server is rebooted.

Do you know how can automatically start the service post reboot?

The manual command we current issue is shown below,

#cd “/home/git-data/repositories/@hashed/12/53”
#JAVA_HOME=/fserver/engine/jdk/linux/jdk-12 subgit-3.3.11/bin/subgit install 1253e9373e781b7500266caa55150e08e210bc8cd8cc70d89985e3600155e860.git


That is correct, SubGit daemon, which is responsible for the mirror, is not configured to start automatically after the system reboot so it should be scheduled additionally. The daemon can be started either by subgit install <REPO> or subgit fetch <REPO> command or by the very first push to a mirrored repository. So it might be left as it is, the daemon will start on the first push, but the drawback is that the SVN commits are not being synchronized while the daemon is not running; they will be received once it starts, but it may take time and it might be a long after the SVN revision was created. If that is not acceptable, then it’s better to schedule either install or fetch command to run on the system start to start the daemon.

Thank you for your reply.
We will need to schedule using the subgit install command as this is what we are currently using to start the SubGit daemon.
Would you suggest using a shell script to run the following?

#cd “/home/git-data/repositories/@hashed/12/53”
#JAVA_HOME=/fserver/engine/jdk/linux/jdk-12 subgit-3.3.11/bin/subgit install 1253e9373e781b7500266caa55150e08e210bc8cd8cc70d89985e3600155e860.git


yes, that would be correct way to start the daemon.

Do you know if there is a command to show the status of the daemon?
i.e how can I view that the daemon is running?


I’m afraid there is no special command for that, but it can be checked out by checking SubGit process running.

Would you expect to see a process called SubGit or is it not that obvious?

If the service was running and I ran the command to start it again,

cd “/home/git-data/repositories/@hashed/12/53”
JAVA_HOME=/fserver/engine/jdk/linux/jdk-12 subgit-3.3.11/bin/subgit install 1253e9373e781b7500266caa55150e08e210bc8cd8cc70d89985e3600155e860.git

I that going to cause a problem do you think?

no, it’s not a process called subgit, it’s rather a java process, but the full command would contain the word subgit so you can use it to find the process, like follows:

ps aux | grep subgit
alex      1521  0.0  1.2 6034220 212156 ?      Ssl  янв17  24:07 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -noverify -client -Djava.awt.headless=true -Djna.nosys=true -Dsvnkit.http.methods=Digest,Basic,NTLM,Negotiate -cp /home/alex/pr2/subgit/lib/subgit-3.3.12_4417_fat.jar org.tmatesoft.translator.SubGitDaemon test --svn /home/alex/pr2 --limit 1642424601144