Skip to content

Instantly share code, notes, and snippets.

@wdullaer
Created May 26, 2015 18:20
Show Gist options
  • Save wdullaer/50418e82727eb08c0ddd to your computer and use it in GitHub Desktop.
Save wdullaer/50418e82727eb08c0ddd to your computer and use it in GitHub Desktop.
BubbleUPnP Server Systemd Unit
[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
#!/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