diff --git a/bin/lemp.sh b/bin/lemp.sh index a1f581b..fe4cc30 100755 --- a/bin/lemp.sh +++ b/bin/lemp.sh @@ -153,6 +153,7 @@ echo -e "Installing Composer" sleep 3 export COMPOSER_HOME=/usr/local/composer curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +ln -sf /usr/local/bin/composer /usr/bin/composer composer about echo -e "Composer installed" @@ -167,12 +168,14 @@ echo -e "Installing Drush and DrupalConsole" sleep 3 curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal chmod +x /usr/local/bin/drupal +ln -sf /usr/local/bin/drupal /usr/bin/drupal drupal about # curl https://github.com/drush-ops/drush-launcher/releases/download/0.6.0/drush.phar -L -o /usr/local/bin/drush wget -O /usr/local/bin/drush https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar chmod +x /usr/local/bin/drush - -echo -e "Drush and DrupalConsoleinstalled" +ln -sf /usr/local/bin/drush /usr/bin/drush +drush status +echo -e "Drush and DrupalConsole installed" # for non composer installed D7 site add assets/d7-drush-composer.json in root-folder/composer.json and run composer install @@ -193,6 +196,8 @@ chown -R www:www /var/lib/nginx chown -R www:www /var/www/html chown -R www:www /var/tmp/nginx +sed -i "s|user nginx;|user www;|i" /etc/nginx/nginx.conf + mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.ori cp "$_assets"/lemp/default.nginxconf /etc/nginx/conf.d/default.conf cp "$_assets"/lemp/index.php /var/www/html/ diff --git a/bin/user.sh b/bin/user.sh index 18d9b7b..8635a4b 100755 --- a/bin/user.sh +++ b/bin/user.sh @@ -39,6 +39,8 @@ adduser "$user" sed -i "s/$user:\/bin\/ash/$user:\/bin\/bash/g" /etc/passwd +usermod -a -G www "$user" + # TODO limiting su to the admin group yn="reset" while [ "$yn" != "y" ] && [ "$yn" != "n" ] diff --git a/install.sh b/install.sh index cccc2cc..d114456 100755 --- a/install.sh +++ b/install.sh @@ -7,6 +7,8 @@ echo -e ' /_/ \_\_| .__/_|_||_\___| |____|___|_| |_|_| |_| ' +# https://wiki.alpinelinux.org/wiki/Alpine_setup_scripts + echo -e "\033[35;1mThis script has been tested only on Alpine Linux \033[0m" . bin/checkroot.sh diff --git a/readme.md b/readme.md index 55d3b38..81e7616 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# Install web server and secure it on alpine linux 3.9 +# Install web server and secure it on alpine linux 3.12 ## Branches each alpine linux stable release has it's branch (master is a clone of the last one)