forked from cablelabs/os-provisioning
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpunit_prepare.sh
More file actions
executable file
·35 lines (30 loc) · 945 Bytes
/
phpunit_prepare.sh
File metadata and controls
executable file
·35 lines (30 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Helper to clean environment if there are strange problems
# like ExtendedValidator not found or wrongly built URLs like https://localhost/admin/Contract/create
# if that doesn't help try deleting bootstrap/cache/*
export COMPOSER_MEMORY_LIMIT=-1
export COMPOSER_ALLOW_SUPERUSER=1
declare -a CMDS=(
"mkdir -p /var/www/nmsprime/storage/framework/cache"
"mkdir -p /var/www/nmsprime/storage/framework/sessions"
"mkdir -p /var/www/nmsprime/storage/framework/views"
"composer update"
"php artisan migrate"
"php artisan module:migrate"
"php artisan module:publish"
"php artisan optimize:clear"
"php artisan nms:coremon-publish"
"npm install"
"npm run dev"
"chown -R apache /var/www/nmsprime/storage/framework"
"systemctl restart supervisord httpd"
"systemctl restart telegraf"
)
clear
for CMD in "${CMDS[@]}"; do
echo
echo "Running $CMD…"
$CMD
done
echo
echo