[fix] replacing /var/run by /run everywhere we can (not everywhere: postfix chroot or old compatibility is maintained
This commit is contained in:
parent
cdd0bfd0fa
commit
2ad744ecc7
|
@ -13,7 +13,7 @@ if(isset($L_ALTERNC_LOGS_ARCHIVE))
|
|||
define('ALTERNC_LOGS', "$L_ALTERNC_LOGS");
|
||||
define('ALTERNC_PANEL', "/usr/share/alternc/panel");
|
||||
define('ALTERNC_LOCALES', ALTERNC_PANEL."/locales");
|
||||
define('ALTERNC_LOCK_JOBS', '/var/run/alternc/jobs-lock');
|
||||
define('ALTERNC_LOCK_JOBS', '/run/alternc/jobs-lock');
|
||||
define('ALTERNC_LOCK_PANEL', '/var/lib/alternc/panel/nologin.lock');
|
||||
|
||||
/* PHPLIB inclusions : */
|
||||
|
|
|
@ -87,7 +87,7 @@ if (isset($L_ALTERNC_LOGS_ARCHIVE)) {
|
|||
define('ALTERNC_LOGS', "$L_ALTERNC_LOGS");
|
||||
define('ALTERNC_PANEL', "/usr/share/alternc/panel");
|
||||
define('ALTERNC_LOCALES', ALTERNC_PANEL . "/locales");
|
||||
define('ALTERNC_LOCK_JOBS', '/var/run/alternc/jobs-lock');
|
||||
define('ALTERNC_LOCK_JOBS', '/run/alternc/jobs-lock');
|
||||
define('ALTERNC_LOCK_PANEL', '/var/lib/alternc/panel/nologin.lock');
|
||||
define('ALTERNC_APACHE2_GEN_TMPL_DIR', '/etc/alternc/templates/apache2/');
|
||||
define('ALTERNC_VHOST_DIR', "/var/lib/alternc/apache-vhost/");
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
define('SLAVE_FLAG', "/var/run/alternc/refresh_slave");
|
||||
define('SLAVE_FLAG', "/run/alternc/refresh_slave");
|
||||
|
||||
/**
|
||||
* Classe de gestion des domaines de l'hébergé.
|
||||
|
@ -54,7 +54,7 @@ class m_dom {
|
|||
* du domaine par update_domains.sh
|
||||
* @access private
|
||||
*/
|
||||
var $fic_lock_cron = "/var/run/alternc/cron.lock";
|
||||
var $fic_lock_cron = "/run/alternc/cron.lock";
|
||||
|
||||
/**
|
||||
* Le cron a-t-il été bloqué ?
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
# Create /var/run/ folder : it may be a ramdrive
|
||||
@reboot root mkdir -p /var/run/alternc && chown alterncpanel:alterncpanel /var/run/alternc
|
||||
# Create /run/ folder : it may be a ramdrive
|
||||
@reboot root mkdir -p /run/alternc && chown alterncpanel:alterncpanel /run/alternc
|
||||
|
||||
# Every 2 days compress log files
|
||||
0 4 * * * alterncpanel /usr/lib/alternc/compress_logs.sh
|
||||
|
|
|
@ -113,10 +113,10 @@ SQLBACKUP_OVERWRITE=""
|
|||
ALTERNC_SLAVES=""
|
||||
|
||||
# File to look at for forced launch of update_domain (use incron)
|
||||
INOTIFY_UPDATE_DOMAIN="/var/run/alternc/inotify_update_domain.lock"
|
||||
INOTIFY_UPDATE_DOMAIN="/run/alternc/inotify_update_domain.lock"
|
||||
|
||||
# File to look at for forced launch of do_actions (use incron)
|
||||
INOTIFY_DO_ACTION="/var/run/alternc/inotify_do_action.lock"
|
||||
INOTIFY_DO_ACTION="/run/alternc/inotify_do_action.lock"
|
||||
|
||||
# AlternC Locations
|
||||
ALTERNC_HTML=""
|
||||
|
@ -251,8 +251,8 @@ NFS_QUOTA=no" >> $CONFIGFILE
|
|||
touch /var/lib/alternc/bind/automatic.conf /var/lib/alternc/bind/slaveip.conf
|
||||
chown root:bind /var/lib/alternc/bind/automatic.conf /var/lib/alternc/bind/slaveip.conf
|
||||
chmod 640 /var/lib/alternc/bind/automatic.conf /var/lib/alternc/bind/slaveip.conf
|
||||
mkdir -p /var/run/alternc && chown alterncpanel:alterncpanel /var/run/alternc
|
||||
touch /var/run/alternc/refresh_slave
|
||||
mkdir -p /run/alternc && chown alterncpanel:alterncpanel /run/alternc
|
||||
touch /run/alternc/refresh_slave
|
||||
/usr/lib/alternc/slave_dns
|
||||
# Apache will not start without this file
|
||||
touch /var/lib/alternc/apache-vhost/vhosts_all.conf
|
||||
|
|
|
@ -33,7 +33,7 @@ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|
|||
php_value post_max_size 50M
|
||||
AddDefaultCharset UTF-8
|
||||
# open_basedir allows access to specifics directories. We need to grant access to these directories for alternc, awstats, mailman...
|
||||
php_admin_value open_basedir /usr/share/alternc-mailman/patches/:/etc/alternc/:/run/alternc:/var/run/alternc/:/usr/share/alternc/panel/:%%ALTERNC_HTML%%/:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/:/etc/locale.gen:%%ALTERNC_LOGS%%:/etc/awstats/:/var/log/alternc/:/var/lib/alternc/panel/
|
||||
php_admin_value open_basedir /usr/share/alternc-mailman/patches/:/etc/alternc/:/run/alternc:/usr/share/alternc/panel/:%%ALTERNC_HTML%%/:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/:/etc/locale.gen:%%ALTERNC_LOGS%%:/etc/awstats/:/var/log/alternc/:/var/lib/alternc/panel/
|
||||
|
||||
</Directory>
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ fi
|
|||
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
|
||||
export APACHE_RUN_USER=www-data
|
||||
export APACHE_RUN_GROUP=www-data
|
||||
export APACHE_PID_FILE=/var/run/apache2$SUFFIX.pid
|
||||
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
|
||||
export APACHE_PID_FILE=/run/apache2$SUFFIX.pid
|
||||
export APACHE_RUN_DIR=/run/apache2$SUFFIX
|
||||
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
|
||||
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
|
||||
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
# Command-line options specified here will override the contents of
|
||||
# /etc/opendkim.conf. See opendkim(8) for a complete list of options.
|
||||
#DAEMON_OPTS=""
|
||||
# Change to /var/spool/postfix/var/run/opendkim to use a Unix socket with
|
||||
# Change to /var/spool/postfix/run/opendkim to use a Unix socket with
|
||||
# postfix in a chroot:
|
||||
#RUNDIR=/var/spool/postfix/var/run/opendkim
|
||||
RUNDIR=/var/run/opendkim
|
||||
#RUNDIR=/var/spool/postfix/run/opendkim
|
||||
RUNDIR=/run/opendkim
|
||||
#
|
||||
# Uncomment to specify an alternate socket
|
||||
# Note that setting this will override any Socket value in opendkim.conf
|
||||
|
|
|
@ -57,7 +57,7 @@ driver = mysql
|
|||
# the default my.cnf location
|
||||
# option_group - Read options from the given group (default: client)
|
||||
#
|
||||
# You can connect to UNIX sockets by using host: host=/var/run/mysql.sock
|
||||
# You can connect to UNIX sockets by using host: host=/run/mysql.sock
|
||||
# Note that currently you can't use spaces in parameters.
|
||||
#
|
||||
# sqlite:
|
||||
|
|
|
@ -182,7 +182,7 @@ protocol lda {
|
|||
|
||||
|
||||
# UNIX socket path to master authentication server to find users.
|
||||
auth_socket_path = /var/run/dovecot/auth-master
|
||||
auth_socket_path = /run/dovecot/auth-master
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
/var/run/alternc/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_do_actions.sh
|
||||
/run/alternc/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_do_actions.sh
|
||||
|
|
|
@ -1 +1 @@
|
|||
/var/run/alternc/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_update_domains.sh
|
||||
/run/alternc/ IN_CREATE,IN_ATTRIB,IN_NO_LOOP /usr/lib/alternc/inotify_update_domains.sh
|
||||
|
|
|
@ -157,7 +157,7 @@ chown :alterncpanel /etc/alternc/local.sh
|
|||
. /etc/alternc/local.sh
|
||||
|
||||
# May be missing
|
||||
test -d /var/run/alternc || ( mkdir -p /var/run/alternc && chown alterncpanel:alterncpanel /var/run/alternc )
|
||||
test -d /run/alternc || ( mkdir -p /run/alternc && chown alterncpanel:alterncpanel /run/alternc )
|
||||
|
||||
# Create the target directory
|
||||
for i in "$ALTERNC_HTML" "$ALTERNC_MAIL" "$ALTERNC_LOGS" ; do
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
if [ -z "$INOTIFY_UPDATE_DOMAIN" ] ; then
|
||||
/bin/echo -e '
|
||||
# File to look at for forced launch of update_domain (use incron)
|
||||
INOTIFY_UPDATE_DOMAIN="/var/run/alternc/inotify_update_domain.lock"
|
||||
INOTIFY_UPDATE_DOMAIN="/run/alternc/inotify_update_domain.lock"
|
||||
' >> /etc/alternc/local.sh
|
||||
fi
|
||||
|
||||
mkdir -p /var/run/alternc && chown alterncpanel /var/run/alternc
|
||||
mkdir -p /run/alternc && chown alterncpanel /run/alternc
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ if(isset($L_ALTERNC_LOGS_ARCHIVE)){
|
|||
define('ALTERNC_LOGS_ARCHIVE', "$L_ALTERNC_LOGS_ARCHIVE");
|
||||
}
|
||||
if( !defined("ALTERNC_LOCALES") ) { define('ALTERNC_LOCALES', ALTERNC_PANEL."/locales"); };
|
||||
if( !defined("ALTERNC_LOCK_JOBS") ) { define('ALTERNC_LOCK_JOBS', '/var/run/alternc/jobs-lock'); };
|
||||
if( !defined("ALTERNC_LOCK_JOBS") ) { define('ALTERNC_LOCK_JOBS', '/run/alternc/jobs-lock'); };
|
||||
if( !defined("ALTERNC_LOCK_PANEL") ) { define('ALTERNC_LOCK_PANEL', '/var/lib/alternc/panel/nologin.lock'); };
|
||||
if( !defined("ALTERNC_APACHE2_GEN_TMPL_DIR") ) { define('ALTERNC_APACHE2_GEN_TMPL_DIR', '/etc/alternc/templates/apache2/'); };
|
||||
if( !defined("ALTERNC_VHOST_DIR") ) { define('ALTERNC_VHOST_DIR', "/var/lib/alternc/apache-vhost/"); };
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
require_once("/usr/share/alternc/panel/class/config_nochk.php");
|
||||
ini_set("display_errors", 1);
|
||||
|
||||
if (file_exists("/var/run/alternc/jobs-lock")) {
|
||||
if (file_exists("/run/alternc/jobs-lock")) {
|
||||
echo "jobs-lock exists, did you ran alternc.install?\n";
|
||||
echo "canceling cron_users\n";
|
||||
exit(1);
|
||||
|
|
|
@ -57,7 +57,7 @@ require_once("/usr/share/alternc/panel/class/config_nochk.php");
|
|||
$admin->stop_if_jobs_locked();
|
||||
|
||||
if( !defined("ALTERNC_DO_ACTION_LOCK")){
|
||||
define("ALTERNC_DO_ACTION_LOCK",'/var/run/alternc/do_actions_cron.lock');
|
||||
define("ALTERNC_DO_ACTION_LOCK",'/run/alternc/do_actions_cron.lock');
|
||||
}
|
||||
|
||||
$SCRIPT='/usr/bin/php do_actions.php';
|
||||
|
|
|
@ -32,7 +32,7 @@ mysql_query() { /usr/bin/mysql --defaults-file=/etc/alternc/my.cnf -Bs -e "$@" ;
|
|||
DOMAIN_LOG_FILE="/var/log/alternc/update_domains.log"
|
||||
VHOST_FILE="$VHOST_DIR/vhosts_all.conf"
|
||||
VHOST_MANUALCONF="$VHOST_DIR/manual/"
|
||||
LOCK_JOBS="/var/run/alternc/jobs-lock"
|
||||
LOCK_JOBS="/run/alternc/jobs-lock"
|
||||
|
||||
|
||||
# Some useful miscellaneous shell functions
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# with the IP of the slave dns
|
||||
|
||||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
FLAGFILE="/var/run/alternc/refresh_slave";
|
||||
FLAGFILE="/run/alternc/refresh_slave";
|
||||
TPL="/etc/alternc/templates/bind/slaveip.conf"
|
||||
TARGET="/var/lib/alternc/bind/slaveip.conf"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ done
|
|||
|
||||
stop_if_jobs_locked
|
||||
|
||||
LOCK_FILE="/var/run/alternc/update_mails"
|
||||
LOCK_FILE="/run/alternc/update_mails"
|
||||
|
||||
# ALTERNC_MAIL is from local.sh
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ UMask 007
|
|||
# ## local:/path/to/socket to listen on a UNIX domain socket
|
||||
#
|
||||
#Socket inet:8892@localhost
|
||||
Socket local:/var/run/opendkim/opendkim.sock
|
||||
Socket local:/run/opendkim/opendkim.sock
|
||||
|
||||
## PidFile filename
|
||||
### default (none)
|
||||
|
@ -39,7 +39,7 @@ Socket local:/var/run/opendkim/opendkim.sock
|
|||
### Name of the file where the filter should write its pid before beginning
|
||||
### normal operations.
|
||||
#
|
||||
PidFile /var/run/opendkim/opendkim.pid
|
||||
PidFile /run/opendkim/opendkim.pid
|
||||
|
||||
|
||||
# Always oversign From (sign using actual From and a null From to prevent
|
||||
|
|
|
@ -45,7 +45,7 @@ LOG_FILE=$LOG_DIR/xferlog
|
|||
TMP_ROOT=$ALTERNC_ROOT/tmp
|
||||
RES_FILE=$TMP_ROOT/$PROG_NAME.res.$$
|
||||
INTERMEDIATE_FILE=$TMP_ROOT/$PROG_NAME.int.$$
|
||||
LOCK_FILE=/var/run/$PROG_NAME
|
||||
LOCK_FILE=/run/$PROG_NAME
|
||||
export TEXTDOMAIN=alternc-admintools
|
||||
YES=yes
|
||||
NO=no
|
||||
|
|
|
@ -40,7 +40,7 @@ LOG_DIR=/var/log/apache
|
|||
TMP_ROOT=$ALTERNC_ROOT/tmp
|
||||
RES_FILE=$TMP_ROOT/$PROG_NAME.res.$$
|
||||
INTERMEDIATE_FILE=$TMP_ROOT/$PROG_NAME.int.$$
|
||||
LOCK_FILE=/var/run/$PROG_NAME
|
||||
LOCK_FILE=/run/$PROG_NAME
|
||||
export TEXTDOMAIN=alternc-admintools
|
||||
YES=yes
|
||||
NO=no
|
||||
|
|
|
@ -40,7 +40,7 @@ LOG_DIR=/var/log
|
|||
LOG_FILE=$LOG_DIR/mysql.log
|
||||
TMP_ROOT=$ALTERNC_ROOT/tmp
|
||||
RES_FILE=$TMP_ROOT/$PROG_NAME.res.$$
|
||||
LOCK_FILE=/var/run/$PROG_NAME
|
||||
LOCK_FILE=/run/$PROG_NAME
|
||||
export TEXTDOMAIN=alternc-admintools
|
||||
YES=yes
|
||||
NO=no
|
||||
|
|
Loading…
Reference in New Issue