-
Notifications
You must be signed in to change notification settings - Fork 8
/
LaSi_Deb.sh
executable file
·1799 lines (1514 loc) · 57.3 KB
/
LaSi_Deb.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env bash
# Author: Mar2zz
# Email: lasi.mar2zz@gmail.com
# Blogs: mar2zz.tweakblogs.net
# License: GNU GPL v3
#
# This is the main script of "Lazy Admins Scripted Installers (LaSi)"
#
# please report bugs/issues @
# https://github.com/Mar2zz/LaSi/issues
# ___________________________________________________________________________________
# |
# | execute this script with the command: sudo chmod +x LaSi.sh
# | then run with ./LaSi.sh
# | # Or ./LaSi.sh hourly|daily|weekly|monthly to set cronjobs for updating on the fly
# |
# | LaSi will install the programs you choose
# | from the menu:
# | # Beets
# | # Sickbeard
# | # CouchPotato (V2)
# | # Subliminal
# | # AlbumIdentify
# | # Spotweb
# | # Headphones
# | # Transmission
# | # XBMC
# |___________________________________________________________________________________
#
# Tested succesful on OS's:
# Ubuntu 9.10 and higher and XBMC Live Dharma
# 32bit and 64bit OS compatible
#
#######################################################################################
#######################################################################################
#### v1.9 ####
#######################################################################################
#################### LIST OF VARIABLES USED ###########################################
DROPBOX=http://dl.dropbox.com/u/18712538/ # dropbox-adres
#######################################################################################
#######################################################################################
#######################################################################################
### ERROR HANDLING ####
error_Depends () {
# solve dependency problems
echo
echo "Solving dependencys..."
sudo apt-get -fy install || error_Msg
echo
}
error_Msg () {
# show error message
echo "
Failed! Installing $set_app didn't finish, try again or:
Copy the text above and report an issue at the following address:
https://github.com/Mar2zz/LaSi/issues
"
# log error message
echo "
Failed! Installing $set_app had errors, try again or:
Copy the text with errors above and report an issue at the following address:
https://github.com/Mar2zz/LaSi/issues
" >> /tmp/lasi_install.log
# for fast install continue in next item, else quit installer
if [ "${#items[@]}" > 1 ]; then continue; else break; fi
}
### BEST PRACTICE ###
check_Apt () {
# check if distro with apt is used
if ! which apt-get > /dev/null; then
echo "This installer is written for Debian-based distro's using Apt"
exit
fi
}
update_Apt () {
# update sources list and tell script its done
if [ -e "/tmp/lasi_apt_update.log" ]; then
today=$(date +%Y-%m-%d)
yatod=$(cat /tmp/lasi_apt_update.log)
if [ "$today" = "$yatod" ]; then
echo
echo "Packagelist is up to date"
update_apt=1
else
echo
echo "Checking for newest packages..."
echo $(date +%Y-%m-%d) > /tmp/lasi_apt_update.log
sudo apt-get update > /dev/null
update_apt=1
fi
else
echo
echo "Checking for newest packages..."
echo $(date +%Y-%m-%d) > /tmp/lasi_apt_update.log
sudo apt-get update > /dev/null
update_apt=1
fi
}
check_PPA () {
if ! which apt-add-repository > /dev/null; then
echo "Installing python-software-properties to install ppa's"
sudo apt-get install -y python-software-properties || { echo "Need this to install $set_app, exiting ..." && exit; }
fi
}
check_Git () {
# install git for benefits like updating from commandline
if ! which git > /dev/null; then
sudo apt-get -y install git || { sudo apt-get install -y git-core || error_Msg; }
fi
}
check_Pip () {
if ! which pip > /dev/null; then
sudo apt-get -y install python-pip || check_Easy
pip='pip install'
else
pip='pip install'
fi
}
check_Easy () {
if ! which easy_install > /dev/null; then
sudo apt-get -y install python-setuptools || error_Msg
pip='easy_install'
else
pip='easy_install'
fi
}
check_Deb () {
# remove any existing .deb files in tmp
rm -f /tmp/*.deb
}
check_Log () {
# remove any previous lasi_install logs
rm -f /tmp/lasi_install.log
}
check_Port () {
#check if ports are in use before starting
if lsof -i tcp@0.0.0.0:$set_port > /dev/null; then
# ask if user want's to set another port
echo
echo "$set_app runs on http://$HOSTNAME:$set_port by default,"
echo "but that is in use allready."
echo "Trying other ports to run on..."
# starting a +100 loop to find next availabe port
while lsof -i tcp@0.0.0.0:$set_port > /dev/null; do
set_port=$(($set_port +100))
done
# new port found, now set it
echo "$set_port is free, $set_app wil be set to use it."
# uncapitalize programname
set_app_lower=$(echo $set_app | tr '[A-Z]' '[a-z]')
# edit configfile to set new port
sudo sed -i "
/=/s/PORT.*/PORT=$set_port/
" /etc/default/$set_app_lower
echo "Port $set_port is set in /etc/default/$set_app_lower..."
echo "This will always override ports set in config.ini or webinterface!"
fi
}
check_Apache () {
if ! which apache2 > /dev/null; then
echo "$set_app needs a webserver by default."
echo "Do you want to install an apache-webserver too?"
echo "If not, I will assume you have your own webserver enabled"
read -p "[yes/no]: " SERVERREPLY
case $SERVERREPLY in
[YyJj]*)
APACHE=1
SERVERPATH=/var/www
;;
[Nn]*)
echo "Skipping apacheserver install"
APACHE=0
SERVERPATH=0
echo "Type the path where your webroot is located, e.g.: /var/www"
while ! [ -d $SERVERPATH ]; do
read -p "PATH: " SERVERPATH
[ -d $SERVERPATH ] || echo "Path does not exist, try again"
done
;;
*)
echo "Answer yes or no"
cf_SQL
;;
esac
else
APACHE=1
SERVERPATH=/var/www
fi
}
### HELP MESSAGE ###
Print_Help () {
echo '
usage: ./LaSi.sh --options
OPTIONS:
--fast | -f : install unattended (no info shown and no confirmations needed)
(note: Beets, Spotweb and XBMC can ask questions)
--purge | -p : instead of removing an application purge it. Purge also
removes the daemon and deamon-settingsfile and cronjobs if set.
--cronjob=value : value can be ask|hourly|daily|weekly|monthly
ask; for every installed app ask how often to check for updates
hourly|daily|weekly|monthly; set cronjobs unattended during install
to check for updates hourly|daily|weekly|monthly
--help | -h : Print this helpmessage'
exit
}
### CHECK COMMANDLINE STUFF ###
# set defaults
unattended=0
ask_schedule=0
schedule=0
uninstaller=remove
# create array
options=( $@ )
check_Variables () {
# check if input is correct and set them
for option in ${options[@]}; do
case $option in
--help|-h)
Print_Help
;;
--fast|-f)
unattended=1
;;
--purge|-p)
uninstaller=purge
;;
--cronjob*)
crontime=$(echo $option | sed 's/--cronjob=//')
case $crontime in
ask)
ask_schedule=1 ;;
hourly)
schedule=hourly ;;
daily)
schedule=daily ;;
weekly)
schedule=weekly ;;
monthly)
schedule=monthly ;;
*)
echo "Incorrect value: echo $schedule."
Print_Help
;;
esac
;;
*)
echo "Incorrect value: $option"
Print_Help
;;
esac
done
}
### PRESENT MENU ###
LaSi_Menu (){
clear
echo "Lazy admin Scripted installers ------------------------"
echo " ___ ___ "
echo " /\ \ /\__\ "
echo " /::\ \ /:/ _/_ ___ "
echo " /:/\:\ \ /:/ /\ \ /\__\ "
echo " ___ ___ /:/ /::\ \ /:/ /::\ \ /:/__/ "
echo " /\ \ /\__\ /:/_/:/\:\__\ /:/_/:/\:\__\ /::\ \ "
echo " \:\ \ /:/ / \:\/:/ \/__/ \:\/:/ /:/ / \/\:\ \__ "
echo " \:\ /:/ / \::/__/ \::/ /:/ / \:\/\__\ "
echo " \:\/:/ / \:\ \ \/_/:/ / \::/ / "
echo " \::/ / \:\__\ /:/ / /:/ / "
echo " \/__/ \/__/ \/__/ \/__/ "
echo
echo "------------------------------------------------ Mar2zz"
show_Menu () {
echo "Make a choice to see info or install these apps..."
echo "1. Beets 6. SickBeard"
echo "2. CouchPotato (V2) 7. Spotweb"
echo "3. Headphones 8. Subliminal"
echo "4. Maraschino 9. Tranmission"
echo "5. Sabnzbdplus 10. XBMC (desktop)"
echo
# tell about commandline options
if [ $unattended != 0 ]; then
echo "Unattended installation enabled"
else
echo "Tip: Type LaSi.sh --help for more install options!"
fi
if [ $ask_schedule = 1 ]; then
echo "Cronjobs set to 'ask'."
elif [ $schedule != 0 ]; then
echo "Cronjobs set to $schedule."
fi
echo
echo "Q. Quit"
read SELECT
# create array
items=( $SELECT )
# go through array one by one
for item in ${items[@]}; do
# first check if sources need an update
if [ $unattended = 1 ]; then [ $update_apt = 1 ] || update_Apt; fi
case "$item" in
# beets
1)
set_app=Beets
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
if [ $ask_schedule = 1 ]; then cf_Cronjob; elif [ $schedule != 0 ]; then set_Cronjob; fi
;;
# couchpotato
2)
set_app=CouchPotato
set_port=5000
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
if [ $ask_schedule = 1 ]; then cf_Cronjob; elif [ $schedule != 0 ]; then set_Cronjob; fi
;;
# headphones
3)
set_app=Headphones
set_port=8181
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
if [ $ask_schedule = 1 ]; then cf_Cronjob; elif [ $schedule != 0 ]; then set_Cronjob; fi
;;
# lazylibrarian
ll)
set_app=LazyLibrarian
set_port=5299
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
if [ $ask_schedule = 1 ]; then cf_Cronjob; elif [ $schedule != 0 ]; then set_Cronjob; fi
;;
# mediafrontpage
mfp)
set_app=Mediafrontpage
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
if [ $ask_schedule = 1 ]; then cf_Cronjob; elif [ $schedule != 0 ]; then set_Cronjob; fi
;;
# maraschino
4)
set_app=Maraschino
set_port=7000
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
if [ $ask_schedule = 1 ]; then cf_Cronjob; elif [ $schedule != 0 ]; then set_Cronjob; fi
;;
# sabnzbdplus
5)
set_app=Sabnzbdplus
set_port=8080
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
;;
# sickbeard
6)
set_app=SickBeard
set_port=8081
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
if [ $ask_schedule = 1 ]; then cf_Cronjob; elif [ $schedule != 0 ]; then set_Cronjob; fi
;;
# spotweb
7)
set_app=Spotweb
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
if [ $ask_schedule = 1 ]; then cf_Cronjob; elif [ $schedule != 0 ]; then set_Cronjob; fi
;;
# subliminal
8)
set_app=Subliminal
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
if [ $ask_schedule = 1 ]; then cf_Cronjob; elif [ $schedule != 0 ]; then set_Cronjob; fi
;;
# transmission
9)
set_app=Transmission
set_port=9091
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
;;
# xbmc
10)
set_app=XBMC
if [ $unattended = 1 ]; then Install_$set_app; else Info_$set_app; fi
;;
[Qq]) exit ;;
*)
echo "Please make a selection (e.g. 1)"
echo "Or select multiple (e.g. 1 4 5 7 10)"
show_Menu
;;
esac
done
# see if install summary is needed, so count items in array
if [ ${#items[@]} -gt 1 ]; then
echo "*###############################################################*"
echo "*################### INSTALL SUMMARY ###########################*"
cat /tmp/lasi_install.log
echo "*###############################################################*"
fi
# give time to read output from above installprocess before returning to menu
echo
read -sn 1 -p "Press a key to continue"
LaSi_Menu
}
show_Menu
}
###############
#### BEETS ####
###############
Info_Beets () {
clear
echo "
*###############################################################*
*################### BEETS #####################################*
# #
# Beets is the media library management system for #
# obsessive-compulsive music geeks. #
# #
# The purpose of beets is to get your music collection right #
# once and for all. It catalogs your collection, automatically #
# improving its metadata as it goes using the MusicBrainz #
# database. It then provides a bouquet of tools for #
# manipulating and accessing your music. #
# #
*###############################################################*
# #
# Beets is written by Adrian Sampson.. #
# #
# Visit http://beets.radbox.org/ #
*###############################################################*"
cf_Choice
}
Install_Beets () {
check_Pip
sudo $pip beets || error_Msg
sudo $pip rgain || echo "Fail!"
# Enable replaygain which is healthy for ears and speakers (TEMP DISABLED)
if ! [ -d $HOME/.beets/plugins ]; then
mkdir -p $HOME/.beets/plugins || echo "Fail, could not create $HOME/.beets/plugins!"
# git clone https://github.com/Lugoues/beets-replaygain.git $HOME/.beets/plugins/replaygain || echo "git clone for replaygain failed, install manual" commented because it doesn't work
fi
# create a configfile and databasefile
if ! [ -e $HOME/.beetsconfig ]; then
echo "[beets]
library: $HOME/.beets/musiclibrary.blb
directory: $HOME/Music
import_copy: yes
import_delete: yes
import_write: yes
import_resume: no
import_art: yes
import_quiet_fallback: skip
import_timid: no
import_log: $HOME/.beets/beetslog.txt
art_filename: folder
pluginpath: $HOME/.beets/plugins/
plugins:
threaded: yes
color: yes
[paths]
default: \$albumartist/\$album (\$year)/\$track. \$artist - \$title
soundtrack: Soundtracks/\$album/\$track. \$artist - \$title
comp: Various \$genre/\$album (\$year)/\$track. \$artist - \$title
[replaygain]
reference_loundess: 89
mp3_format: mp3gain " > $HOME/.beetsconfig
sed -i 's/^[ \t]*//' $HOME/.beetsconfig
echo
echo "Now set your defaults in Beets config"
read -sn 1 -p "Press a key to continue"
editor $HOME/.beetsconfig
fi
Summ_$set_app
Summ_$set_app >> /tmp/lasi_install.log
}
Summ_Beets () {
echo "
Done! Installed $set_app.
Type beet --help for options
or start importing with beet import /path/to/new_music
"
}
#####################
#### COUCHPOTATO ####
#####################
Info_CouchPotato () {
clear
echo "
*###############################################################*
*###################### COUCHPOTATO ############################*
# #
# CouchPotato is an automatic NZB and torrent downloader. #
# You can keep a 'movies I want'-list and it will search #
# for NZBs/torrents of these movies every X hours. #
# #
# Once a movie is found, it will send it to SABnzbd #
# or download the .nzb or .torrent to a specified directory. #
# #
*###############################################################*
# #
# CouchPotato is written by Ruud Burger in his spare time... #
# ..so buy him a coke to support him. #
# #
# Visit http://www.couchpotatoapp.com #
*###############################################################*"
cf_Choice
}
Install_CouchPotato () {
# ask which source to use
Question () {
echo "Choose a version to install"
echo "1. CouchPotato"
echo "2. CouchPotato V2"
read -p ": " VERSION
check_Git
case $VERSION in
1*)
set_app_version=couchpotato
;;
2*)
set_app_version=couchpotatov2
set_port=5050
;;
*)
echo "Answer 1 or 2"
Question
;;
esac
}
Question
wget -nv -O /tmp/$set_app_version.deb $DROPBOX/LaSi_Repo/$set_app_version.deb || { echo "Connection to dropbox failed, try again later"; exit 1; }
sudo dpkg -i /tmp/$set_app_version.deb || error_Depends
if ! pgrep -f CouchPotato.py > /dev/null; then
#check_Port
sudo sed -i "
s/ENABLE_DAEMON=0/ENABLE_DAEMON=1/g
s/RUN_AS.*/RUN_AS=$USER/
s/WEB_UPDATE=0/WEB_UPDATE=1/g
" /etc/default/$set_app_version
echo "Changed daemon settings..."
sudo /etc/init.d/$set_app_version start || error_Msg
fi
Summ_$set_app
Summ_$set_app >> /tmp/lasi_install.log
}
Summ_CouchPotato () {
echo "
Done! Installed $set_app.
Type couchpotato --help for options.
CouchPotato is by default located @ http://$HOSTNAME:$set_port
"
}
####################
#### HEADPHONES ####
####################
Info_Headphones () {
clear
echo "
*###############################################################*
*###################### HEADPHONES #############################*
# #
# Headphones is an automatic NZB downloader. #
# You can keep a 'musicalbums I want'-list and it will search #
# for NZBs of these albums every X hours. #
# #
# It is also possible to 'follow' artists for upcoming albums. #
# #
# Once an album is found, it will send it to SABnzbd. #
# #
*###############################################################*
# #
# Headphones is written by Rembo10 in his spare time... #
# #
# Visit https://github.com/rembo10/headphones #
*###############################################################*"
cf_Choice
}
Install_Headphones () {
check_Git
wget -nv -O /tmp/headphones.deb $DROPBOX/LaSi_Repo/headphones.deb || { echo "Connection to dropbox failed, try again later"; exit 1; }
sudo dpkg -i /tmp/headphones.deb || error_Depends
if ! pgrep -f Headphones.py > /dev/null; then
#check_Port
sudo sed -i "
s/ENABLE_DAEMON=0/ENABLE_DAEMON=1/g
s/RUN_AS.*/RUN_AS=$USER/
s/WEB_UPDATE=0/WEB_UPDATE=1/g
" /etc/default/headphones
echo "Changed daemon settings..."
sudo /etc/init.d/headphones start || error_Msg
fi
Summ_$set_app
Summ_$set_app >> /tmp/lasi_install.log
}
Summ_Headphones () {
echo "
Done! Installed $set_app.
Type headphones --help for options
Headphones is by default located @ http://$HOSTNAME:$set_port
"
}
#########################
##### LazyLibrarian #####
#########################
Info_LazyLibrarian () {
clear
echo "
*###############################################################*
*#################### LazyLibrarian ############################*
# #
# LazyLibrarian is an automatic NZB downloader. #
# You can keep a 'Authors/Books I like to read'-list and it will#
# search for NZBs of these books #
# #
# Once an book is found, it will send it to SABnzbd and when #
# a download is finished it wil process it and add cover and #
# metadata to it. #
# #
*###############################################################*
# #
# LazyLibrarian is written by Mar2zz in his spare time... #
# #
# Visit https://github.com/Mar2zz/LazyLibrarian #
*###############################################################*"
cf_Choice
}
Install_LazyLibrarian () {
check_git
wget -nv -O /tmp/lazylibrarian.deb $DROPBOX/LaSi_Repo/lazylibrarian.deb || { echo "Connection to dropbox failed, try again later"; exit 1; }
sudo dpkg -i /tmp/lazylibrarian.deb || error_Depends
if ! pgrep -f LazyLibrarian.py > /dev/null; then
#check_Port
sudo sed -i "
s/ENABLE_DAEMON=0/ENABLE_DAEMON=1/g
s/RUN_AS.*/RUN_AS=$USER/
s/WEB_UPDATE=0/WEB_UPDATE=1/g
" /etc/default/lazylibrarian
echo "Changed daemon settings..."
sudo /etc/init.d/lazylibrarian start || error_Msg
fi
Summ_$SETAPP
Summ_$SETAPP >> /tmp/LaSi/lasi_install.log
}
Summ_LazyLibrarian () {
clear
echo
echo "
Done! Installed $SETAPP.
LazyLibrarian is by default located @ http://$HOSTNAME:$set_port
"
}
####################
#### MARASCHINO ####
####################
Info_Maraschino () {
clear
echo "
*###############################################################*
*###################### MARASCHINO #############################*
# #
# Maraschino is a webpage that overviews a XBMC-mediacenter #
# and serverapplications like Sabnzbd, Sickbeard and others. #
# #
# Some of it's features are: #
# - Customizable applications module with: #
# - recently added media #
# - Currently playing bar #
# - Sabnzbd module #
# - SickBeard coming episodes #
# - Trakt.tv recommendations #
# - Diskspace info #
# #
*###############################################################*
# #
# Maraschino is written by Mr. Kipling and others #
# #
# Visit http://www.maraschinoproject.com/ #
*###############################################################*"
cf_Choice
}
Install_Maraschino () {
check_Git
wget -nv -O /tmp/maraschino.deb $DROPBOX/LaSi_Repo/maraschino.deb || { echo "Connection to dropbox failed, try again later"; exit 1; }
sudo dpkg -i /tmp/maraschino.deb || error_Depends
if ! pgrep -f "Maraschino.py" > /dev/null; then
sudo sed -i "
s/ENABLE_DAEMON=0/ENABLE_DAEMON=1/g
s/RUN_AS.*/RUN_AS=$USER/
s/WEB_UPDATE=0/WEB_UPDATE=1/g
" /etc/default/maraschino
echo "Changed daemon settings..."
sudo /etc/init.d/maraschino start || error_Msg
fi
Summ_$set_app
Summ_$set_app >> /tmp/lasi_install.log
}
Summ_Maraschino () {
echo "
Done! Installed $set_app.
$set_app is by default located @ http://$HOSTNAME:$set_port
"
}
########################
#### MEDIAFRONTPAGE ####
########################
Info_Mediafrontpage () {
clear
echo "
*###############################################################*
*###################### MEDIAFRONTPAGE #########################*
# #
# MediaFrontPage is a HTPC Web Program Organiser. Your HTPC #
# utilises a number of different programs to do certain tasks. #
# What MediaFrontPage does is creates a user specific web page #
# that will be your nerve centre for everything you will need. #
# #
*###############################################################*
# #
# Mediafrontpage is written by Nick8888 and others #
# #
# Visit https://github.com/Mediafrontpage/mediafrontpage #
*###############################################################*"
cf_Choice
}
Install_Mediafrontpage () {
check_Git
wget -nv -O /tmp/mediafrontpage.deb $DROPBOX/LaSi_Repo/mediafrontpage.deb || { echo "Connection to dropbox failed, try again later"; exit 1; }
sudo dpkg -i /tmp/mediafrontpage.deb || error_Depends
Summ_$set_app
Summ_$set_app >> /tmp/lasi_install.log
}
Summ_Mediafrontpage () {
echo "
Done! Installed $set_app.
Mediafrontpage is now located @ http://$HOSTNAME/mediafrontpage
"
}
#####################
#### SABNZBDPLUS ####
#####################
Info_Sabnzbdplus () {
clear
echo "
*###############################################################*
*###################### SABNZBDPLUS ############################*
# #
# SABnzbd is an Open Source Binary Newsreader written in Python.#
# #
# It's totally free, incredibly easy to use, and works #
# practically everywhere. #
# #
# SABnzbd makes Usenet as simple and streamlined as possible by #
# automating everything we can. All you have to do is add an #
# nzb.file and SABnzbd takes over from there, where it will be #
# automatically downloaded, verified, repaired, extracted and #
# filed away with zero human interaction. #
# #
*###############################################################*
# #
# Sabnzbdplus is written by the Sabnzbd-team #
# #
# Visit http://sabnzbd.org #
*###############################################################*"
cf_Choice
}
Install_Sabnzbdplus () {
# check if python-software-properties is installed (not by default on minimal servers)
check_PPA
# Check if ppa is used as a source
if ! ls /etc/apt/sources.list.d/jcfp-ppa* > /dev/null; then
sudo add-apt-repository ppa:jcfp/ppa
fi
# Update list, install and configure
echo "Checking for newest version..."
sudo apt-get update > /dev/null
sudo apt-get -y install sabnzbdplus || error_Depends
if ! pgrep -f /usr/bin/sabnzbplus > /dev/null; then
#check_Port
sudo sed -i "
/=/s/USER.*/USER=$USER/
/=/s/HOST.*/HOST=0.0.0.0/
" /etc/default/sabnzbdplus
echo "Changed daemon settings..."
sudo /etc/init.d/sabnzbdplus start || error_Msg
fi
Summ_$set_app
Summ_$set_app >> /tmp/lasi_install.log
}
Summ_Sabnzbdplus () {
echo "
Done! Installed $set_app.
Type sabnzbdplus --help for options
Sabnzbdplus is by default located @ http://$HOSTNAME:$set_port
"
}
###################
#### SICKBEARD ####
###################
Info_SickBeard () {
clear
echo "
*###############################################################*
*####################### SICKBEARD #############################*
# #
# Sick Beard is a PVR for newsgroup and torrent users. It #
# watches for new episodes of your favorite shows and when they #
# are posted it downloads them, sorts and renames them, and #
# optionally generates metadata for them. #
# #
# Features include: #
# - automatically retrieves new episode torrent or nzb files #
# - can scan your existing library and then download any #
# old seasons or episodes you're missing #
# - can watch for better versions and upgrade your existing #
# episodes (from TV to DVD/BluRay for example) #
# #
*###############################################################*
# #
# SickBeard is written by midgetspy #
# #
# Visit http://www.sickbeard.com #
*###############################################################*"
cf_Choice
}
Install_SickBeard () {
check_Git
wget -nv -O /tmp/sickbeard.deb $DROPBOX/LaSi_Repo/sickbeard.deb || { echo "Connection to dropbox failed, try again later"; exit 1; }
sudo dpkg -i /tmp/sickbeard.deb || error_Depends
if ! pgrep -f SickBeard.py > /dev/null; then
#check_Port
sudo sed -i "
s/ENABLE_DAEMON=0/ENABLE_DAEMON=1/g
s/RUN_AS.*/RUN_AS=$USER/
s/WEB_UPDATE=0/WEB_UPDATE=1/g
" /etc/default/sickbeard
echo "Changed daemon settings..."
sudo /etc/init.d/sickbeard start || error_Msg
fi
Summ_$set_app
Summ_$set_app >> /tmp/lasi_install.log
}
Summ_SickBeard () {
echo "
Done! Installed $set_app
Type sickbeard --help for options
SickBeard is by default located @ http://$HOSTNAME:$set_port
"
}
#################
#### SPOTWEB ####
#################
Info_Spotweb () {
clear
echo "