-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from terwey/linux
Adds a Linux systemd file and an install script
- Loading branch information
Showing
3 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=A simple server allowing you to query/control multiple local Harmony Home Hubs over HTTP or MQTT | ||
After=network.target | ||
|
||
[Service] | ||
ExecStart=/var/lib/harmony-api/script/server | ||
SyslogIdentifier=harmony-api | ||
Restart=on-failure | ||
RestartSec=10 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash -x | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
INSTALL_PATH=/var/lib/harmony-api | ||
CONF_PATH=/etc/harmony-api | ||
|
||
echo "Installing harmony-api for Linux..." | ||
mkdir -p ${INSTALL_PATH} | ||
cp -R * ${INSTALL_PATH} | ||
ln -sf ${INSTALL_PATH}/config ${CONF_PATH} | ||
ln -sf ${INSTALL_PATH}/config/harmony-api-server.service /etc/systemd/system/ | ||
systemctl enable harmony-api-server.service |