Use variable for readability, add the supervisord log

This commit is contained in:
flow.gunso
2019-03-15 07:47:49 +01:00
parent 78acdc1ca2
commit 3f667d7ed7

View File

@@ -1,8 +1,14 @@
#!/bin/bash
seafile_ini=~/.ccnet/seafile.ini
seafile_sock=/.seafile/seafile-data/seafile.sock
supervisord_conf=/.supervisord/supervisord.conf
supervisord_pid=/.supervisord/supervisord.pid
supervisord_log=/.supervisord/supervisord.log
/usr/bin/seaf-cli init -d /.seafile
while [ ! -f ~/.ccnet/seafile.ini ]; do sleep 1; done
while [ ! -f $seafile_ini ]; do sleep 1; done
/usr/bin/seaf-cli start
while [ ! -S /.seafile/seafile-data/seafile.sock ]; do sleep 1; done
while [ ! -S $seafile_sock ]; do sleep 1; done
/usr/bin/seaf-cli sync -u $USERNAME -p $PASSWORD -s $SERVER -l $LIBRARY_ID -d /volume
/usr/bin/supervisord -u $UNAME -c /.supervisord/supervisord.conf -j /.supervisord/supervisord.pid
/usr/bin/supervisord -u $UNAME -c $supervisord_log -j $supervisord_pid -l $supervisord_log