forked from bewiwi/DemoInstance
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from pmsipilot/fix_8_ownership
Adding trigger in dev_demoinstance launcher to fix ownership
- Loading branch information
Showing
6 changed files
with
46 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
#!/usr/bin/python | ||
#!/bin/bash | ||
|
||
import sys | ||
set -o errexit | ||
set -o pipefail | ||
set -o nounset | ||
|
||
sys.path.insert(1, "/opt/demoinstance/backend/") | ||
|
||
from demoinstance.cli import cli_entrypoint | ||
print "DemoInstance Dev Environment" | ||
cli_entrypoint() | ||
function finish { | ||
echo "Fixing file permissions: it might take some time" | ||
if [ -d "/opt/demoinstance/backend/demoinstance" ]; then | ||
cd /opt/demoinstance/backend/demoinstance | ||
chown -R `stat -c "%u:%g" .` . | ||
fi | ||
} | ||
|
||
|
||
trap finish EXIT | ||
|
||
|
||
python2 /opt/demoinstance/dev_demoinstance.py $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/python | ||
|
||
import sys | ||
|
||
sys.path.insert(1, "/opt/demoinstance/backend/") | ||
|
||
from demoinstance.cli import cli_entrypoint | ||
print "DemoInstance Dev Environment" | ||
cli_entrypoint() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[supervisord] | ||
nodaemon=true | ||
|
||
[program:backend] | ||
command=bash /opt/demoinstance/dev_demoinstance -c /etc/demoinstance/config.ini | ||
stdout_logfile=/dev/fd/1 | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/fd/2 | ||
stderr_logfile_maxbytes=0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters