|  | @ -30,52 +30,54 @@ EOF | 
		
	
		
			
				|  |  |   DocumentRoot /var/www/cagettepei/www/ |  |  |   DocumentRoot /var/www/cagettepei/www/ | 
		
	
		
			
				|  |  | </VirtualHost> |  |  | </VirtualHost> | 
		
	
		
			
				|  |  | ``` |  |  | ``` | 
		
	
		
			
				|  |  | 	* sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf |  |  |  | 
		
	
		
			
				|  |  | 	* a2dissite 000-default.conf |  |  |  | 
		
	
		
			
				|  |  | 	* a2ensite cagettepei.conf |  |  |  | 
		
	
		
			
				|  |  |     * a2enmod neko rewrite |  |  |  | 
		
	
		
			
				|  |  | 	* systemctl restart apache2 |  |  |  | 
		
	
		
			
				|  |  |  |  |  | * sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf | 
		
	
		
			
				|  |  |  |  |  | * a2dissite 000-default.conf | 
		
	
		
			
				|  |  |  |  |  | * a2ensite cagettepei.conf | 
		
	
		
			
				|  |  |  |  |  | * a2enmod neko rewrite | 
		
	
		
			
				|  |  |  |  |  | * systemctl restart apache2 | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | ## CONFIGURATION |  |  | ## CONFIGURATION | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | 	* cd /var/www/cagettepei |  |  |  | 
		
	
		
			
				|  |  |   	* vim config.xml |  |  |  | 
		
	
		
			
				|  |  |   	``` |  |  |  | 
		
	
		
			
				|  |  | 		<config |  |  |  | 
		
	
		
			
				|  |  | 	host="<DOMAIN.TLD>" |  |  |  | 
		
	
		
			
				|  |  | 	key="<SECRET_PHRASE>" |  |  |  | 
		
	
		
			
				|  |  | 	name = "CagettePéi" |  |  |  | 
		
	
		
			
				|  |  | 	default_email = "<EMAIL>" |  |  |  | 
		
	
		
			
				|  |  | 	webmaster_email = "<EMAIL>" |  |  |  | 
		
	
		
			
				|  |  | 	database="mysql://cagettepei:cagettepei@localhost/cagettepei" |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  | 	smtp_host="localhost" |  |  |  | 
		
	
		
			
				|  |  | 	smtp_port="25" |  |  |  | 
		
	
		
			
				|  |  | 	smtp_user="" |  |  |  | 
		
	
		
			
				|  |  | 	smtp_pass="" |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  | 	lang="fr" |  |  |  | 
		
	
		
			
				|  |  | 	langs="fr" |  |  |  | 
		
	
		
			
				|  |  |   	langnames="Français" |  |  |  | 
		
	
		
			
				|  |  | 	maintain="0" |  |  |  | 
		
	
		
			
				|  |  | 	debug="0" |  |  |  | 
		
	
		
			
				|  |  | 	sqllog="0" |  |  |  | 
		
	
		
			
				|  |  | 	cache="1" |  |  |  | 
		
	
		
			
				|  |  | 	cachetpl="0" |  |  |  | 
		
	
		
			
				|  |  | 	/> |  |  |  | 
		
	
		
			
				|  |  | 	``` |  |  |  | 
		
	
		
			
				|  |  |  |  |  | * cd /var/www/cagettepei | 
		
	
		
			
				|  |  |  |  |  | * vim config.xml | 
		
	
		
			
				|  |  |  |  |  | ``` | 
		
	
		
			
				|  |  |  |  |  | <config | 
		
	
		
			
				|  |  |  |  |  | host="<DOMAIN.TLD>" | 
		
	
		
			
				|  |  |  |  |  | key="<SECRET_PHRASE>" | 
		
	
		
			
				|  |  |  |  |  | name = "CagettePéi" | 
		
	
		
			
				|  |  |  |  |  | default_email = "<EMAIL>" | 
		
	
		
			
				|  |  |  |  |  | webmaster_email = "<EMAIL>" | 
		
	
		
			
				|  |  |  |  |  | database="mysql://cagettepei:cagettepei@localhost/cagettepei" | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  | smtp_host="localhost" | 
		
	
		
			
				|  |  |  |  |  | smtp_port="25" | 
		
	
		
			
				|  |  |  |  |  | smtp_user="" | 
		
	
		
			
				|  |  |  |  |  | smtp_pass="" | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  | lang="fr" | 
		
	
		
			
				|  |  |  |  |  | langs="fr" | 
		
	
		
			
				|  |  |  |  |  | langnames="Français" | 
		
	
		
			
				|  |  |  |  |  | maintain="0" | 
		
	
		
			
				|  |  |  |  |  | debug="0" | 
		
	
		
			
				|  |  |  |  |  | sqllog="0" | 
		
	
		
			
				|  |  |  |  |  | cache="1" | 
		
	
		
			
				|  |  |  |  |  | cachetpl="0" | 
		
	
		
			
				|  |  |  |  |  | /> | 
		
	
		
			
				|  |  |  |  |  | ``` | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | ADMIN RESET PASSWORD |  |  | ADMIN RESET PASSWORD | 
		
	
		
			
				|  |  | -------------------- |  |  | -------------------- | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | * # go to http://localhost for ERROR + table regeneration, then |  |  |  | 
		
	
		
			
				|  |  |  |  |  | go to http://localhost for ERROR + table regeneration, then | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  | * cd /var/www/cagettepei |  |  | * cd /var/www/cagettepei | 
		
	
		
			
				|  |  | 	* SECRET=$(grep key= config.xml | cut -d= -f2 | cut -d'"' -f2) |  |  |  | 
		
	
		
			
				|  |  | 	* echo "insert into User values (1,'fr',MD5('${SECRET}cagettepei'),1,'Administrateur','Cagette Péi', 'admin', null, null, null, null, null, null, null, null, null, now(), now(),6,null, null)" | mysql -h localhost -u cagettepei -pcagettepei cagettepei |  |  |  | 
		
	
		
			
				|  |  | * # connect with admin / cagettepei |  |  |  | 
		
	
		
			
				|  |  |  |  |  | * SECRET=$(grep key= config.xml | cut -d= -f2 | cut -d'"' -f2) | 
		
	
		
			
				|  |  |  |  |  | * echo "insert into User values (1,'fr',MD5('${SECRET}cagettepei'),1,'Administrateur','Cagette Péi', 'admin', null, null, null, null, null, null, null, null, null, now(), now(),6,null, null)" | mysql -h localhost -u cagettepei -pcagettepei cagettepei | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  | then, connect with admin / cagettepei | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |  | ### change admin password | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | * # change admin password |  |  |  | 
		
	
		
			
				|  |  | * echo "update User set pass=MD5('${SECRET}cagettepei') where id=1" | mysql -h localhost -u cagettepei -pcagettepei cagettepei |  |  | * echo "update User set pass=MD5('${SECRET}cagettepei') where id=1" | mysql -h localhost -u cagettepei -pcagettepei cagettepei | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
	
		
			
				|  | @ -118,6 +120,7 @@ ExecStart=/var/www/cagettepei-batch minute | 
		
	
		
			
				|  |  | [Install] |  |  | [Install] | 
		
	
		
			
				|  |  | WantedBy=multi-user.target |  |  | WantedBy=multi-user.target | 
		
	
		
			
				|  |  | ``` |  |  | ``` | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  | * vim /etc/systemd/system/cagettepei-batch-day.service |  |  | * vim /etc/systemd/system/cagettepei-batch-day.service | 
		
	
		
			
				|  |  | ``` |  |  | ``` | 
		
	
		
			
				|  |  | [Unit] |  |  | [Unit] | 
		
	
	
		
			
				|  | @ -131,6 +134,7 @@ ExecStart=/var/www/cagettepei-batch daily | 
		
	
		
			
				|  |  | [Install] |  |  | [Install] | 
		
	
		
			
				|  |  | WantedBy=multi-user.target |  |  | WantedBy=multi-user.target | 
		
	
		
			
				|  |  | ``` |  |  | ``` | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  | * vim /etc/systemd/system/cagettepei-batch-minute.timer |  |  | * vim /etc/systemd/system/cagettepei-batch-minute.timer | 
		
	
		
			
				|  |  | ``` |  |  | ``` | 
		
	
		
			
				|  |  | [Unit] |  |  | [Unit] | 
		
	
	
		
			
				|  | @ -144,6 +148,7 @@ Unit=cagettepei-batch-minute.service | 
		
	
		
			
				|  |  | [Install] |  |  | [Install] | 
		
	
		
			
				|  |  | WantedBy=timers.target |  |  | WantedBy=timers.target | 
		
	
		
			
				|  |  | ``` |  |  | ``` | 
		
	
		
			
				|  |  |  |  |  | 
 | 
		
	
		
			
				|  |  | * vim /etc/systemd/system/cagettepei-batch-day.timer |  |  | * vim /etc/systemd/system/cagettepei-batch-day.timer | 
		
	
		
			
				|  |  | ``` |  |  | ``` | 
		
	
		
			
				|  |  | [Unit] |  |  | [Unit] | 
		
	
	
		
			
				|  | @ -159,12 +164,9 @@ WantedBy=timers.target | 
		
	
		
			
				|  |  | ``` |  |  | ``` | 
		
	
		
			
				|  |  | * systemctl daemon-reload |  |  | * systemctl daemon-reload | 
		
	
		
			
				|  |  | * systemctl edit apache2 # bind the 2 timers to apache2 cagette |  |  | * systemctl edit apache2 # bind the 2 timers to apache2 cagette | 
		
	
		
			
				|  |  | 	``` |  |  |  | 
		
	
		
			
				|  |  | 	[Unit] |  |  |  | 
		
	
		
			
				|  |  | 	BindsTo = cagettepei-batch-minute.timer cagettepei-batch-day.timer |  |  |  | 
		
	
		
			
				|  |  | 	``` |  |  |  | 
		
	
		
			
				|  |  |  |  |  | ``` | 
		
	
		
			
				|  |  |  |  |  | [Unit] | 
		
	
		
			
				|  |  |  |  |  | BindsTo = cagettepei-batch-minute.timer cagettepei-batch-day.timer | 
		
	
		
			
				|  |  |  |  |  | ``` | 
		
	
		
			
				|  |  | * systemctl enable cagettepei-batch-minute.timer cagettepei-batch-day.timer |  |  | * systemctl enable cagettepei-batch-minute.timer cagettepei-batch-day.timer | 
		
	
		
			
				|  |  | * systemctl start cagettepei-batch-minute.timer cagettepei-batch-day.timer |  |  | * systemctl start cagettepei-batch-minute.timer cagettepei-batch-day.timer | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  | 
		
	
		
			
				|  |  | 
 |  |  |  |