Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
Context Sensitive Group
freedombone
Commits
945ca418
Commit
945ca418
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Backup and restore the icecast playlist
parent
94b1d56c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-icecast
+15
-8
15 additions, 8 deletions
src/freedombone-app-icecast
with
15 additions
and
8 deletions
src/freedombone-app-icecast
+
15
−
8
View file @
945ca418
...
...
@@ -391,22 +391,23 @@ function backup_local_icecast {
if
[
!
-d
$ICECAST_DIR
]
;
then
return
fi
systemctl
stop
icecast
2
stop
_
icecast
cp
/etc/nginx/.icepasswd
$ICECAST_DIR
cp
/etc/ices2/ices-playlist.xml
$ICECAST_DIR
function_check backup_directory_to_usb
backup_directory_to_usb
$ICECAST_DIR
icecast
rm
$ICECAST_DIR
/.icepasswd
systemctl
start
icecast
2
start
_
icecast
}
function
restore_local_icecast
{
if
[
!
-d
$ICECAST_DIR
]
;
then
return
fi
systemctl
stop
icecast
2
stop
_
icecast
temp_restore_dir
=
/root/tempicecast
function_check restore_directory_from_usb
restore_directory_from_usb
$temp_restore_dir
icecast
...
...
@@ -417,9 +418,12 @@ function restore_local_icecast {
fi
cp
$ICECAST_DIR
/.icepasswd /etc/nginx/.icepasswd
rm
$ICECAST_DIR
/.icepasswd
cp
$ICECAST_DIR
/ices-playlist.xml /etc/ices2
rm
$ICECAST_DIR
/ices-playlist.xml
chown
-R
icecast2:icecast
$ICECAST_DIR
chown
-R
icecast2:icecast /etc/ices2
systemctl
start
icecast
2
start
_
icecast
rm
-rf
$temp_restore_dir
}
...
...
@@ -427,22 +431,23 @@ function backup_remote_icecast {
if
[
!
-d
$ICECAST_DIR
]
;
then
return
fi
systemctl
stop
icecast
2
stop
_
icecast
cp
/etc/nginx/.icepasswd
$ICECAST_DIR
cp
/etc/ices2/ices-playlist.xml
$ICECAST_DIR
function_check backup_directory_to_friend
backup_directory_to_friend
$ICECAST_DIR
icecast
rm
$ICECAST_DIR
/.icepasswd
systemctl
start
icecast
2
start
_
icecast
}
function
restore_remote_icecast
{
if
[
!
-d
$ICECAST_DIR
]
;
then
return
fi
systemctl
stop
icecast
2
stop
_
icecast
temp_restore_dir
=
/root/tempicecast
function_check restore_directory_from_friend
restore_directory_from_friend
$temp_restore_dir
icecast
...
...
@@ -453,9 +458,11 @@ function restore_remote_icecast {
fi
cp
$ICECAST_DIR
/.icepasswd /etc/nginx/.icepasswd
rm
$ICECAST_DIR
/.icepasswd
cp
$ICECAST_DIR
/ices-playlist.xml /etc/ices2
rm
$ICECAST_DIR
/ices-playlist.xml
chown
-R
icecast2:icecast
$ICECAST_DIR
systemctl
start
icecast
2
start
_
icecast
rm
-rf
$temp_restore_dir
}
...
...
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