#! /bin/bash

set -e

'/Library/Application Support/wsdd-native/wsdd-native.app/Contents/MacOS/wsdd-native' || true

CONF=/etc/wsddn.conf
if [[ ! -f "$CONF" ]]; then
     cp $CONF.sample $CONF
fi

/bin/launchctl load -w "/Library/LaunchDaemons/io.github.gershnik.wsddn.plist"
