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.
 
 
 
 
 
 

46 lines
1.1 KiB

#!/bin/sh /etc/rc.common
START=99
APP=seafile
EXTRA_HELP=" setup Runs the setup script
create_admin Creates the administrative login
reset_admin Alias to create_admin"
EXTRA_COMMANDS="setup create_admin reset_admin"
export PATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PATH"
export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH"
start() {
if [ ! -d /var/run/seafile ]
then
mkdir /var/run/seafile
chown seafile:seafile /var/run/seafile
chmod o-rwx /var/run/seafile
fi
cd "/usr/share/seafile" && \
sudo PYTHONPATH="$PYTHONPATH" -u seafile -E \
"/usr/bin/seafile-admin" start
}
stop() {
cd "/usr/share/seafile" && \
sudo PYTHONPATH="$PYTHONPATH" -u seafile -E \
"/usr/bin/seafile-admin" stop
}
setup() {
cd "/usr/share/seafile" && \
sudo PYTHONPATH="$PYTHONPATH" -u seafile -E \
"/usr/bin/seafile-admin" setup
}
create_admin() {
cd "/usr/share/seafile" && \
sudo PYTHONPATH="$PYTHONPATH" -u seafile -E \
"/usr/bin/seafile-admin" create-admin
}
reset_admin() {
create_admin
}