-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.flx
25 lines (20 loc) · 895 Bytes
/
.flx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[permission]
public_html/dispatch.fcgi 775
# Replace admin password with Database password.
# tmp_db_pw will be removed when deploy.
[replace]
tmp_db_pw DUMMY_DB_PASSWORD DB_PASSWORD
[setup]
# These commands will be executed when setup.
wget -q http://www.web2py.com/examples/static/web2py_src.zip
# unzip command is not installed in fluxflex.
# I tried "python -m zipfile -e web2py_src.zip", but the commmand
# did't work well. So, I use perl module.
perl -e 'use Archive::Extract; Archive::Extract->new(archive => "web2py_src.zip")->extract(to => "./");'
cp -r web2py/* public_html
rm web2py_src.zip
rm -r web2py
[deploy]
python -c "import os; os.chdir('./public_html'); from gluon.widget import console;console();"
python -c "p=open('tmp_db_pw', 'r').readline()[:-1]; import os; os.chdir('./public_html'); from gluon.main import save_password; save_password(p, 443)"
rm tmp_db_pw