#!/bin/bash
#
# reload-bridgedb
# -----------------
# This script is used to reload an instance which has already been configured
# and installed, and is currently running.
#
# :authors: sysrqb <sysrqb@torproject.org> 0x017DD169EA793BE2
#           isis <isis@torproject.org> 0xA3ADB67A2CDB8B35
# :licence: This file is part of BridgeDB, please see the LICENSE file,
#           included with BridgeDB for more info.
# :copyright: (c) 2014-2015 The Tor Project, Inc.
#             (c) 2014-2015 Matthew Finkel
#             (c) 2014-2015 Isis Lovecruft
#-------------------------------------------------------------------------------

. /srv/bridges.torproject.org/etc/environment-production

printf "Reloading BridgeDB..."
kill -HUP $(cat "$BRIDGEDB_PIDFILE")

STATUS="$?"
if test "$STATUS" == "0" ; then printf "\t\t[OK]\n" ; else printf "\t\t[FAIL]\n" ; fi
exit $STATUS
