28 lines
444 B
Bash
Executable File
28 lines
444 B
Bash
Executable File
#! /bin/bash
|
|
|
|
function main() {
|
|
set -e
|
|
|
|
cd /wiki
|
|
git init || true
|
|
crontab /opt/routine.cron
|
|
bash /opt/index.sh
|
|
|
|
/opt/goftp \
|
|
-port $((PORT+1)) \
|
|
-root /wiki/uploads-ftp \
|
|
& gollum \
|
|
--port $PORT \
|
|
--no-live-preview \
|
|
--config /opt/config.rb \
|
|
--collapse-tree \
|
|
--allow-uploads=dir \
|
|
--css \
|
|
--js \
|
|
"$@"
|
|
}
|
|
|
|
if [ "$0" == "${BASH_SOURCE[0]}" ]; then
|
|
main "$@"
|
|
fi
|