github.com/cloudbase/juju-core@v0.0.0-20140504232958-a7271ac7912f/juju/osenv/vars_nix.go (about)

     1  // Copyright 2013 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  // +build !windows
     4  
     5  package osenv
     6  
     7  import (
     8  	"os"
     9      "path"
    10  )
    11  
    12  // Home returns the os-specific home path as specified in the environment
    13  func Home() string {
    14  	return os.Getenv("HOME")
    15  }
    16  
    17  // SetHome sets the os-specific home path in the environment
    18  func SetHome(s string) error {
    19  	return os.Setenv("HOME", s)
    20  }
    21  
    22  var (
    23      TempDir    = "/tmp"
    24      LibDir     = "/var/lib"
    25      LogDir     = "/var/log"
    26      DataDir    = path.Join(LibDir, "juju")
    27      JujuRun    = "/usr/local/bin/juju-run"
    28      SocketType = "unix"
    29      MustReboot = 101
    30  )