-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathstart.sh
More file actions
31 lines (25 loc) · 705 Bytes
/
start.sh
File metadata and controls
31 lines (25 loc) · 705 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
#!/bin/sh
echo "Verifying configuration..."
if [ "$(stat -c %a%u%g /home/git)" != "70010001000" ]; then
echo "User git does not have valid homedir !"
echo "Dump /home/"
ls -alh /home/
exit 1
fi
if [ "$(stat -c %a%u%g /home/git/.ssh)" != "70010001000" ]; then
echo "User git does not have valid ~/.ssh !"
echo "Dump /home/git/"
ls -alh /home/git/
exit 1
fi
if [ "$(stat -c %a%u%g /home/git/.ssh/authorized_keys)" != "60010001000" ]; then
echo "User git does not have valid ~/.ssh/authorized_keys !"
echo "Dump ~/.ssh/"
ls -alh /home/git/.ssh/
exit 1
fi
if [ ! -e "/pub" ]; then
ln -s /home/git/pub /pub
fi
echo "Start ssh server"
/usr/sbin/sshd -D