Coder Social home page Coder Social logo

setup-nginx-wordpress's People

Contributors

riser101 avatar

Watchers

 avatar  avatar

setup-nginx-wordpress's Issues

Why Hardcode password?

Hi,
Why you hardcoded MySQL password

 conn=pymysql.connect(user='root',passwd='m')

Its security loop hole in your script. You must generated random password during run time or let users decide which password to use.

Script must install required modules first

Hello,
While running your script, we are getting import errors.
You must create install script, which will install all dependencies first.

root@vagrant-ubuntu-trusty-64:~# python3 rtcamp-assign.py php
Traceback (most recent call last):
  File "rtcamp-assign.py", line 4, in <module>
    import pymysql
ImportError: No module named 'pymysql'

Used non pythonic way

Hi,
You used most of shell commands in your script. Such as following part of your code:

os.system('ln -s /etc/nginx/sites-available/'+domainName+' /etc/nginx/sites-enabled/')
os.system('mkdir -p /var/www/'+domainName+'/htdocs/ /var/www/'+domainName+'/logs/ && cd /var/www/'+domainName+'/htdocs/')
os.system('wget http://wordpress.org/latest.tar.gz')
os.system('tar --strip-components=1 -xvf latest.tar.gz && rm latest.tar.gz')
os.system('chown -R www-data:www-data /var/www/'+domainName+'/ ')

instead of os.system("shell command") you must use python functions to all this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.