Hamachi:Startup script: Debian

From LogMeInWiki

Jump to: navigation, search

Script

Debian.txt


Notes

Copy and paste that into a file called /etc/init.d/hamachi and then do a chmod 744 /etc/init.d/hamachi. Then run the command update-rc.d hamachi defaults 60 and it will startup when the computer restarts.

Updates for Debian 5.0

I found that this version of the file did not work for me (and MediaWiki won't let me upload a new textfile). Here are the changes I needed to make:

First, add the LSB information: (See: http://wiki.debian.org/LSBInitScripts)

   ### BEGIN INIT INFO
   # Provides:          hamachi
   # Required-Start:    $remote_fs $network
   # Required-Stop:     $remote_fs $network
   # Default-Start:     2 3 4 5
   # Default-Stop:      0 1 6
   # Short-Description: Start Hamachi VPN service
   # Description:       Starts Hamachi and resumes last state
   ### END INIT INFO

I also had to comment out the following line from the start section, because it was hanging my computer. YMMV.

  $sHamachi -c $sHamachiConfig get-nicks >/dev/null

Finally, I added a status option, but this is not necessary:

  status)
     $sHamachi -c $sHamachiConfig
  ;;

Credit: vrillusions
Discussion Here


Note: This article was written for the Hamachi 1.x version. Some features and functionality may be different, missing, or using different steps in Hamachi version 2.x . If you wish to update this article to cover Hamachi2, change the {{{c-hamachi}}} tag to {{{c-hamachi2}}} after your edits.


Personal tools