Skip to content

A free open source IT asset/license management system

Backup the .env if BACKUP_ENV is set to true

snipe2dd56f5bdadf
diff --git a/.env.example b/.env.example
index 4d2743acb8..32d1074ba5 100644
--- a/.env.example
+++ b/.env.example
@@ -105,3 +105,4 @@ APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1
ALLOW_IFRAMING=false
APP_CIPHER=AES-256-CBC
GOOGLE_MAPS_API=
+BACKUP_ENV=true
diff --git a/config/laravel-backup.php b/config/laravel-backup.php
index f9c4f45c3a..f77a080daa 100644
--- a/config/laravel-backup.php
+++ b/config/laravel-backup.php
@@ -24,6 +24,7 @@ return [
base_path('storage/private_uploads'),
base_path('storage/oauth-private.key'),
base_path('storage/oauth-public.key'),
+ (env('BACKUP_ENV')=='true') ? base_path('.env') : '',
],
/*