mirror of
https://github.com/YunoHost-Apps/z-push_ynh.git
synced 2024-09-03 18:05:58 +02:00
Modification od base config file
This commit is contained in:
parent
450feccbae
commit
8924f6273e
2 changed files with 23 additions and 14 deletions
|
@ -48,14 +48,14 @@
|
|||
define('TIMEZONE', '');
|
||||
|
||||
// Defines the base path on the server
|
||||
define('BASE_PATH', dirname(__FILE__) . '/');
|
||||
define('BASE_PATH', dirname($_SERVER['SCRIPT_FILENAME']). '/');
|
||||
|
||||
// Try to set unlimited timeout
|
||||
define('SCRIPT_TIMEOUT', 0);
|
||||
|
||||
// Your PHP could have a bug when base64 encoding: https://bugs.php.net/bug.php?id=68532
|
||||
// NOTE: Run "php testing/testing-bug68532fixed.php" to know what value put here
|
||||
define('BUG68532FIXED', true);
|
||||
define('BUG68532FIXED', false);
|
||||
|
||||
// When accessing through a proxy, the "X-Forwarded-For" header contains the original remote IP
|
||||
define('USE_X_FORWARDED_FOR_HEADER', false);
|
||||
|
@ -111,7 +111,7 @@
|
|||
/**********************************************************************************
|
||||
* Default FileStateMachine settings
|
||||
*/
|
||||
define('STATE_DIR', '/var/lib/z-push/');
|
||||
define('STATE_DIR', 'ALIASTOCHANGE/');
|
||||
|
||||
|
||||
/**********************************************************************************
|
||||
|
@ -147,7 +147,7 @@
|
|||
* ones, e.g. setting to LOGLEVEL_DEBUG will also output LOGLEVEL_FATAL, LOGLEVEL_ERROR,
|
||||
* LOGLEVEL_WARN and LOGLEVEL_INFO level entries.
|
||||
*/
|
||||
define('LOGFILEDIR', '/var/log/z-push/');
|
||||
define('LOGFILEDIR', 'LOGTOCHANGE/');
|
||||
define('LOGFILE', LOGFILEDIR . 'z-push.log');
|
||||
define('LOGERRORFILE', LOGFILEDIR . 'z-push-error.log');
|
||||
define('LOGLEVEL', LOGLEVEL_INFO);
|
||||
|
@ -172,7 +172,7 @@
|
|||
|
||||
|
||||
define('LOG_MEMORY_PROFILER', true);
|
||||
define('LOG_MEMORY_PROFILER_FILE', '/var/log/z-push/memory_profile');
|
||||
define('LOG_MEMORY_PROFILER_FILE', 'LOGTOCHANGE/memory_profile');
|
||||
|
||||
/**********************************************************************************
|
||||
* Mobile settings
|
||||
|
@ -276,7 +276,7 @@
|
|||
* Backend settings
|
||||
*/
|
||||
// the backend data provider
|
||||
define('BACKEND_PROVIDER', '');
|
||||
define('BACKEND_PROVIDER', 'BACKENDTOCHANGE');
|
||||
|
||||
// top collector backend class name
|
||||
// Default is: TopCollector
|
||||
|
|
|
@ -14,14 +14,17 @@ fi
|
|||
# Prereqs
|
||||
sudo apt-get install php-soap php5-imap libawl-php php5-xsl -y
|
||||
|
||||
# Copy files to the right place
|
||||
final_logpath=/var/log/$app
|
||||
final_path=/var/www/$app
|
||||
|
||||
# Copy files to the right place
|
||||
sudo mkdir -p $final_path
|
||||
sudo cp -a ../sources/* $final_path
|
||||
|
||||
# Configuration
|
||||
sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" ../conf/config*.php
|
||||
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/config*.php
|
||||
sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" ../conf/config.php
|
||||
sed -i "s@ALIASTOCHANGE@$final_path@g" ../conf/config.php
|
||||
sed -i "s@LOGTOCHANGE@$final_logpath@g" ../conf/config.php
|
||||
|
||||
# Enable caldav carddav support
|
||||
sudo yunohost app list -f baikal --json | grep '"installed": true'
|
||||
|
@ -31,20 +34,26 @@ if [ "$?" -eq 0 ]; then
|
|||
caldavpath=$(sudo yunohost app setting baikal path)
|
||||
caldavpath=${caldavpath%/}
|
||||
|
||||
# Configuration of backend
|
||||
sed -i "s@BACKENDTOCHANGE@BackendCombined@g" ../conf/config.php
|
||||
|
||||
# Configuration baikal
|
||||
sed -i "s@BAIKALDOMAIN@$caldavdomain@g" ../conf/backend/config*.php
|
||||
sed -i "s@BAIKALPATH@$caldavpath@g" ../conf/backend/config*.php
|
||||
sed -i "s@DOMAINTOCHANGE@$domain@g" ../conf/backend/config-imap.php
|
||||
|
||||
# Copy config
|
||||
sudo cp ../conf/config-combined.php $final_path/config.php
|
||||
sudo cp ../conf/config.php $final_path/config.php
|
||||
sudo cp ../conf/backend/config-imap.php $final_path/backend/imap/config.php
|
||||
sudo cp ../conf/backend/config-carddav.php $final_path/backend/carddav/config.php
|
||||
sudo cp ../conf/backend/config-caldav.php $final_path/backend/caldav/config.php
|
||||
sudo cp ../conf/backend/config-combined.php $final_path/backend/combined/config.php
|
||||
else
|
||||
# Configuration of backend
|
||||
sed -i "s@BACKENDTOCHANGE@BackendIMAP@g" ../conf/config.php
|
||||
|
||||
# Copy config
|
||||
sudo cp ../conf/config.php $final_path/
|
||||
sudo cp ../conf/config.php $final_path/config.php
|
||||
sed -i "s@DOMAINTOCHANGE@$domain@g" ../conf/backend/config-imap.php
|
||||
sudo cp ../conf/backend/config-imap.php $final_path/backend/imap/config.php
|
||||
|
||||
|
@ -55,9 +64,9 @@ sudo chown -R www-data: $final_path
|
|||
|
||||
|
||||
# Create log directory
|
||||
sudo mkdir -p /var/log/$app
|
||||
sudo chmod 750 /var/log/$app
|
||||
sudo chown www-data:www-data /var/log/$app
|
||||
sudo mkdir -p $final_logpath
|
||||
sudo chmod 750 $final_logpath
|
||||
sudo chown www-data:www-data $final_logpath
|
||||
|
||||
#Copy XMLElement.php
|
||||
sudo ln -s /usr/share/awl/inc/XML* /var/www/z-push/include/
|
||||
|
|
Loading…
Add table
Reference in a new issue