CC-2016: Rearrange python scripts for reusability
-Added api_client to PYTHONPATH env variable
This commit is contained in:
parent
5c8719d90c
commit
079878e5f0
4 changed files with 9 additions and 4 deletions
|
@ -3,12 +3,16 @@ pypo_user="pypo"
|
|||
export HOME="/home/pypo/"
|
||||
# Location of pypo_cli.py Python script
|
||||
pypo_path="/opt/pypo/bin/"
|
||||
api_client_path="/opt/pypo/"
|
||||
pypo_script="pypo-cli.py"
|
||||
echo "*** Daemontools: starting daemon"
|
||||
cd ${pypo_path}
|
||||
exec 2>&1
|
||||
|
||||
PYTHONPATH=${api_client_path}:$PYTHONPATH
|
||||
export PYTHONPATH
|
||||
|
||||
# Note the -u when calling python! we need it to get unbuffered binary stdout and stderr
|
||||
exec setuidgid ${pypo_user} \
|
||||
python -u ${pypo_path}${pypo_script} \
|
||||
-f
|
||||
python -u ${pypo_path}${pypo_script}
|
||||
# EOF
|
||||
|
|
|
@ -94,6 +94,7 @@ try:
|
|||
sys.exit(1)
|
||||
|
||||
copy_dir("%s/.."%current_script_dir, BASE_PATH+"bin/")
|
||||
copy_dir("%s/../../api_clients"%current_script_dir, BASE_PATH+"api_clients/")
|
||||
|
||||
print "Setting permissions"
|
||||
os.system("chmod -R 755 "+BASE_PATH)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue