Mercurial > kallithea
view init.d/kallithea-daemon-arch @ 8759:0b1a23b88f9a
cleanup: get rid of redundant assignments 'foo = foo'
Redundant assignments were searched with:
grep '^ *\(.*\) = \1$' `hg files`
Some of these cases have resulted from earlier cleanup, like:
foo = safe_unicode(foo)
and later batch removing safe_unicode usage. See e.g. commit
e35373106528b29461b7f5144780cb9ec79f765d .
Note: two false positives occur:
kallithea/tests/models/test_settings.py:39:
setting.app_settings_value = setting.app_settings_value
kallithea/tests/models/test_settings.py:42:
setting.app_settings_value = setting.app_settings_value
which is not a plain assignment but where 'app_settings_value' is a property
method with side effects.
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Sat, 07 Nov 2020 20:59:03 +0100 |
parents | 2c3d30095d5e |
children |
line wrap: on
line source
#!/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