ismism/cli/start.zsh

18 lines
524 B
Bash
Raw Normal View History

2022-11-17 14:34:37 +08:00
rm -rf log; mkdir log
2022-11-29 14:56:49 +08:00
if systemctl > /dev/null; then
cp -f mongod.service /lib/systemd/system/
systemctl daemon-reload
systemctl start mongod
else
nohup mongod --config mongod.yaml > log/mongod.log &
fi
2022-11-17 14:34:37 +08:00
nohup deno run --allow-net --allow-read ismism.ts/src/serve.ts > log/ismism.log &
nohup nginx -p . -c nginx.conf > log/nginx.log &
sleep 0.1
tail log/mongo.log log/access.log log/error.log log/nginx.log log/mongod.log log/ismism.log
echo "\nismism started\n"
pgrep -lf nginx; pgrep -lf mongo; pgrep -lf "deno run"