2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-22 20:19:01 +00:00

minor fix

This commit is contained in:
Pratik Vyas 2014-11-25 22:55:27 +05:30
parent 96cdd36e01
commit 59eb9fd9b3
2 changed files with 6 additions and 6 deletions

View File

@ -5,9 +5,9 @@ import os
import shutil
def restart_service(service):
if os.path.basename(get_program(['systemctl'])) == 'systemctl' and is_running_systemd():
if os.path.basename(get_program(['systemctl']) or '') == 'systemctl' and is_running_systemd():
exec_cmd("{prog} restart {service}".format(prog='systemctl', service=service))
elif os.path.basename(get_program(['service'])) == 'service':
elif os.path.basename(get_program(['service']) or '') == 'service':
exec_cmd("{prog} {service} restart ".format(prog='service', service=service))
else:
raise Exception, 'No service manager found'

View File

@ -299,13 +299,13 @@ setup_debconf() {
install_bench() {
run_cmd sudo su $FRAPPE_USER -c "cd /home/$FRAPPE_USER && git clone https://github.com/frappe/bench bench-repo"
if hash pip-2.7; then
if hash pip-2.7 &> /dev/null; then
PIP="pip-2.7"
elif hash pip2.7; then
elif hash pip2.7 &> /dev/null; then
PIP="pip2.7"
elif hash pip2; then
elif hash pip2 &> /dev/null; then
PIP="pip2"
elif hash pip; then
elif hash pip &> /dev/null; then
PIP="pip"
else
echo PIP not installed