Преглед изворни кода

update wordpress setup

pull/3/head
Cian Butler пре 4 година
родитељ
комит
5afc077b57
2 измењених фајлова са 20 додато и 19 уклоњено
  1. +2
    -3
      README.md
  2. +18
    -16
      setupWordpress

+ 2
- 3
README.md Прегледај датотеку

@@ -2,8 +2,7 @@
Scripts used by helpdesk for talks and to help users set up services. All scripts are hosted in ~edu and can be run from their or downloaded and ran.

## Scripts
- setup Wordpress `~edu/setupWordpress db_password`
- setup Wordpress `~edu/setupWordpress`
- setup tmux `~edu/setupTmux`
- compile Weechat `~edu/compileweechat nickserv_password`
- update Weechat `~edu/updateweechat`
- Setup Weechat `~edu/confweechat`
- setup screen `~edu/setupScreen`

+ 18
- 16
setupWordpress Прегледај датотеку

@@ -1,17 +1,19 @@
mkdir ~/public_html/backup
mv ~/public_html/* ~/public_html/backup/
cp ~edu/wordpress.tar.gz ~/public_html
cd ~/public_html
touch .htaccess
chmod 755 .htaccess
tar -pxzvf wordpress.tar.gz
mv ./wordpress/* ./
rm -rf wordpress wordpress.tar.gz
mv wp-config-sample.php wp-config.php
#!/bin/bash
mkdir $HOME/public_html/oldSite
mv $HOME/public_html/* $HOME/public_html/oldSite
curl https://wordpress.org/latest.tar.gz -o $HOME/latest.tar.gz
touch $HOME/public_html/.htaccess
chmod 755 $HOME/public_html/.htaccess
tar -pxzvf $HOME/latest.tar.gz -C $HOME/public_html/
rm -rf $HOME/public_html/latest.tar.gz
mv $HOME/public_html/wp-config-sample.php $HOME/public_html/wp-config.php
#edit wp-config with details
user=`whoami`
sed -i "s/database_name_here/$user/g" wp-config.php
sed -i "s/username_here/$user/g" wp-config.php
sed -i "s/password_here/$1/g" wp-config.php
sed -i "s/localhost/mysql.internal/g" wp-config.php
chmod 400 wp-config.php
user=$(whoami)
echo "enter your mysql password"
read PASS
sed -i "s/database_name_here/$user/g" $HOME/public_html/wp-config.php
sed -i "s/username_here/$user/g" $HOME/public_html/wp-config.php
sed -i "s/password_here/$PASS/g" $HOME/public_html/wp-config.php
sed -i "s/localhost/mysql.internal/g" $HOME/public_html/wp-config.php
chmod 400 $HOME/public_html/wp-config.php

Loading…
Откажи
Сачувај