2019-03-28 18:01:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
[ "root" != "$USER" ] && exec sudo $0 "$@"
|
|
|
|
|
|
|
|
export OUTPUT_DIR=${OUTPUT_DIR:=/usr/share/onionr}
|
2019-03-28 19:03:37 +00:00
|
|
|
export ONIONR_HOME=${ONIONR_HOME:=/etc/onionr}
|
2019-03-28 18:01:23 +00:00
|
|
|
export LOG_DIR=${LOG_DIR:=/var/log/onionr}
|
|
|
|
|
2019-03-29 06:18:25 +00:00
|
|
|
cd "$OUTPUT_DIR/onionr"
|
2019-03-30 23:02:16 +00:00
|
|
|
|
|
|
|
command="python3.7 onionr.py '$@'"
|
|
|
|
echo $command
|
|
|
|
exec su onionr -s /bin/sh -c "$command"
|