1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 08:48:06 +08:00
ContextOS/etc/local/2025.sh
2025-03-01 17:44:31 +08:00

10 lines
856 B
Bash

# /etc/rc.local
# source /root/2025-ContextOS/etc/local/2025.sh
for p in `ls /root/*/etc/local.sh`; do source $p; done
[ -d /tmp/nginx ] || mkdir /tmp/nginx; cd /opt/daemon/10000/ && $PWD/sbin/nginx -p $PWD &
su - git -c 'cd /opt/daemon/10010/ && GITEA_WORK_DIR=$PWD/var/lib/gitea/ $PWD/usr/local/bin/gitea web -c $PWD/etc/gitea/app.ini &'
su - mysql -c 'cd /opt/daemon/10001/ && $PWD/bin/mysqld --basedir=./ --datadir=./data --plugin-dir=./lib/plugin --socket=mysqld.socket --log-error=mysqld.log --pid-file=mysqld.pid --port 10001 &'
cd /opt/daemon/10002/ && $PWD/bin/dockerd --host unix://$PWD/docker.sock --pidfile $PWD/docker.pid --exec-root=$PWD/exec --data-root=$PWD/data --registry-mirror "https://ccr.ccs.tencentyun.com" --userland-proxy=false &
export DOCKER_HOST=unix://$PWD/docker.sock
# export DOCKER_HOST=unix:///opt/daemon/10002/docker.sock