RhinoReminds/start_service.sh

16 lines
605 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
2018-12-27 14:05:40 +00:00
cd data;
source .xmpp_credentials;
2018-12-27 14:05:40 +00:00
# Execute & disown
# We pass the environment variables explicitly here, as then we don't accidentally pass something private.
# Better to be safe than sorry - defence in depth!
export XMPP_JID;
export XMPP_PASSWORD;
# Create the pidfile directory
mkdir /run/rhinoreminds; chmod 0700 /run/rhinoreminds; chown rhinoreminds:rhinoreminds /run/rhinoreminds;
2019-03-28 23:04:52 +00:00
sudo -E -u rhinoreminds bash -c '/usr/bin/mono ../bin/RhinoReminds.exe --auto-exit --domain starbeamrainbowlabs.com --avatar avatar.png & echo "$!" >/run/rhinoreminds/rhinoreminds.pid; disown'