Update upstream source from tag 'upstream/1.0.8'
Update to upstream version '1.0.8'
with Debian dir 833519e853
This commit is contained in:
commit
c82fab0519
20
.Jenkinsfile
20
.Jenkinsfile
|
@ -1,24 +1,15 @@
|
|||
pipeline {
|
||||
agent { label 'docker' }
|
||||
agent { label 'sbuild' }
|
||||
stages {
|
||||
stage('Build Debian package') {
|
||||
agent {
|
||||
docker {
|
||||
image 'evolix/gbp:bullseye'
|
||||
args '-u root --privileged'
|
||||
}
|
||||
}
|
||||
when {
|
||||
branch 'debian'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
sh 'mk-build-deps --install --remove debian/control'
|
||||
sh 'rm -rf {source,*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt}'
|
||||
sh "gbp clone --debian-branch=$GIT_BRANCH $GIT_URL source"
|
||||
sh 'cd source && git checkout $GIT_BRANCH && gbp buildpackage -us -uc'
|
||||
sh 'gbp buildpackage'
|
||||
}
|
||||
archiveArtifacts allowEmptyArchive: true, artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt'
|
||||
archiveArtifacts allowEmptyArchive: true, artifacts: 'build-area/*.gz,build-area/*.bz2,build-area/*.xz,build-area/*.deb,build-area/*.dsc,build-area/*.changes,build-area/*.buildinfo,build-area/*.build,build-area/lintian.txt'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,10 +19,7 @@ pipeline {
|
|||
}
|
||||
steps {
|
||||
script {
|
||||
sh 'echo Dummy line to remove once something actually happens.'
|
||||
/* No crendentials yet.
|
||||
sh 'rsync -avP evoadmin-mail* droneci@pub.evolix.net:/home/droneci/evoadmin-mail/'
|
||||
*/
|
||||
sh 'rsync -avP build-area/evoadmin-mail*.deb build-area/evoadmin-mail*.buildinfo build-area/evoadmin-mail*.changes pub.evolix.org:/srv/upload/'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
34
.drone.yml
34
.drone.yml
|
@ -1,34 +0,0 @@
|
|||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: fetch
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git fetch --tags
|
||||
|
||||
- name: build debian package
|
||||
image: evolix/gbp:bullseye
|
||||
branches:
|
||||
- debian
|
||||
commands:
|
||||
- mk-build-deps --install --remove debian/control
|
||||
- gbp buildpackage -us -uc
|
||||
when:
|
||||
branch:
|
||||
- debian
|
||||
|
||||
- name: upload debian package
|
||||
image: drillster/drone-rsync
|
||||
settings:
|
||||
hosts: ["pub.evolix.net"]
|
||||
port: 22
|
||||
user: droneci
|
||||
key:
|
||||
from_secret: drone_private_key
|
||||
target: /home/droneci/evoadmin-mail/
|
||||
source: ../evoadmin-mail*
|
||||
delete: true
|
||||
when:
|
||||
branch:
|
||||
- debian
|
10
README.md
10
README.md
|
@ -9,20 +9,20 @@ Evoadmin-mail requirements are an LDAP server, a web server and
|
|||
PHP. See [INSTALL](docs/install.md) for instructions.
|
||||
|
||||
Multiples services can be configured to use the LDAP directory
|
||||
managed by Evoadmin-mail :
|
||||
managed by Evoadmin-mail:
|
||||
|
||||
- TODO
|
||||
|
||||
## Test
|
||||
|
||||
You can deploy a test environment with Vagrant :
|
||||
You can deploy a test environment with Vagrant:
|
||||
|
||||
~~~
|
||||
vagrant up
|
||||
~~~
|
||||
|
||||
Evoadmin-mail uses the evoadminmail.packmail.example.com domain
|
||||
on localhost, so update your /etc/hosts :
|
||||
on localhost, so update your /etc/hosts:
|
||||
|
||||
~~~
|
||||
127.0.0.1 evoadminmail.packmail.example.com
|
||||
|
@ -34,7 +34,7 @@ https://evoadminmail.packmail.example.com:8443
|
|||
### Authentication
|
||||
|
||||
The default admin user is "evoadmin", the password is randomly
|
||||
generated and can be recovered from LDAP :
|
||||
generated and can be recovered from LDAP:
|
||||
|
||||
~~~
|
||||
vagrant ssh
|
||||
|
@ -45,7 +45,7 @@ ldapvi --ldapsearch "(uid=evoadmin)" | grep userPassword | awk '{ print $2 }'
|
|||
### Deployment
|
||||
|
||||
Launch rsync-auto in a terminal to automatically synchronise your
|
||||
local code with the Vagrant VM :
|
||||
local code with the Vagrant VM:
|
||||
|
||||
~~~
|
||||
vagrant rsync-auto
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Install
|
||||
|
||||
Evoadmin-mail need an LDAP server, a Web server and PHP. This documentation explain how to configure OpenLDAP and Apache with mod_php.
|
||||
Evoadmin-mail needs an LDAP server, a Web server and PHP. This documentation explains how to configure OpenLDAP and Apache with mod_php.
|
||||
|
||||
Following files extract are [Jinja2](http://jinja.pocoo.org) templates, **{{ varname }}** must be replaced by custom value, eg.
|
||||
Following files extract are [Jinja2](http://jinja.pocoo.org) templates, **{{ varname }}** must be replaced by custom value, e.g.
|
||||
|
||||
~~~
|
||||
ldap_hostname: "mailserver"
|
||||
|
@ -237,7 +237,7 @@ git clone https://forge.evolix.org/evoadmin-mail.git /home/evoadmin-mail/www
|
|||
;
|
||||
; You need to copy and edit config-sample.ini to config.ini.
|
||||
; This INI file is loaded by evoadmin-mail and contains the
|
||||
; following configurations :
|
||||
; following configurations:
|
||||
;
|
||||
; * Global settings
|
||||
; * LDAP settings
|
||||
|
@ -257,4 +257,4 @@ admin_pass = "{{ ldap_admin_password }}"
|
|||
superadmin[] = "evoadmin"
|
||||
~~~
|
||||
|
||||
You can now connect to your Evoadmin-mail with **evoadmin** user and your precedently defined password !
|
||||
You can now connect to your Evoadmin-mail with **evoadmin** user and your previously defined password!
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
class Config {
|
||||
private static $name='Evoadmin Mail', $mail='root@localhost', $log_level='error', $ldap=array(), $quota_path='';
|
||||
private static $name='Evoadmin Mail', $mail='root@localhost', $log_level='error', $ldap=array(), $quota_path='', $evoexec=array();
|
||||
public static function load() {
|
||||
$file = getenv("EVOADMINMAIL_CONFIG_FILE") or $file = '../config/config.ini';
|
||||
$ini = parse_ini_file($file, true);
|
||||
|
@ -10,6 +10,7 @@ class Config {
|
|||
self::$log_level = $ini['global']['log_level'];
|
||||
self::$ldap = $ini['ldap'];
|
||||
self::$quota_path = $ini['quota']['path'];
|
||||
self::$evoexec = $ini['evoexec'];
|
||||
}
|
||||
|
||||
public static function getName() {
|
||||
|
|
|
@ -139,7 +139,7 @@ class FormController {
|
|||
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du domaine '.self::$form['cn'].' ...');
|
||||
try {
|
||||
self::$server->delDomain(self::$form['cn']);
|
||||
PageController::$alerts[] = array('type' => 0, 'message' => 'Suppression effectué.');
|
||||
PageController::$alerts[] = array('type' => 0, 'message' => 'Suppression effectuée.');
|
||||
} catch (Exception $e_ad) {
|
||||
PageController::$alerts[] = array('type' => 2, 'message' => $e_ad->getMessage());
|
||||
}
|
||||
|
@ -149,8 +149,8 @@ class FormController {
|
|||
private static function delAccount() {
|
||||
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du compte '.self::$form['uid'].'...');
|
||||
try {
|
||||
self::$domain->delAccount(self::$form['uid'],self::$form['cn']);
|
||||
PageController::$alerts[] = array('type' => 0, 'message' => "Suppression effectué.");
|
||||
self::$domain->delAccount(self::$form['uid'],self::$form['domain']);
|
||||
PageController::$alerts[] = array('type' => 0, 'message' => "Suppression effectuée."));
|
||||
} catch (Exception $e) {
|
||||
PageController::$alerts[] = array('type' => 2, 'message' => $e->getMessage());
|
||||
}
|
||||
|
|
|
@ -39,11 +39,12 @@ if [ "$PASSWORD" != "$READPASS" ]; then
|
|||
fi
|
||||
|
||||
# mv pseudo-homeDir to directory.<date> for deleted users
|
||||
USERDIR=${USERIS%%@$DOMAINIS}
|
||||
if [ "$DEL" == "on" ]; then
|
||||
if [[ -n $USERIS && -n $DOMAINIS && -e "/home/vmail/$DOMAINIS" && -e "/home/vmail/$DOMAINIS/$USERIS" ]]; then
|
||||
mv /home/vmail/$DOMAINIS/$USERIS /home/vmail/$DOMAINIS/$USERIS.$DATE
|
||||
chown -R root:root /home/vmail/$DOMAINIS/$USERIS.$DATE
|
||||
chmod -R 700 /home/vmail/$DOMAINIS/$USERIS.$DATE
|
||||
if [[ -n $USERIS && -n $DOMAINIS && -n $USERDIR && -e "/home/vmail/$DOMAINIS" && -e "/home/vmail/$DOMAINIS/$USERDIR" ]]; then
|
||||
mv /home/vmail/$DOMAINIS/$USERDIR /home/vmail/$DOMAINIS/$USERDIR.$DATE
|
||||
chown -R root:root /home/vmail/$DOMAINIS/$USERDIR.$DATE
|
||||
chmod -R 700 /home/vmail/$DOMAINIS/$USERDIR.$DATE
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue