Browse Source

fix wordpress script2

pull/3/head
Cian Butler 4 years ago
parent
commit
3d79ba851c
4 changed files with 33 additions and 32 deletions
  1. +8
    -8
      confweechat
  2. +3
    -3
      setupScreen
  3. +7
    -7
      setupTmux
  4. +15
    -14
      setupWordpress

+ 8
- 8
confweechat View File

@@ -1,18 +1,18 @@
#!/bin/bash
mkdir ~/.weechat
curl https://raw.githubusercontent.com/redbrick/eduScripts/master/wcconf/weechat.conf -o $HOME/.weechat/weechat.conf
curl https://raw.githubusercontent.com/redbrick/eduScripts/master/wcconf/trigger.conf -o $HOME/.weechat/trigger.conf
curl https://raw.githubusercontent.com/redbrick/eduScripts/master/wcconf/irc.conf -o $HOME/.weechat/irc.conf
curl https://raw.githubusercontent.com/redbrick/eduScripts/master/wcconf/alias.conf -o $HOME/.weechat/alias.conf
curl https://raw.githubusercontent.com/redbrick/eduScripts/master/wcconf/weechat.conf -o "$HOME/.weechat/weechat.conf"
curl https://raw.githubusercontent.com/redbrick/eduScripts/master/wcconf/trigger.conf -o "$HOME/.weechat/trigger.conf"
curl https://raw.githubusercontent.com/redbrick/eduScripts/master/wcconf/irc.conf -o "$HOME/.weechat/irc.conf"
curl https://raw.githubusercontent.com/redbrick/eduScripts/master/wcconf/alias.conf -o "$HOME/.weechat/alias.conf"

user=$(whoami)
sed -i "s/USERNAME_HERE/$user/g" $HOME/.weechat/irc.conf
sed -i "s/USERNAME_HERE/$user/g" "$HOME/.weechat/irc.conf"
echo "Have you set up your NickServ Password?(y/N)"
read answer
read -r answer
if echo "$answer" | grep -iq "^y" ; then
echo "What is your Paswword"
read PASS
sed -i "s/NICKSERV_PASSWORD/$PASS/g" $HOME/.weechat/irc.conf
read -r PASS
sed -i "s/NICKSERV_PASSWORD/$PASS/g" "$HOME/.weechat/irc.conf"
else
echo "Remeber to msg Nickserv to register"
fi


+ 3
- 3
setupScreen View File

@@ -1,5 +1,5 @@
#!/bin/bash

curl https://raw.githubusercontent.com/redbrick/eduScripts/master/screenrc -o $HOME/.screenrc
echo screen -dr >> $HOME/.zlogin
echo In your screen type Ctrl + a and : source $HOME/.screenrc
curl https://raw.githubusercontent.com/redbrick/eduScripts/master/screenrc -o "$HOME/.screenrc"
echo screen -dr >> "$HOME/.zlogin"
echo In your screen type Ctrl + a and : source "$HOME/.screenrc"

+ 7
- 7
setupTmux View File

@@ -1,10 +1,10 @@
#!/bin/bash

git clone https://github.com/redbrick/tmux-config.git $HOME/.tmux
ln -s $HOME/.tmux/.tmux.conf $HOME/.tmux.conf
git clone https://github.com/redbrick/tmux-config.git "$HOME/.tmux"
ln -s "$HOME/.tmux/.tmux.conf" "$HOME/.tmux.conf"
pip install --user psutil
mkdir $HOME/bin
cp $HOME/.tmux/vendor/basic-cpu-and-memory.tmux $HOME/bin/tmux-mem-cpu-load
chmod +x $HOME/bin/tmux-mem-cpu-load
echo tmux attach >> $HOME/.zlogin
tmux source-file $HOME/.tmux.conf
mkdir "$HOME/bin"
cp "$HOME/.tmux/vendor/basic-cpu-and-memory.tmux" "$HOME/bin/tmux-mem-cpu-load"
chmod +x "$HOME/bin/tmux-mem-cpu-load"
echo tmux attach >> "$HOME/.zlogin"
tmux source-file "$HOME/.tmux.conf"

+ 15
- 14
setupWordpress View File

@@ -1,19 +1,20 @@
#!/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
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/"
mv "$HOME/public_html/wordpress/*" "$HOME/public_html/"
rm -rf "$HOME/latest.tar.gz" "$HOME/public_html/wordpress"
mv "$HOME/public_html/wp-config-sample.php" "$HOME/public_html/wp-config.php"
#edit wp-config with details
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
read -r 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…
Cancel
Save