forked from edouard-lopez/sshuttle-helper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·38 lines (33 loc) · 863 Bytes
/
install.sh
File metadata and controls
executable file
·38 lines (33 loc) · 863 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
35
36
37
38
#!/usr/bin/env sh
# DESCRIPTION
# Install sshuttle-helper as an init-script
#
# USAGE
# curl -L https://github.com/edouard-lopez/sshuttle-helper/raw/master/install.sh | sh
#
# AUTHOR
# Édouard Lopez
repo="git://github.com/edouard-lopez/sshuttle-helper.git"
initDir=/etc/init.d
# clone
hash git >/dev/null && /usr/bin/env git clone "$repo" || {
echo "git not installed"
exit
}
# Check project has been cloned
if [ -d sshuttle-helper ]; then
cd sshuttle-helper
else
echo "SSHuttle-helper directory missing"
exit 1
fi
# copy to System-V style init script directory
if [ ! -e "$initDir/proxy-ssh" ]; then
echo "Adding init script..."
sudo cp ./proxy-ssh /etc/init.d/
sudo update-rc.d proxy-ssh defaults
else
sudo cp -i ./proxy-ssh /etc/init.d/
fi
# add/update command to PATH directory
sudo ln -nfs "$initDir/proxy-ssh" /usr/local/sbin/