func StartSync(moddir, jaildir, modname string) (*os.Process, os.Error) { //hho := exec.PassThrough deamon, err := osutil.RunWithEnv("jail-deamon", nil, []string{"WFDR_MODDIR=" + moddir, "WFDR_JAILDIR=" + jaildir, "WFDR_MODNAME=" + modname}) if err != nil { return nil, os.NewError(fmt.Sprint("Could not start sync deamon, css, js, and template files will not be synced:", err)) } return deamon.Process, nil }
func JailInit(moddir, jaildir, modname string) os.Error { osutil.WaitRun("wfdr-reload-shared", nil) setup, err := osutil.RunWithEnv("jail-init", nil, []string{"WFDR_MODDIR=" + moddir, "WFDR_JAILDIR=" + jaildir, "WFDR_MODNAME=" + modname}) if err != nil { return os.NewError(fmt.Sprint("Could not run script to initialize jail:", err, " PATH:", os.Getenv("PATH"))) } setup.Wait() return nil }