|
@@ -391,22 +391,23 @@ function backup_local_icecast {
|
391
|
391
|
if [ ! -d $ICECAST_DIR ]; then
|
392
|
392
|
return
|
393
|
393
|
fi
|
394
|
|
- systemctl stop icecast2
|
|
394
|
+ stop_icecast
|
395
|
395
|
|
396
|
396
|
cp /etc/nginx/.icepasswd $ICECAST_DIR
|
|
397
|
+ cp /etc/ices2/ices-playlist.xml $ICECAST_DIR
|
397
|
398
|
|
398
|
399
|
function_check backup_directory_to_usb
|
399
|
400
|
backup_directory_to_usb $ICECAST_DIR icecast
|
400
|
401
|
|
401
|
402
|
rm $ICECAST_DIR/.icepasswd
|
402
|
|
- systemctl start icecast2
|
|
403
|
+ start_icecast
|
403
|
404
|
}
|
404
|
405
|
|
405
|
406
|
function restore_local_icecast {
|
406
|
407
|
if [ ! -d $ICECAST_DIR ]; then
|
407
|
408
|
return
|
408
|
409
|
fi
|
409
|
|
- systemctl stop icecast2
|
|
410
|
+ stop_icecast
|
410
|
411
|
temp_restore_dir=/root/tempicecast
|
411
|
412
|
function_check restore_directory_from_usb
|
412
|
413
|
restore_directory_from_usb $temp_restore_dir icecast
|
|
@@ -417,9 +418,12 @@ function restore_local_icecast {
|
417
|
418
|
fi
|
418
|
419
|
cp $ICECAST_DIR/.icepasswd /etc/nginx/.icepasswd
|
419
|
420
|
rm $ICECAST_DIR/.icepasswd
|
|
421
|
+ cp $ICECAST_DIR/ices-playlist.xml /etc/ices2
|
|
422
|
+ rm $ICECAST_DIR/ices-playlist.xml
|
420
|
423
|
chown -R icecast2:icecast $ICECAST_DIR
|
|
424
|
+ chown -R icecast2:icecast /etc/ices2
|
421
|
425
|
|
422
|
|
- systemctl start icecast2
|
|
426
|
+ start_icecast
|
423
|
427
|
rm -rf $temp_restore_dir
|
424
|
428
|
}
|
425
|
429
|
|
|
@@ -427,22 +431,23 @@ function backup_remote_icecast {
|
427
|
431
|
if [ ! -d $ICECAST_DIR ]; then
|
428
|
432
|
return
|
429
|
433
|
fi
|
430
|
|
- systemctl stop icecast2
|
|
434
|
+ stop_icecast
|
431
|
435
|
|
432
|
436
|
cp /etc/nginx/.icepasswd $ICECAST_DIR
|
|
437
|
+ cp /etc/ices2/ices-playlist.xml $ICECAST_DIR
|
433
|
438
|
|
434
|
439
|
function_check backup_directory_to_friend
|
435
|
440
|
backup_directory_to_friend $ICECAST_DIR icecast
|
436
|
441
|
|
437
|
442
|
rm $ICECAST_DIR/.icepasswd
|
438
|
|
- systemctl start icecast2
|
|
443
|
+ start_icecast
|
439
|
444
|
}
|
440
|
445
|
|
441
|
446
|
function restore_remote_icecast {
|
442
|
447
|
if [ ! -d $ICECAST_DIR ]; then
|
443
|
448
|
return
|
444
|
449
|
fi
|
445
|
|
- systemctl stop icecast2
|
|
450
|
+ stop_icecast
|
446
|
451
|
temp_restore_dir=/root/tempicecast
|
447
|
452
|
function_check restore_directory_from_friend
|
448
|
453
|
restore_directory_from_friend $temp_restore_dir icecast
|
|
@@ -453,9 +458,11 @@ function restore_remote_icecast {
|
453
|
458
|
fi
|
454
|
459
|
cp $ICECAST_DIR/.icepasswd /etc/nginx/.icepasswd
|
455
|
460
|
rm $ICECAST_DIR/.icepasswd
|
|
461
|
+ cp $ICECAST_DIR/ices-playlist.xml /etc/ices2
|
|
462
|
+ rm $ICECAST_DIR/ices-playlist.xml
|
456
|
463
|
chown -R icecast2:icecast $ICECAST_DIR
|
457
|
464
|
|
458
|
|
- systemctl start icecast2
|
|
465
|
+ start_icecast
|
459
|
466
|
rm -rf $temp_restore_dir
|
460
|
467
|
}
|
461
|
468
|
|