You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
onionr/install/onionr

16 lines
419 B

#!/bin/sh
set -e
if [[ $EUID -eq 0 ]]; then
export ONIONR_HOME=${ONIONR_HOME:-/var/lib/onionr}
export LOG_DIR=${LOG_DIR:-/var/log/onionr}
else
export ONIONR_HOME=${ONIONR_HOME:-${XDG_DATA_HOME:-$HOME/.local/share}/onionr}
export LOG_DIR=${LOG_DIR:-$ONIONR_HOME/logs}
fi
mkdir -p "$ONIONR_HOME" "$LOG_DIR"
chmod 0700 "$ONIONR_HOME" "$LOG_DIR"
exec ${ONIONR_BASEDIR:-/usr/share/onionr}/onionr.sh "$@"