Add DataImporter to Firefly
This commit is contained in:
		
							parent
							
								
									5498c05cf3
								
							
						
					
					
						commit
						32280a762f
					
				| @ -43,6 +43,7 @@ mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRI | |||||||
| msg_ok "Set up database" | msg_ok "Set up database" | ||||||
| 
 | 
 | ||||||
| msg_info "Installing Firefly III (Patience)" | msg_info "Installing Firefly III (Patience)" | ||||||
|  | LOCAL_IP=$(hostname -I | awk '{print $1}') | ||||||
| RELEASE=$(curl -fsSL https://api.github.com/repos/firefly-iii/firefly-iii/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') | RELEASE=$(curl -fsSL https://api.github.com/repos/firefly-iii/firefly-iii/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') | ||||||
| cd /opt | cd /opt | ||||||
| curl -fsSL "https://github.com/firefly-iii/firefly-iii/releases/download/v${RELEASE}/FireflyIII-v${RELEASE}.tar.gz" -o "FireflyIII-v${RELEASE}.tar.gz" | curl -fsSL "https://github.com/firefly-iii/firefly-iii/releases/download/v${RELEASE}/FireflyIII-v${RELEASE}.tar.gz" -o "FireflyIII-v${RELEASE}.tar.gz" | ||||||
| @ -61,6 +62,14 @@ $STD php artisan firefly:upgrade-database | |||||||
| $STD php artisan firefly:correct-database | $STD php artisan firefly:correct-database | ||||||
| $STD php artisan firefly:report-integrity | $STD php artisan firefly:report-integrity | ||||||
| $STD php artisan firefly:laravel-passport-keys | $STD php artisan firefly:laravel-passport-keys | ||||||
|  | IMPORTER_RELEASE=$(curl -fsSL https://api.github.com/repos/firefly-iii/data-importer/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') | ||||||
|  | mkdir -p /opt/firefly/dataimporter | ||||||
|  | cd /opt | ||||||
|  | curl -fsSL "https://github.com/firefly-iii/data-importer/releases/download/v${IMPORTER_RELEASE}/DataImporter-v${IMPORTER_RELEASE}.tar.gz" -o "DataImporter-v${IMPORTER_RELEASE}.tar.gz" | ||||||
|  | tar -xzf "DataImporter-v${IMPORTER_RELEASE}.tar.gz" -C /opt/firefly/dataimporter | ||||||
|  | cp /opt/firefly/dataimporter/.env.example /opt/firefly/dataimporter/.env | ||||||
|  | sed -i "s#FIREFLY_III_URL=#FIREFLY_III_URL=http://${LOCAL_IP}#g" /opt/firefly/dataimporter/.env | ||||||
|  | chown -R www-data:www-data /opt/firefly | ||||||
| echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" | echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" | ||||||
| msg_ok "Installed Firefly III" | msg_ok "Installed Firefly III" | ||||||
| 
 | 
 | ||||||
| @ -75,7 +84,18 @@ cat <<EOF >/etc/apache2/sites-available/firefly.conf | |||||||
|         AllowOverride All |         AllowOverride All | ||||||
|         Require all granted |         Require all granted | ||||||
|     </Directory> |     </Directory> | ||||||
|    | 
 | ||||||
|  |   Alias /dataimporter/ /opt/firefly/dataimporter/public/ | ||||||
|  | 
 | ||||||
|  |     <Directory /opt/firefly/dataimporter/public/> | ||||||
|  |         Options Indexes FollowSymLinks | ||||||
|  |         AllowOverride All | ||||||
|  |         Require all granted | ||||||
|  |     </Directory> | ||||||
|  |     <FilesMatch \.php$> | ||||||
|  |         SetHandler application/x-httpd-php | ||||||
|  |     </FilesMatch> | ||||||
|  | 
 | ||||||
|     ErrorLog /var/log/apache2/error.log |     ErrorLog /var/log/apache2/error.log | ||||||
|     CustomLog /var/log/apache2/access.log combined |     CustomLog /var/log/apache2/access.log combined | ||||||
| 
 | 
 | ||||||
| @ -93,7 +113,8 @@ motd_ssh | |||||||
| customize | customize | ||||||
| 
 | 
 | ||||||
| msg_info "Cleaning up" | msg_info "Cleaning up" | ||||||
| rm -rf /opt/FireflyIII-v${RELEASE}.tar.gz | rm -rf "/opt/FireflyIII-v${RELEASE}.tar.gz" | ||||||
|  | rm -rf "/opt/DataImporter-v${IMPORTER_RELEASE}.tar.gz" | ||||||
| $STD apt-get -y autoremove | $STD apt-get -y autoremove | ||||||
| $STD apt-get -y autoclean | $STD apt-get -y autoclean | ||||||
| msg_ok "Cleaned" | msg_ok "Cleaned" | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 tremor021
						tremor021