Last active
April 11, 2016 10:46
-
-
Save mcomisso/1faaf88dd2745d2d8314dbd2baa8478d to your computer and use it in GitHub Desktop.
Nginx dependencies
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
#!/bin/bash | |
# !!! | |
# chmod +sx this script (sudo + exec) | |
# | |
if [ "$(id -u)" != "0" ]; then | |
echo "Run this script with sudo or as root" 1>&2 | |
exit 1 | |
fi | |
# Install libraries | |
apt-get install build-essential libpng-dev libjpeg-dev -y --force-yes | |
# Install dependencies | |
apt-get install python-dev python-pip python-virtualenv openssh-server nginx supervisor mysql-server libmysqlclient-dev -y --force-yes | |
CURRENT_USER=$(who am i | awk '{print $1}') | |
if [ "$(id -Gn)" != *"www-data"*]; then | |
echo "Setup user groups" | |
groupadd nuxie | |
adduser $CURRENT_USER www-data | |
adduser www-data $CURRENT_USER | |
fi | |
# Print the status | |
echo "*** Check the following groups for the current user ***" | |
echo "Groups of" $CURRENT_USER | |
groups $CURRENT_USER | |
echo "" | |
echo "groups of www-data:" | |
groups www-data | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment