-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup
52 lines (43 loc) · 1.64 KB
/
setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
#===============================================================================
# Setup for Hacktuite, If this is your first experience use this script first.
#===============================================================================
#========================== VARS
configure_archive="${HOME}/hacktuite/hacktuite.conf"
echo "Configure Directorys and archives in your Home..."
# Create a directory
if [[ ! -d "${HOME}/hacktuite" ]]; then
mkdir -vp "${HOME}/hacktuite/{img,video}" && echo "Directory ${HOME}/.hacktuite created."
fi
# Reconfigure perms
chown -R "$USER" "${HOME}/hacktuite/"
############################
# Send Confs, bin and core
############################
if [[ -e "hacktuite.conf" ]]; then
cp -v hacktuite.conf "${HOME}/hacktuite/"
fi
if [[ -e "hacktuite.sh" ]]; then
chmod +x "hacktuite.sh"
cp -v hacktuite.sh "${HOME}/hacktuite/"
fi
if [[ -e "favicon.jpg" ]]; then
cp -v favicon.jpg "${HOME}/hacktuite/"
fi
#################################
# Configure new user and server
#################################
while true; do
read -p $'\nWhat is your nickname to use on your page.\n' nick
[[ -z "$nick" ]] && { echo "Nick Null..."; continue ;} || break
done
# Change nick
sed -i "s/NICK=.*/NICK=\'$nick\'/" "$configure_archive"
while true; do
read -p $'\nWhat server to use? We use Rsync by default. Example: [email protected]\n' server
[[ -z "$server" ]] && { echo "Server Null..."; continue;} || break
done
# Change Server
sed -i "s/SERVER=.*/SERVER=\'$server\'/" "$configure_archive"
echo "Ok... Your hacktuite.conf configured, disponible on /etc/hacktuite.conf"
echo "Now execute, hacktuite.sh"