Created
December 27, 2018 15:30
-
-
Save tmpbook/0533a37394f96f5a2106eaea1560b655 to your computer and use it in GitHub Desktop.
touch a file with bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
mkdir -p /data0/xxxx-access-api/data | |
chown -R go:go /data0/xxxx-access-api/data | |
rm -f /etc/supervisord.d/xxxx-access.ini | |
cat << EOF > /etc/supervisord.d/xxxx-access-api.ini | |
[program:xxxx-access-api] | |
user=go | |
directory=/data0/xxxx-access-api/data | |
command=/data0/xxxx-access-api/app/xxxx-access-api | |
autostart=true | |
autorestart=true | |
exitcodes=0,2 | |
redirect_stderr=true | |
stdout_logfile=/data0/www/xxxx-access/xxxx-access.log | |
EOF | |
supervisorctl update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用 bash 脚本来直接创建有内容的文件