Compare commits
No commits in common. "de93d3b6ec7b0a31a13575d3fa0c9e33864908bd" and "d56f9d16f18fce77332c1d48ad120f32b49b7b8f" have entirely different histories.
de93d3b6ec
...
d56f9d16f1
|
@ -1,33 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# source all files in ./config/
|
||||
|
||||
for _file in ./config/local/* ; do
|
||||
. "$_file"
|
||||
done
|
||||
|
||||
# check we have ssh access
|
||||
|
||||
[ -z "$ssh" ] && echo "Error: no ssh configuration specified" && exit 5
|
||||
|
||||
echo "Updating ..":
|
||||
ssh -T $ssh << EOSSH
|
||||
apt-get update && apt-get upgrade
|
||||
EOSSH
|
||||
echo "Update complete"
|
||||
|
||||
exit
|
||||
|
||||
# source user script
|
||||
. ./scripts/install-user.sh
|
||||
|
||||
# source base script
|
||||
# . ./scripts/install-base.sh
|
||||
|
||||
# source php script?
|
||||
|
||||
# source database script?
|
||||
|
||||
# source web server script?
|
||||
|
||||
# source application script?
|
|
@ -1,46 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
_home_dir="/home/$user"
|
||||
|
||||
echo "Adding user: $user"
|
||||
|
||||
ssh -T $ssh << EOSSH
|
||||
echo "Installing required packages .."
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get --assume-yes install sudo git tmux zsh curl
|
||||
|
||||
echo "Creating user .."
|
||||
useradd -m -d "$_home_dir" "$user"
|
||||
echo "$user:$user_pass" | chpasswd
|
||||
usermod -aG sudo "$user"
|
||||
|
||||
mkdir -p "$_home_dir/.ssh"
|
||||
cp /root/.ssh/authorized_keys "$_home_dir/.ssh/authorized_keys"
|
||||
chown -R "$user:$group" "$_home_dir/.ssh"
|
||||
|
||||
echo "Cloning configuration files .."
|
||||
su "$user"
|
||||
mkdir -p "$_home_dir/.config"
|
||||
|
||||
if [ -e "$_home_dir/.config/profile" ] ; then
|
||||
mv "$_home_dir/.config/profile" "$_home_dir/.config/profile-original-$(date +%s)"
|
||||
fi
|
||||
git clone https://git.rayelliott.dev/dots/profile.git "$_home_dir/.config/profile"
|
||||
"$_home_dir/.config/profile/install.sh"
|
||||
|
||||
if [ -e "$_home_dir/.config/tmux" ] ; then
|
||||
mv "$_home_dir/.config/tmux" "$_home_dir/.config/tmux-original-$(date +%s)"
|
||||
fi
|
||||
git clone https://git.rayelliott.dev/dots/tmux.git "$_home_dir/.config/tmux"
|
||||
"$_home_dir/.config/tmux/install.sh"
|
||||
|
||||
if [ -e "$_home_dir/.config/zsh" ] ; then
|
||||
mv "$_home_dir/.config/zsh" "$_home_dir/.config/zsh-original-$(date +%s)"
|
||||
fi
|
||||
git clone https://git.rayelliott.dev/dots/zsh.git "$_home_dir/.config/zsh"
|
||||
"$_home_dir/.config/zsh/install.sh"
|
||||
EOSSH
|
||||
|
||||
ssh -T $ssh << EOSSH
|
||||
chsh -s /usr/bin/zsh "$user"
|
||||
EOSSH
|
Loading…
Reference in New Issue