u
This commit is contained in:
		
							parent
							
								
									0a35e67644
								
							
						
					
					
						commit
						c3584a550b
					
				| @ -73,7 +73,7 @@ echo "<<< Allow the new user $NewUser to sudo without password" | |||||||
| chmod o+w /etc/sudoers | chmod o+w /etc/sudoers | ||||||
| sed -i "s|#includedir /etc/sudoers.d|includedir /etc/sudoers.d|g" /etc/sudoers | sed -i "s|#includedir /etc/sudoers.d|includedir /etc/sudoers.d|g" /etc/sudoers | ||||||
| chmod o-w /etc/sudoers | chmod o-w /etc/sudoers | ||||||
| echo 'adot ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/$NewUser | echo "$NewUser ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$NewUser | ||||||
| chmod a-w /etc/sudoers.d/$NewUser | chmod a-w /etc/sudoers.d/$NewUser | ||||||
| echo | echo | ||||||
| 
 | 
 | ||||||
| @ -83,6 +83,15 @@ sed -i "s|^PermitRootLogin yes|#PermitRootLogin yes|g" /etc/ssh/sshd_config | |||||||
| service sshd restart | service sshd restart | ||||||
| echo | echo | ||||||
| 
 | 
 | ||||||
|  | echo "<<< Set hostname or leave blank for no change" | ||||||
|  | read -p "<<< Set hostname = " NewHostname | ||||||
|  | if [ $NewHostname ] | ||||||
|  | then | ||||||
|  |   sudo hostnamectl set-hostname $NewHostname | ||||||
|  | else | ||||||
|  |   echo 'Nothing changed >>>' | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| echo "<<< autologin for Xfce: /etc/lightdm/lightdm.conf" | echo "<<< autologin for Xfce: /etc/lightdm/lightdm.conf" | ||||||
| read -p "<<< Enable xfce autologin as ($NewUser for autologin or anything else for no change): " XfceAutologinUsername | read -p "<<< Enable xfce autologin as ($NewUser for autologin or anything else for no change): " XfceAutologinUsername | ||||||
| if [ $XfceAutologinUsername = $NewUser ] | if [ $XfceAutologinUsername = $NewUser ] | ||||||
|  | |||||||
| @ -4,16 +4,17 @@ | |||||||
| sudo apt-get update | sudo apt-get update | ||||||
| sudo apt-get install python3 python3-setuptools python3-pip python3-ldap sqlite3 -y | sudo apt-get install python3 python3-setuptools python3-pip python3-ldap sqlite3 -y | ||||||
| sudo pip3 install --timeout=3600 django==2.2.* future Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 psd-tools django-pylibmc django-simple-captcha | sudo pip3 install --timeout=3600 django==2.2.* future Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 psd-tools django-pylibmc django-simple-captcha | ||||||
|  | # for seafile 9.*: sudo pip3 install --timeout=3600 django==2.2.* future Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 psd-tools django-pylibmc django-simple-captcha pycryptodome==3.12.0 | ||||||
| 
 | 
 | ||||||
| pushd /faronear | pushd /faronear | ||||||
| sudo mkdir bin.seafile | sudo mkdir bin.seafile | ||||||
| cd bin.seafile | cd bin.seafile | ||||||
| sudo wget https://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_8.0.6_x86-64.tar.gz | sudo wget https://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_8.0.8_x86-64.tar.gz | ||||||
| sudo tar -xzf seafile-server_* | sudo tar -xzf seafile-server_* | ||||||
| cd seafile-server-* | cd seafile-server-* | ||||||
| sudo ./setup-seafile.sh | sudo ./setup-seafile.sh | ||||||
| 
 | 
 | ||||||
| ln -s seafile-server-8.0.6 sea | ln -s seafile-server-8.0.8 sea | ||||||
| 
 | 
 | ||||||
| sudo ./seafile.sh start | sudo ./seafile.sh start | ||||||
| 
 | 
 | ||||||
| @ -27,4 +28,5 @@ popd | |||||||
| 
 | 
 | ||||||
| sudo apt install nginx -y | sudo apt install nginx -y | ||||||
| rm /etc/nginx/sites-enabled/default | rm /etc/nginx/sites-enabled/default | ||||||
| ln -s /faronear/fon/sysconfig/nginx-seafile-https.conf /etc/nginx/sites-enabled/seafile.conf | cp /faronear/fon/sysconfig/nginx-seafile-https.conf /etc/nginx/sites-enabled/ | ||||||
|  | service nginx restart | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user