summaryrefslogtreecommitdiff
path: root/linux.go
blob: ee244200faa43bf5c2812b9fc2e73ccabdccf84f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//go:build linux && go1.7
// +build linux,go1.7

// put stuff in here that you only want compiled under linux

package shell

import (
	"log"
	"os"
	"os/signal"
	"syscall"

	"github.com/wercker/journalhook"
)

var sigChan chan os.Signal

func handleSignal(err interface{}, ret int) {
	log.Println("handleSignal() only should be compiled on linux")
	sigChan = make(chan os.Signal, 3)
	signal.Notify(sigChan, syscall.SIGUSR1)
}

func UseJournalctl() {
	journalhook.Enable()
}