diff --git a/config-debian.sh b/config-debian.sh index 17867fd..229577e 100755 --- a/config-debian.sh +++ b/config-debian.sh @@ -60,6 +60,9 @@ echo "<<< Allow the new user $NewUser to sudo without password" #sed -i "s|%sudo\s\+ALL=(ALL:ALL)\sALL|%sudo\tALL=(ALL:ALL) NOPASSWD:ALL|g" /etc/sudoers #chmod o-w /etc/sudoers echo "Option 2: Add a file for the new user in /etc/sudoers.d/ folder" +chmod o+w /etc/sudoers +sed -i "s|#includedir /etc/sudoers.d|includedir /etc/sudoers.d" /etc/sudoers +chmod o-w /etc/sudoers echo 'adot ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/$NewUser chmod a-w /etc/sudoers.d/$NewUser diff --git a/install-seafile.sh b/install-seafile.sh index 3fd50ff..57db623 100755 --- a/install-seafile.sh +++ b/install-seafile.sh @@ -8,14 +8,16 @@ sudo pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 pushd /faronear sudo mkdir bin.seafile cd bin.seafile -sudo wget https://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_8.0.5_x86-64.tar.gz +sudo wget https://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_8.0.6_x86-64.tar.gz sudo tar -xzf seafile-server_* cd seafile-server-* sudo ./setup-seafile.sh -# don't know why but sometimes it must be changed to 0.0.0.0 so that seahub.sh doesn't fail. -#sudo sed -i "s/127\.0\.0\.1/0.0.0.0/g" ../conf/gunicorn.conf.py sudo ./seafile.sh start + +# changed "127.0.0.1:8000" to "0.0.0.0:8000", otherwise it can only be accessed on the localhost. +sudo sed -i "s/127\.0\.0\.1/0.0.0.0/g" ../conf/gunicorn.conf.py +# to change seahub port, to edit gunicorn.conf.py, it works although it still promts "Starting seahub at port 8000 ...". (Directly `./seahub.sh start ` prompts "Starting seahub at port ..." but it actually doesn't listen on .) sudo ./seahub.sh start popd