aboutsummaryrefslogtreecommitdiffstats
path: root/testing/seafile/seafile-scripts.patch
blob: f6e8978bb5bbae7104de8d65bf161f2349585ce2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
diff --git a/scripts/seaf-fuse.sh b/scripts/seaf-fuse.sh
index 463002e..92ef285 100755
--- a/scripts/seaf-fuse.sh
+++ b/scripts/seaf-fuse.sh
@@ -6,10 +6,7 @@ SCRIPT=$(readlink -f "$0")
 INSTALLPATH=$(dirname "${SCRIPT}")
 TOPDIR=$(dirname "${INSTALLPATH}")
 default_ccnet_conf_dir=${TOPDIR}/ccnet
-seaf_fuse=${INSTALLPATH}/seafile/bin/seaf-fuse
-
-export PATH=${INSTALLPATH}/seafile/bin:$PATH
-export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
+seaf_fuse=/usr/bin/seaf-fuse
 
 script_name=$0
 function usage () {
diff --git a/scripts/seaf-gc.sh b/scripts/seaf-gc.sh
index 489961a..605fabd 100755
--- a/scripts/seaf-gc.sh
+++ b/scripts/seaf-gc.sh
@@ -6,12 +6,9 @@ SCRIPT=$(readlink -f "$0")
 INSTALLPATH=$(dirname "${SCRIPT}")
 TOPDIR=$(dirname "${INSTALLPATH}")
 default_ccnet_conf_dir=${TOPDIR}/ccnet
-seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc
+seaf_gc=/usr/bin/seafserv-gc
 seaf_gc_opts=""
 
-export PATH=${INSTALLPATH}/seafile/bin:$PATH
-export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
-
 script_name=$0
 function usage () {
     echo "usage : "
diff --git a/scripts/seafile.sh b/scripts/seafile.sh
index e04d65f..9ca171c 100755
--- a/scripts/seafile.sh
+++ b/scripts/seafile.sh
@@ -17,12 +17,7 @@ INSTALLPATH=$(dirname "${SCRIPT}")
 TOPDIR=$(dirname "${INSTALLPATH}")
 default_ccnet_conf_dir=${TOPDIR}/ccnet
 ccnet_pidfile=${INSTALLPATH}/runtime/ccnet.pid
-seaf_controller="${INSTALLPATH}/seafile/bin/seafile-controller"
-
-
-export PATH=${INSTALLPATH}/seafile/bin:$PATH
-export ORIG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
-export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
+seaf_controller="/usr/bin/seafile-controller"
 
 script_name=$0
 function usage () {
@@ -102,7 +97,7 @@ function start_seafile_server () {
 
     echo "Starting seafile server, please wait ..."
 
-    LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_controller} -c "${default_ccnet_conf_dir}" -d "${seafile_data_dir}"
+    ${seaf_controller} -c "${default_ccnet_conf_dir}" -d "${seafile_data_dir}"
 
     sleep 3
 
diff --git a/scripts/setup-seafile.sh b/scripts/setup-seafile.sh
index f7c181c..e88fbce 100755
--- a/scripts/setup-seafile.sh
+++ b/scripts/setup-seafile.sh
@@ -8,8 +8,6 @@ default_seafile_data_dir=${TOPDIR}/seafile-data
 default_seahub_db=${TOPDIR}/seahub.db
 default_conf_dir=${TOPDIR}/conf
 
-export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
-
 use_existing_ccnet="false"
 use_existing_seafile="false"
 
@@ -395,8 +393,8 @@ echo
 echo "If you are OK with the configuration, press [ENTER] to continue."
 read dummy
 
-ccnet_init=${INSTALLPATH}/seafile/bin/ccnet-init
-seaf_server_init=${INSTALLPATH}/seafile/bin/seaf-server-init
+ccnet_init=/usr/bin/ccnet-init
+seaf_server_init=/usr/bin/seaf-server-init
 
 # -------------------------------------------
 # Create ccnet conf 
@@ -404,7 +402,7 @@ seaf_server_init=${INSTALLPATH}/seafile/bin/seaf-server-init
 if [[ "${use_existing_ccnet}" != "true" ]]; then
     echo "Generating ccnet configuration in ${default_ccnet_conf_dir}..."
     echo
-    if ! LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH "${ccnet_init}" -c "${default_ccnet_conf_dir}" --name "${server_name}" --port "${server_port}" --host "${ip_or_domain}"; then
+    if ! "${ccnet_init}" -c "${default_ccnet_conf_dir}" --name "${server_name}" --port "${server_port}" --host "${ip_or_domain}"; then
         err_and_quit;
     fi
 
@@ -419,7 +417,7 @@ sleep 0.5
 if [[ "${use_existing_seafile}" != "true" ]]; then
     echo "Generating seafile configuration in ${seafile_data_dir} ..."
     echo
-    if ! LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_server_init} --seafile-dir "${seafile_data_dir}" \
+    if ! ${seaf_server_init} --seafile-dir "${seafile_data_dir}" \
         --port ${seafile_server_port} --fileserver-port ${fileserver_port}; then
         
         echo "Failed to generate seafile configuration"