mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 00:21:23 +00:00
minor fix
This commit is contained in:
parent
96cdd36e01
commit
59eb9fd9b3
@ -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'
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user