edwagbb commited on
Commit
48f6704
·
1 Parent(s): 59d5192

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +23 -0
entrypoint.sh ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if [ ! -f "/etc/ssh/ssh_host_rsa_key" ];then
2
+ ssh-keygen -t rsa -N '' -q -f /etc/ssh/ssh_host_rsa_key
3
+ fi
4
+ if [ ! -f "/root/.ssh/id_rsa_63322" ];then
5
+ ssh-keygen -t rsa -N '' -q -f /root/.ssh/id_rsa_63322
6
+ cat /root/.ssh/id_rsa_63322.pub >> /root/.ssh/authorized_keys
7
+ _f1='{"username": "root", "pkey": "'
8
+ _f2=$(sed s/$/'\\n'/ /root/.ssh/id_rsa_63322 | tr -d '\r\n')
9
+ _f3='", "is_save": "1", "c_type": "True", "host": "127.0.0.1", "password": "", "port": 63322}'
10
+ echo "${_f1}${_f2}${_f3}" | base64 | tr -d '\r\n '| od -An -tx1 | tr -d '\r\n ' > "/www/server/panel/config/t_info.json"
11
+ fi
12
+
13
+ /usr/sbin/sshd
14
+ /usr/sbin/crond
15
+
16
+ for file in `ls /etc/init.d`
17
+ do if [ -x /etc/init.d/${file} ]; then
18
+ /etc/init.d/$file restart
19
+ fi done
20
+ echo 7860 | bt 8
21
+ bt default
22
+
23
+ tail -f /dev/null