mirror of
https://github.com/openwrt/packages.git
synced 2025-12-23 05:54:33 +04:00
* Package scripts that are shipped by upstream in their binary download
* Includes setup scripts (setup-seafile.sh to use SQLite,
setup-seafile-mysql.{sh,py} to use MySQL) and control scripts
(seafile.sh, seahub.sh)
* Does not include seafile-admin, which is not shipped in upstream's
binary download. Combined with the fact that it hasn't been updated
to Python 3 suggests the script has been abandoned.
* Replace previous init scripts with a simplified script
* Previous init scripts (seafile.init, seahub.init) were modified from
older versions of seafile.sh and seahub.sh, but they haven't kept up
with changes to upstream's scripts
* New init script (seafile-server.init) start/stops both Seafile and
Seahub (there is no need to control them separately) by calling
upstream's control scripts
* Replace previous package config file with new config file
* Options in previous config file (seafile.conf) were mainly for using
Seahub in FastCGI mode. FastCGI was deprecated in Django 1.7 and
removed in 1.9; upstream's control script will only start Seahub
using Gunicorn. (Options for Gunicorn including port number can be
changed by editing /etc/seafile/conf/gunicorn.conf.py.)
* New config file (seafile-server.config) has one option that controls
where the Seafile/Seahub data directories are stored
* Patch scripts/binaries to use standard, system-wide directory
locations
* Script files (wrappers for binaries) in /usr/bin
* Binaries (not meant to be run directly by the user) in /usr/libexec
* Config files in /etc/seafile
* Pid/socket files in /var/run/seafile
* Logs in /var/log/seafile
* Include a new script to create the first admin account
* With upstream's original scripts, the user is required to
interactively create the first admin account when Seahub is started
for the first time
* The user will now use the new script (create-seafile-admin.sh) to
create the first admin account after setup (using setup-seafile.sh
or setup-seafile-mysql.sh) and before starting Seafile/Seahub
* seahub.sh is patched to only check if there is at least one admin
account and exit with an error if there is no admin account
* Remove build config options and add seafile-server-fuse package
* The console option controls whether the console window is shown when
Seafile server is run on Windows. It has no use on Linux.
* The fuse option controls whether seaf-fuse is built. (seaf-fuse is a
FUSE implementation that allows the Seafile database/file system to
be mounted to a local directory.) seaf-fuse is now always built and
is available in a separate package (seafile-server-fuse).
* Add myself as a maintainer
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
74 lines
3.4 KiB
Diff
74 lines
3.4 KiB
Diff
--- a/scripts/seaf-gc.sh
|
|
+++ b/scripts/seaf-gc.sh
|
|
@@ -63,8 +63,8 @@ function validate_already_running () {
|
|
exit 1;
|
|
fi
|
|
|
|
- check_component_running "ccnet-server" "ccnet-server -c ${default_ccnet_conf_dir}"
|
|
- check_component_running "seaf-server" "seaf-server -c ${default_ccnet_conf_dir}"
|
|
+ check_component_running "ccnet-server" "ccnet-server -F ${default_conf_dir} -c ${default_ccnet_conf_dir}"
|
|
+ check_component_running "seaf-server" "seaf-server -F ${default_conf_dir} -c ${default_ccnet_conf_dir}"
|
|
check_component_running "fileserver" "fileserver -c ${default_ccnet_conf_dir}"
|
|
check_component_running "seafdav" "wsgidav.server.server_cli"
|
|
}
|
|
--- a/scripts/seafile.sh
|
|
+++ b/scripts/seafile.sh
|
|
@@ -107,8 +107,8 @@ function validate_already_running () {
|
|
exit 1;
|
|
fi
|
|
|
|
- check_component_running "ccnet-server" "ccnet-server -c ${default_ccnet_conf_dir}"
|
|
- check_component_running "seaf-server" "seaf-server -c ${default_ccnet_conf_dir}"
|
|
+ check_component_running "ccnet-server" "ccnet-server -F ${central_config_dir} -c ${default_ccnet_conf_dir}"
|
|
+ check_component_running "seaf-server" "seaf-server -F ${central_config_dir} -c ${default_ccnet_conf_dir}"
|
|
check_component_running "fileserver" "fileserver -c ${default_ccnet_conf_dir}"
|
|
check_component_running "seafdav" "wsgidav.server.server_cli"
|
|
}
|
|
@@ -149,8 +149,8 @@ function stop_seafile_server () {
|
|
|
|
echo "Stopping seafile server ..."
|
|
pkill -SIGTERM -f "seafile-controller -c ${default_ccnet_conf_dir}"
|
|
- pkill -f "ccnet-server -c ${default_ccnet_conf_dir}"
|
|
- pkill -f "seaf-server -c ${default_ccnet_conf_dir}"
|
|
+ pkill -f "ccnet-server -F ${central_config_dir} -c ${default_ccnet_conf_dir}"
|
|
+ pkill -f "seaf-server -F ${central_config_dir} -c ${default_ccnet_conf_dir}"
|
|
pkill -f "fileserver -c ${default_ccnet_conf_dir}"
|
|
pkill -f "soffice.*--invisible --nocrashreport"
|
|
pkill -f "wsgidav.server.server_cli"
|
|
--- a/scripts/seahub.sh
|
|
+++ b/scripts/seahub.sh
|
|
@@ -94,10 +94,10 @@ function validate_seafile_data_dir () {
|
|
}
|
|
|
|
function validate_seahub_running () {
|
|
- if pgrep -f "${manage_py}" 2>/dev/null 1>&2; then
|
|
+ if pgrep -f "${manage_py} runfcgi" 2>/dev/null 1>&2; then
|
|
echo "Seahub is already running."
|
|
exit 1;
|
|
- elif pgrep -f "seahub.wsgi:application" 2>/dev/null 1>&2; then
|
|
+ elif pgrep -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}" 2>/dev/null 1>&2; then
|
|
echo "Seahub is already running."
|
|
exit 1;
|
|
fi
|
|
@@ -165,7 +165,7 @@ function start_seahub () {
|
|
|
|
# Ensure seahub is started successfully
|
|
sleep 5
|
|
- if ! pgrep -f "seahub.wsgi:application" 2>/dev/null 1>&2; then
|
|
+ if ! pgrep -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}" 2>/dev/null 1>&2; then
|
|
printf "\033[33mError:Seahub failed to start.\033[m\n"
|
|
echo "Please try to run \"./seahub.sh start\" again"
|
|
exit 1;
|
|
@@ -235,9 +235,9 @@ function clear_sessions () {
|
|
function stop_seahub () {
|
|
if [[ -f ${pidfile} ]]; then
|
|
echo "Stopping seahub ..."
|
|
- pkill -9 -f "/usr/bin/gunicorn3"
|
|
+ pkill -9 -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}"
|
|
sleep 1
|
|
- if pgrep -f "/usr/bin/gunicorn3" 2>/dev/null 1>&2 ; then
|
|
+ if pgrep -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}" 2>/dev/null 1>&2 ; then
|
|
echo 'Failed to stop seahub.'
|
|
exit 1
|
|
fi
|