forked from Mar2zz/LaSi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LaSi.sh
executable file
·80 lines (77 loc) · 2.43 KB
/
LaSi.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
#!/usr/bin/env bash
# Author: Mar2zz
# Email: [email protected]
# 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:
# |
# | - Auto-Sub
# | - Beets
# | - CouchPotato
# | - Headphones
# | - SABnzbd+
# | - Sickbeard
# | - Subliminal
# | - Spotweb
# | - Transmission
# | - XBMC
# |___________________________________________________________________________________
#
#######################################################################################
#######################################################################################
# Debian based
if which apt-get > /dev/null; then
wget -q -O /tmp/LaSi_Deb.sh http://dl.dropbox.com/u/18712538/LaSi/LaSi_Deb.sh || { echo "Connection to dropbox failed, try again later"; exit 1; }
sudo chmod +x /tmp/LaSi_Deb.sh &&
/tmp/./LaSi_Deb.sh
# Synology
elif which ipkg; then
wget -nv -O /tmp/LaSi_syn.sh http://dl.dropbox.com/u/18712538/LaSi/LaSi_syn.sh || { echo "Connection to dropbox failed, try again later"; exit 1; }
sudo chmod +x LaSi_syn.sh &&
/tmp/./LaSi_syn.sh
# FreeBSD based
elif [ "`uname`" = "FreeBSD" ]; then
# Check if user can sudo
if [ "$(id -u)" != "0" ]; then
# ZFSguru SSH user can't sudo, need to su
if [ "`whoami`" = "ssh" ];then
clear
echo "Now going to SU"
echo "You need to run LaSi.sh again"
sleep 2
su
else
echo "Provide sudo password to continue with this installation..."
if [ "$(sudo id -u)" != "0" ]; then
clear
echo
echo "The current user can't sudo,"
echo
echo "this installer needs to sudo to install applications"
echo "You need to perform this command: "EDITOR=ee visudo""
echo "and uncomment the following line: %wheel ALL=(ALL) ALL"
echo
sleep 2
exit
fi
fi
elif ! ls /tmp/LaSi > /dev/null; then
sudo mkdir /tmp/LaSi
fi
cd /tmp/LaSi
fetch http://dl.dropbox.com/u/36835219/LaSi/LaSi_BSD.sh || { echo "Connection to dropbox failed, try again later"; exit 1; }
sudo chmod +x /tmp/LaSi/LaSi_BSD.sh
/tmp/LaSi/./LaSi_BSD.sh
fi