-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·34 lines (29 loc) · 918 Bytes
/
install.sh
File metadata and controls
executable file
·34 lines (29 loc) · 918 Bytes
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
#!/bin/bash
# Ask for username and password.
echo
echo "Please enter login information:"
echo -n user:\ ; read USER
echo -n pass:\ ; read -s PASS
echo
echo
echo "Installing service script..."
curl "https://raw.github.com/hexanome/autoconnect/master/autoconnect" | \
sed "s_USER=user_USER=${USER}_" | \
sed "s_PASS=pass_PASS=${PASS}_" | \
sudo tee "/etc/init.d/autoconnect" > /dev/null
# TODO append service start to /etc/rc.local to launch on startup
echo
echo "Protecting user information..."
sudo chown root /etc/init.d/autoconnect
sudo chmod 511 /etc/init.d/autoconnect
echo
echo "Starting autoconnect..."
sudo service autoconnect start
echo
echo "If there were no errors, installation is complete!"
echo "- To change your login information, reinstall."
echo "- To start the autoconnect daemon:"
echo " sudo service autoconnect start"
echo "- To stop it:"
echo " sudo service autoconnect stop"
echo "Enjoy!"