##// END OF EJS Templates
py3: fix non-ASCII URLs - decode unicode correctly before passing them to controllers as unicode strings...
py3: fix non-ASCII URLs - decode unicode correctly before passing them to controllers as unicode strings This is needed for supporting localized repo path names in the path of URLs. Some references: https://www.python.org/dev/peps/pep-0333/#unicode-issues https://bugs.python.org/issue16679 http://lucumr.pocoo.org/2010/5/25/wsgi-on-python-3/ https://bugs.launchpad.net/pecan/+bug/1451842 https://github.com/tipabu/eventlet/commit/a5a7751b013fe99b6d30acbca79e819770e9ae5d

File last commit:

r6509:2c3d3009 default
r8082:6c381371 default
Show More
kallithea-daemon-arch
70 lines | 1.3 KiB | text/plain | TextLexer
/ init.d / kallithea-daemon-arch
#!/bin/bash
###########################################
#### THIS IS AN ARCH LINUX RC.D SCRIPT ####
###########################################
. /etc/rc.conf
. /etc/rc.d/functions
DAEMON=kallithea
APP_HOMEDIR="/srv"
APP_PATH="$APP_HOMEDIR/$DAEMON"
CONF_NAME="production.ini"
LOG_FILE="/var/log/$DAEMON.log"
PID_FILE="/run/daemons/$DAEMON"
APPL=/usr/bin/gearbox
RUN_AS="*****"
ARGS="serve --daemon \
--user=$RUN_AS \
--group=$RUN_AS \
--pid-file=$PID_FILE \
--log-file=$LOG_FILE \
-c $APP_PATH/$CONF_NAME"
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
if [[ -r $PID_FILE ]]; then
read -r PID < "$PID_FILE"
if [[ $PID && ! -d /proc/$PID ]]; then
unset PID
rm_daemon $DAEMON
fi
fi
case "$1" in
start)
stat_busy "Starting $DAEMON"
export HOME=$APP_PATH
[ -z "$PID" ] && $APPL $ARGS &>/dev/null
if [ $? = 0 ]; then
add_daemon $DAEMON
stat_done
else
stat_fail
exit 1
fi
;;
stop)
stat_busy "Stopping $DAEMON"
[ -n "$PID" ] && kill $PID &>/dev/null
if [ $? = 0 ]; then
rm_daemon $DAEMON
stat_done
else
stat_fail
exit 1
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
stat_busy "Checking $name status";
ck_status $name
;;
*)
echo "usage: $0 {start|stop|restart|status}"
esac