diff --git a/api/panel/bootstrap.php b/api/panel/bootstrap.php index 4fe55c98..35125b66 100644 --- a/api/panel/bootstrap.php +++ b/api/panel/bootstrap.php @@ -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 : */ diff --git a/bureau/class/config.php b/bureau/class/config.php index f23acb1d..dd2ee7dc 100755 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -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/"); diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index e3cc3dd6..2f632999 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -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é ? diff --git a/debian/alternc.cron.d b/debian/alternc.cron.d index 62180c31..f324f260 100644 --- a/debian/alternc.cron.d +++ b/debian/alternc.cron.d @@ -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 diff --git a/debian/alternc.postinst b/debian/alternc.postinst index 40be48cd..74c973c0 100644 --- a/debian/alternc.postinst +++ b/debian/alternc.postinst @@ -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 diff --git a/etc/alternc/templates/alternc/apache2.conf b/etc/alternc/templates/alternc/apache2.conf index 9e60e9ff..e37d29e4 100644 --- a/etc/alternc/templates/alternc/apache2.conf +++ b/etc/alternc/templates/alternc/apache2.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/ diff --git a/etc/alternc/templates/apache2/envvars b/etc/alternc/templates/apache2/envvars index e7dda7ae..cd3b5eb0 100644 --- a/etc/alternc/templates/apache2/envvars +++ b/etc/alternc/templates/apache2/envvars @@ -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 diff --git a/etc/alternc/templates/default/opendkim b/etc/alternc/templates/default/opendkim index 2e309626..d5fcd424 100644 --- a/etc/alternc/templates/default/opendkim +++ b/etc/alternc/templates/default/opendkim @@ -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 diff --git a/etc/alternc/templates/dovecot/alternc-sql.conf b/etc/alternc/templates/dovecot/alternc-sql.conf index e4bad783..d34a80a8 100644 --- a/etc/alternc/templates/dovecot/alternc-sql.conf +++ b/etc/alternc/templates/dovecot/alternc-sql.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: diff --git a/etc/alternc/templates/dovecot/conf.d/95_alternc.conf b/etc/alternc/templates/dovecot/conf.d/95_alternc.conf index 14e6c7d7..a6713cb3 100644 --- a/etc/alternc/templates/dovecot/conf.d/95_alternc.conf +++ b/etc/alternc/templates/dovecot/conf.d/95_alternc.conf @@ -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 } diff --git a/etc/incron.d/alternc_do_action b/etc/incron.d/alternc_do_action index 509d73d5..bb8fcca1 100644 --- a/etc/incron.d/alternc_do_action +++ b/etc/incron.d/alternc_do_action @@ -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 diff --git a/etc/incron.d/alternc_update_domains b/etc/incron.d/alternc_update_domains index 528275eb..6188c1a0 100644 --- a/etc/incron.d/alternc_update_domains +++ b/etc/incron.d/alternc_update_domains @@ -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 diff --git a/install/alternc.install b/install/alternc.install index 49eabe26..acec6919 100755 --- a/install/alternc.install +++ b/install/alternc.install @@ -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 diff --git a/install/upgrades/3.0.0~4.sh b/install/upgrades/3.0.0~4.sh index ee152385..d0ee1b5c 100755 --- a/install/upgrades/3.0.0~4.sh +++ b/install/upgrades/3.0.0~4.sh @@ -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 diff --git a/phpunit/bootstrap.php b/phpunit/bootstrap.php index 35576259..e53c8fc8 100644 --- a/phpunit/bootstrap.php +++ b/phpunit/bootstrap.php @@ -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/"); }; diff --git a/src/cron_users.sh b/src/cron_users.sh index ca7cc738..3b3cdfdd 100755 --- a/src/cron_users.sh +++ b/src/cron_users.sh @@ -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); diff --git a/src/do_actions.php b/src/do_actions.php index 908487eb..7710115f 100644 --- a/src/do_actions.php +++ b/src/do_actions.php @@ -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'; diff --git a/src/functions.sh b/src/functions.sh index b6cd5fee..6fce08aa 100755 --- a/src/functions.sh +++ b/src/functions.sh @@ -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 diff --git a/src/slave_dns b/src/slave_dns index 7c459ec4..0b20420e 100644 --- a/src/slave_dns +++ b/src/slave_dns @@ -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" diff --git a/src/update_mails.sh b/src/update_mails.sh index 1ee68a83..de8650a6 100755 --- a/src/update_mails.sh +++ b/src/update_mails.sh @@ -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 diff --git a/stretch/opendkim.conf b/stretch/opendkim.conf index afc808cc..0a63f560 100644 --- a/stretch/opendkim.conf +++ b/stretch/opendkim.conf @@ -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 diff --git a/tools/top_ftp_users b/tools/top_ftp_users index 47dc8f93..f9c3c12b 100755 --- a/tools/top_ftp_users +++ b/tools/top_ftp_users @@ -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 diff --git a/tools/top_http_users b/tools/top_http_users index 9cf3115c..59e85e89 100755 --- a/tools/top_http_users +++ b/tools/top_http_users @@ -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 diff --git a/tools/top_mysql_users b/tools/top_mysql_users index bfceeef3..d737d186 100755 --- a/tools/top_mysql_users +++ b/tools/top_mysql_users @@ -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