-----BEGIN WEBFACTION INSTALL SCRIPT-----
"""
DokuWiki 2007-06-26b
Notes:
- Assuming that DokuWiki is going to be accessible at
http://www.example.com/ after it has been installed and added to a
website you will need to visit http://www.example.com/install.php to set
the administrator's password, username, etcetera.
Requirements:
- 1 Application
"autostart": "not applicable"
"extra info": "leave empty"
"""
import sys
import xmlrpclib
def create(app_name, server, session_id):
app = server.create_app(session_id, app_name, 'static', False, '')
cmd = (
'wget -q http://wf.davidsissitka.com/api/scripts/dokuwiki/2007-06-26b/dokuwik\\'
'i-2007-06-26b.tgz;'
'tar fxz dokuwiki-2007-06-26b.tgz;'
'mv --target-directory=. dokuwiki-2007-06-26b/* dokuwiki-2007-06-26b/.htaccess;'
)
server.system(session_id, cmd)
server.set_apache_acl(session_id, ('conf/', 'data/'), 'rwx', True)
cmd = (
'rm dokuwiki-2007-06-26b.tgz index.html;'
'rmdir dokuwiki-2007-06-26b/;'
)
server.system(session_id, cmd)
print app['id']
def delete(app_name, server, session_id):
server.delete_app(session_id, app_name)
def main(action, username, password, machine, app_name, autostart, extra_info):
server = xmlrpclib.Server('https://api.webfaction.com/')
session_id, account = server.login(username, password, machine)
globals()[action](app_name, server, session_id)
if __name__ == '__main__':
try:
main(*sys.argv[1:])
except xmlrpclib.Fault, e:
print e.faultString
-----END WEBFACTION INSTALL SCRIPT-----