totally refactored
This commit is contained in:
parent
19b9f2a609
commit
907d7e574b
13 changed files with 372 additions and 252 deletions
|
|
@ -1,4 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
LOG_FILE=/var/log/rpxy/rpxy.log
|
||||
|
||||
/run.sh 2>&1 | tee $LOG_FILE
|
||||
if [ -z ${LOG_TO_FILE} ]; then
|
||||
LOG_TO_FILE=false
|
||||
fi
|
||||
|
||||
if "${LOG_TO_FILE}"; then
|
||||
echo "rpxy: Start with writing log file"
|
||||
/run.sh 2>&1 | tee $LOG_FILE
|
||||
else
|
||||
echo "rpxy: Start without writing log file"
|
||||
/run.sh 2>&1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -52,12 +52,9 @@ cp -p /etc/cron.daily/logrotate /etc/cron.hourly/
|
|||
service cron start
|
||||
|
||||
# debug level logging
|
||||
if [ -z $LOG_LEVEL ]; then
|
||||
LOG_LEVEL=info
|
||||
if [ ${DEBUG} ]; then
|
||||
echo "Logging in debug mode"
|
||||
LOG_LEVEL=debug
|
||||
fi
|
||||
|
||||
echo "Start rpxy"
|
||||
fi
|
||||
echo "rpxy: Logging with level ${LOG_LEVEL}"
|
||||
|
||||
RUST_LOG=${LOG_LEVEL} /opt/rpxy/sbin/rpxy --config ${CONFIG_FILE}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue