refactor: change dir permission.
This commit is contained in:
parent
c468952274
commit
8183858adf
@ -25,5 +25,5 @@ class DailyTimedRotatingFileHandler(TimedRotatingFileHandler):
|
|||||||
os.path.basename(source)
|
os.path.basename(source)
|
||||||
]
|
]
|
||||||
filename = os.path.join(*path)
|
filename = os.path.join(*path)
|
||||||
os.makedirs(os.path.dirname(filename), exist_ok=True)
|
os.makedirs(os.path.dirname(filename), 0o700, exist_ok=True)
|
||||||
return filename
|
return filename
|
||||||
|
|||||||
@ -122,4 +122,4 @@ LOGGING = {
|
|||||||
SYSLOG_ENABLE = CONFIG.SYSLOG_ENABLE
|
SYSLOG_ENABLE = CONFIG.SYSLOG_ENABLE
|
||||||
|
|
||||||
if not os.path.isdir(LOG_DIR):
|
if not os.path.isdir(LOG_DIR):
|
||||||
os.makedirs(LOG_DIR, mode=0o755)
|
os.makedirs(LOG_DIR, mode=0o700, exist_ok=True)
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -d /opt/maxkb/logs ]; then
|
||||||
mkdir -p /opt/maxkb/logs
|
mkdir -p /opt/maxkb/logs
|
||||||
|
chmod 700 /opt/maxkb/logs
|
||||||
|
fi
|
||||||
|
if [ ! -d /opt/maxkb/local ]; then
|
||||||
mkdir -p /opt/maxkb/local
|
mkdir -p /opt/maxkb/local
|
||||||
|
chmod 700 /opt/maxkb/local
|
||||||
|
fi
|
||||||
mkdir -p /opt/maxkb/python-packages
|
mkdir -p /opt/maxkb/python-packages
|
||||||
|
|
||||||
rm -f /opt/maxkb-app/tmp/*.pid
|
rm -f /opt/maxkb-app/tmp/*.pid
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -d /opt/maxkb/data/redis ]; then
|
||||||
mkdir -p /opt/maxkb/data/redis
|
mkdir -p /opt/maxkb/data/redis
|
||||||
|
chmod 700 /opt/maxkb/data/redis
|
||||||
|
fi
|
||||||
mkdir -p /opt/maxkb/logs
|
mkdir -p /opt/maxkb/logs
|
||||||
|
|
||||||
if [ ! -f /opt/maxkb/conf/redis.conf ]; then
|
if [ ! -f /opt/maxkb/conf/redis.conf ]; then
|
||||||
mkdir -p /opt/maxkb/conf
|
mkdir -p /opt/maxkb/conf
|
||||||
touch /opt/maxkb/conf/redis.conf
|
touch /opt/maxkb/conf/redis.conf
|
||||||
|
chmod 700 /opt/maxkb/conf/redis.conf
|
||||||
cat <<EOF > /opt/maxkb/conf/redis.conf
|
cat <<EOF > /opt/maxkb/conf/redis.conf
|
||||||
bind 0.0.0.0
|
bind 0.0.0.0
|
||||||
port 6379
|
port 6379
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user