You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

180 lines
7.4 KiB

seafile-server: Update to 7.1.2, revamp package * 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>
4 years ago
  1. --- a/scripts/reset-admin.sh
  2. +++ b/scripts/reset-admin.sh
  3. @@ -37,7 +37,7 @@ function check_python_executable() {
  4. function validate_seafile_data_dir () {
  5. if [[ ! -d ${default_seafile_data_dir} ]]; then
  6. echo "Error: there is no seafile server data directory."
  7. - echo "Have you run setup-seafile.sh before this?"
  8. + echo "Have you run setup-seafile before this?"
  9. echo ""
  10. exit 1;
  11. fi
  12. --- a/scripts/seaf-fsck.sh
  13. +++ b/scripts/seaf-fsck.sh
  14. @@ -25,7 +25,7 @@ function usage () {
  15. function validate_ccnet_conf_dir () {
  16. if [[ ! -d ${default_ccnet_conf_dir} ]]; then
  17. echo "Error: there is no ccnet config directory."
  18. - echo "Have you run setup-seafile.sh before this?"
  19. + echo "Have you run setup-seafile before this?"
  20. echo ""
  21. exit -1;
  22. fi
  23. @@ -34,7 +34,7 @@ function validate_ccnet_conf_dir () {
  24. function validate_seafile_data_dir () {
  25. if [[ ! -d ${default_seafile_data_dir} ]]; then
  26. echo "Error: there is no seafile server data directory."
  27. - echo "Have you run setup-seafile.sh before this?"
  28. + echo "Have you run setup-seafile before this?"
  29. echo ""
  30. exit 1;
  31. fi
  32. --- a/scripts/seaf-fuse.sh
  33. +++ b/scripts/seaf-fuse.sh
  34. @@ -41,7 +41,7 @@ fi
  35. function validate_ccnet_conf_dir () {
  36. if [[ ! -d ${default_ccnet_conf_dir} ]]; then
  37. echo "Error: there is no ccnet config directory."
  38. - echo "Have you run setup-seafile.sh before this?"
  39. + echo "Have you run setup-seafile before this?"
  40. echo ""
  41. exit -1;
  42. fi
  43. @@ -50,7 +50,7 @@ function validate_ccnet_conf_dir () {
  44. function validate_seafile_data_dir () {
  45. if [[ ! -d ${default_seafile_data_dir} ]]; then
  46. echo "Error: there is no seafile server data directory."
  47. - echo "Have you run setup-seafile.sh before this?"
  48. + echo "Have you run setup-seafile before this?"
  49. echo ""
  50. exit 1;
  51. fi
  52. @@ -67,7 +67,7 @@ function validate_already_running () {
  53. function warning_if_seafile_not_running () {
  54. if ! pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null 1>&2; then
  55. echo
  56. - echo "Warning: seafile-controller not running. Have you run \"./seafile.sh start\" ?"
  57. + echo "Warning: seafile-controller not running. Have you run \"service seafile-server start\" ?"
  58. echo
  59. fi
  60. }
  61. --- a/scripts/seaf-gc.sh
  62. +++ b/scripts/seaf-gc.sh
  63. @@ -27,7 +27,7 @@ function usage () {
  64. function validate_ccnet_conf_dir () {
  65. if [[ ! -d ${default_ccnet_conf_dir} ]]; then
  66. echo "Error: there is no ccnet config directory."
  67. - echo "Have you run setup-seafile.sh before this?"
  68. + echo "Have you run setup-seafile before this?"
  69. echo ""
  70. exit -1;
  71. fi
  72. @@ -36,7 +36,7 @@ function validate_ccnet_conf_dir () {
  73. function validate_seafile_data_dir () {
  74. if [[ ! -d ${default_seafile_data_dir} ]]; then
  75. echo "Error: there is no seafile server data directory."
  76. - echo "Have you run setup-seafile.sh before this?"
  77. + echo "Have you run setup-seafile before this?"
  78. echo ""
  79. exit 1;
  80. fi
  81. @@ -58,7 +58,7 @@ function check_component_running() {
  82. function validate_already_running () {
  83. if pid=$(pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null); then
  84. - echo "seafile server is still running, stop it by \"seafile.sh stop\""
  85. + echo "seafile server is still running, stop it by \"service seafile-server stop\""
  86. echo
  87. exit 1;
  88. fi
  89. --- a/scripts/seafile.sh
  90. +++ b/scripts/seafile.sh
  91. @@ -53,7 +53,7 @@ function validate_running_user () {
  92. function validate_ccnet_conf_dir () {
  93. if [[ ! -d ${default_ccnet_conf_dir} ]]; then
  94. echo "Error: there is no ccnet config directory."
  95. - echo "Have you run setup-seafile.sh before this?"
  96. + echo "Have you run setup-seafile before this?"
  97. echo ""
  98. exit -1;
  99. fi
  100. @@ -62,7 +62,7 @@ function validate_ccnet_conf_dir () {
  101. function validate_central_conf_dir () {
  102. if [[ ! -d ${central_config_dir} ]]; then
  103. echo "Error: there is no conf/ directory."
  104. - echo "Have you run setup-seafile.sh before this?"
  105. + echo "Have you run setup-seafile before this?"
  106. echo ""
  107. exit -1;
  108. fi
  109. @@ -71,7 +71,7 @@ function validate_central_conf_dir () {
  110. function validate_seafile_data_dir () {
  111. if [[ ! -d ${default_seafile_data_dir} ]]; then
  112. echo "Error: there is no seafile server data directory."
  113. - echo "Have you run setup-seafile.sh before this?"
  114. + echo "Have you run setup-seafile before this?"
  115. echo ""
  116. exit 1;
  117. fi
  118. --- a/scripts/seahub.sh
  119. +++ b/scripts/seahub.sh
  120. @@ -78,7 +78,7 @@ function check_python_executable() {
  121. function validate_ccnet_conf_dir () {
  122. if [[ ! -d ${default_ccnet_conf_dir} ]]; then
  123. echo "Error: there is no ccnet config directory."
  124. - echo "Have you run setup-seafile.sh before this?"
  125. + echo "Have you run setup-seafile before this?"
  126. echo ""
  127. exit -1;
  128. fi
  129. @@ -87,7 +87,7 @@ function validate_ccnet_conf_dir () {
  130. function validate_seafile_data_dir () {
  131. if [[ ! -d ${default_seafile_data_dir} ]]; then
  132. echo "Error: there is no seafile server data directory."
  133. - echo "Have you run setup-seafile.sh before this?"
  134. + echo "Have you run setup-seafile before this?"
  135. echo ""
  136. exit 1;
  137. fi
  138. @@ -133,7 +133,7 @@ fi
  139. function warning_if_seafile_not_running () {
  140. if ! pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null 1>&2; then
  141. echo
  142. - echo "Warning: seafile-controller not running. Have you run \"./seafile.sh start\" ?"
  143. + echo "Warning: seafile-controller not running. Have you run \"service seafile-server start\" ?"
  144. echo
  145. exit 1
  146. fi
  147. @@ -167,7 +167,7 @@ function start_seahub () {
  148. sleep 5
  149. if ! pgrep -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}" 2>/dev/null 1>&2; then
  150. printf "\033[33mError:Seahub failed to start.\033[m\n"
  151. - echo "Please try to run \"./seahub.sh start\" again"
  152. + echo "Please try to run \"service seafile-server start\" again"
  153. exit 1;
  154. fi
  155. echo
  156. --- a/scripts/setup-seafile-mysql.py
  157. +++ b/scripts/setup-seafile-mysql.py
  158. @@ -1557,8 +1557,7 @@ def report_success():
  159. Your seafile server configuration has been finished successfully.
  160. -----------------------------------------------------------------
  161. -run seafile server: ./seafile.sh { start | stop | restart }
  162. -run seahub server: ./seahub.sh { start <port> | stop | restart <port> }
  163. +run seafile server: service seafile-server { start | stop | restart }
  164. -----------------------------------------------------------------
  165. If you are behind a firewall, remember to allow input/output of these tcp ports:
  166. --- a/scripts/setup-seafile.sh
  167. +++ b/scripts/setup-seafile.sh
  168. @@ -718,8 +718,7 @@ echo "----------------------------------
  169. echo "Your seafile server configuration has been completed successfully."
  170. echo "-----------------------------------------------------------------"
  171. echo
  172. -echo "run seafile server: ./seafile.sh { start | stop | restart }"
  173. -echo "run seahub server: ./seahub.sh { start <port> | stop | restart <port> }"
  174. +echo "run seafile server: service seafile-server { start | stop | restart }"
  175. echo
  176. echo "-----------------------------------------------------------------"
  177. echo "If the server is behind a firewall, remember to open these tcp ports:"