summaryrefslogtreecommitdiffstats
path: root/admin/Sources/Clients/ogagent/macos/scripts/postinstall
blob: ebb2ca48293d54f790291d6c106cebb49a0ff7d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env sh

# Directories
SRCDIR=$(dirname "$0")
BINDIR=/usr/bin
INITDIR=/Library/LaunchDaemons

# Check if it needs to install Python dependencies:
if ! which pip &>/dev/null; then
    easy_install pip
    pip install netifaces requests six
fi

# Copying files.
cp $SRCDIR/ogagent $BINDIR
cp $SRCDIR/es.opengnsys.ogagent.plist $INITDIR