Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
PVEDiscordDark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirror
PVEDiscordDark
Commits
d3a2252d
Unverified
Commit
d3a2252d
authored
3 years ago
by
Weilbyte
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #76 from Weilbyte/weilbyte/issue73
Improve install process (fix #73)
parents
be16fb10
4268e884
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PVEDiscordDark.sh
+9
-5
9 additions, 5 deletions
PVEDiscordDark.sh
with
9 additions
and
5 deletions
PVEDiscordDark.sh
+
9
−
5
View file @
d3a2252d
...
@@ -65,9 +65,9 @@ function checkSupported {
...
@@ -65,9 +65,9 @@ function checkSupported {
}
}
function
isInstalled
{
function
isInstalled
{
if
(
grep
-Fq
"<link rel='stylesheet' type='text/css' href='/pve2/css/dd_style.css'>"
$TEMPLATE_FILE
||
if
(
grep
-Fq
"<link rel='stylesheet' type='text/css' href='/pve2/css/dd_style.css'>"
$TEMPLATE_FILE
&&
grep
-Fq
"<script type='text/javascript' src='/pve2/js/dd_patcher.js'></script>"
$TEMPLATE_FILE
||
grep
-Fq
"<script type='text/javascript' src='/pve2/js/dd_patcher.js'></script>"
$TEMPLATE_FILE
&&
[
-f
"/usr/share/pve-manager/css/dd_style.css"
]
)
;
then
[
-f
"/usr/share/pve-manager/css/dd_style.css"
]
&&
[
-f
"/usr/share/pve-manager/js/dd_patcher.js"
]
)
;
then
true
true
else
else
false
false
...
@@ -133,8 +133,12 @@ function install {
...
@@ -133,8 +133,12 @@ function install {
curl
-s
$BASE_URL
/PVEDiscordDark/js/PVEDiscordDark.js
>
/usr/share/pve-manager/js/dd_patcher.js
curl
-s
$BASE_URL
/PVEDiscordDark/js/PVEDiscordDark.js
>
/usr/share/pve-manager/js/dd_patcher.js
if
[
"
$_silent
"
=
false
]
;
then
echo
-e
"
${
CHECKMARK
}
Applying changes to template file"
;
fi
if
[
"
$_silent
"
=
false
]
;
then
echo
-e
"
${
CHECKMARK
}
Applying changes to template file"
;
fi
echo
"<link rel='stylesheet' type='text/css' href='/pve2/css/dd_style.css'>"
>>
$TEMPLATE_FILE
if
!(
grep
-Fq
"<link rel='stylesheet' type='text/css' href='/pve2/css/dd_style.css'>"
$TEMPLATE_FILE
)
;
then
echo
"<script type='text/javascript' src='/pve2/js/dd_patcher.js'></script>"
>>
$TEMPLATE_FILE
echo
"<link rel='stylesheet' type='text/css' href='/pve2/css/dd_style.css'>"
>>
$TEMPLATE_FILE
fi
if
!(
grep
-Fq
"<script type='text/javascript' src='/pve2/js/dd_patcher.js'></script>"
$TEMPLATE_FILE
)
;
then
echo
"<script type='text/javascript' src='/pve2/js/dd_patcher.js'></script>"
>>
$TEMPLATE_FILE
fi
local
IMAGELIST
=
$(
curl
-f
-s
"
$BASE_URL
/meta/imagelist"
)
local
IMAGELIST
=
$(
curl
-f
-s
"
$BASE_URL
/meta/imagelist"
)
local
IMAGELISTARR
=(
$(
echo
"
$IMAGELIST
"
|
tr
','
'\n'
)
)
local
IMAGELISTARR
=(
$(
echo
"
$IMAGELIST
"
|
tr
','
'\n'
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment