Created
May 26, 2015 18:20
-
-
Save wdullaer/50418e82727eb08c0ddd to your computer and use it in GitHub Desktop.
BubbleUPnP Server Systemd Unit
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
[Unit] | |
Description=BubbleUPnP Server | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
Type=simple | |
Environment=DEFAULTFILE=/etc/default/bubbleupnpserver | |
Restart=on-failure | |
ExecStartPre=/usr/share/bubbleupnpserver/startService.sh | |
ExecStart=/usr/share/bubbleupnpserver/launch.sh ${OPTS} | |
[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
#!/bin/bash | |
if [ -f "$DEFAULTFILE" ]; then | |
. "$DEFAULTFILE" | |
else | |
USER=root | |
DATADIR=/root/.bubbleupnpserver | |
HTTP_PORT=58050 | |
HTTPS_PORT=58051 | |
fi | |
# Make sure daemon is started with system locale | |
if [ -r /etc/default/locale ]; then | |
. /etc/default/locale | |
export LANG | |
fi | |
OPTS="-dataDir ${DATADIR} -httpPort ${HTTP_PORT} -httpsPort ${HTTPS_PORT} -nologstdout" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment