Fixed scripts.

This commit is contained in:
Shuai Lin 2016-11-21 10:50:30 +08:00
parent 2c5adae1b7
commit ac72dbc171
4 changed files with 8 additions and 6 deletions

View file

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# `/sbin/setuser memcache` runs the given command as the user `memcache`. # `/sbin/setuser memcache` runs the given command as the user `memcache`.
# If you omit that part, the command will be run as root. # If you omit that part, the command will be run as root.
exec /sbin/setuser memcache /usr/bin/memcached >>/var/log/memcached.log 2>&1 exec /sbin/setuser memcache /usr/bin/memcached >>/var/log/memcached.log 2>&1

View file

@ -1,10 +1,10 @@
#!/bin/sh #!/bin/bash
set -e set -e
shutdown_mysql() { shutdown_mysql() {
if [[ -d /var/run/mysqld/mysqld.sock ]]; then if [[ -d /var/run/mysqld/mysqld.sock ]]; then
mysqladmin -u root shutdown mysqladmin -u root shutdown || true
fi fi
} }
@ -13,4 +13,6 @@ trap shutdown_mysql EXIT
mkdir -p /var/run/mysqld mkdir -p /var/run/mysqld
chown mysql:mysql /var/run/mysqld chown mysql:mysql /var/run/mysqld
/sbin/setuser mysql /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 >&1 >/var/log/mysql.log 2>&1 rm -f /var/lib/mysql/aria_log_control
/sbin/setuser mysql /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 >/var/log/mysql.log 2>&1

View file

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/bash
exec 2>&1 exec 2>&1
exec /usr/sbin/nginx exec /usr/sbin/nginx

View file

@ -16,7 +16,7 @@ import uuid
import time import time
from utils import ( from utils import (
call, get_conf, get_install_dir, show_progress call, get_conf, get_install_dir, show_progress,
get_script, render_template, get_seafile_version, eprint get_script, render_template, get_seafile_version, eprint
) )