mirror of https://github.com/hak5/overseer.git
29 lines
588 B
Go
29 lines
588 B
Go
// +build linux darwin
|
|
|
|
package overseer
|
|
|
|
//this file attempts to contain all posix
|
|
//specific stuff, that needs to be implemented
|
|
//in some other way on other OSs... TODO!
|
|
|
|
import (
|
|
"os/exec"
|
|
"syscall"
|
|
)
|
|
|
|
var (
|
|
supported = true
|
|
uid = syscall.Getuid()
|
|
gid = syscall.Getgid()
|
|
SIGUSR1 = syscall.SIGUSR1
|
|
SIGUSR2 = syscall.SIGUSR2
|
|
SIGTERM = syscall.SIGTERM
|
|
)
|
|
|
|
func move(dst, src string) error {
|
|
//HACK: we're shelling out to mv because linux
|
|
//throws errors when crossing device boundaryes.
|
|
//TODO see sys_posix_mv.go
|
|
return exec.Command("mv", src, dst).Run()
|
|
}
|