forked from cdelorme/system-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev
executable file
·80 lines (73 loc) · 2.54 KB
/
dev
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
#!/bin/bash
# requires root privileges
[ $(id -u) -ne 0 ] && echo "must be executed with root permissions..." && exit 1
# template
[ -z "$username" ] && username="banana"
[ -z "$password" ] && password="hammock"
[ -z "$dot_files" ] && dot_files="https://raw.githubusercontent.com/cdelorme/dot-files/master/install"
[ -z "$github_username" ] && github_username=$username
[ -z "$create_ssh" ] && create_ssh="y"
[ -z "$ssh_port" ] && ssh_port=22
[ -z "$system_hostname" ] && system_hostname="dev"
[ -z "$timezone" ] && timezone="US/Eastern"
[ -z "$jis" ] && jis="y"
[ -z "$cronfile" ] && cronfile="/var/spool/cron/crontabs/${username}"
[ -z "$remote_source" ] && remote_source="https://raw.githubusercontent.com/cdelorme/system-setup/develop/"
# web
[ -z "$install_processing_tools" ] && install_processing_tools="y"
[ -z "$install_mongodb" ] && install_mongodb="y"
[ -z "$public_mongodb" ] && public_mongodb="n"
[ -z "$install_mariadb" ] && install_mariadb="y"
[ -z "$public_mariadb" ] && public_mariadb="n"
[ -z "$install_phpfpm" ] && install_phpfpm="y"
[ -z "$public_phpfpm" ] && public_phpfpm="n"
[ -z "$install_msmtp" ] && install_msmtp="n"
[ -z "$msmtp_username" ] && msmtp_username="$username"
[ -z "$msmtp_password" ] && msmtp_password="$password"
# dev
[ -z "$install_mdadm" ] && install_mdadm="y"
[ -z "$install_samba" ] && install_samba="y"
[ -z "$install_weechat" ] && install_weechat="y"
[ -z "$install_wireless" ] && install_wireless="y"
[ -z "$install_transmission" ] && install_transmission="y"
[ -z "$install_openbox" ] && install_openbox="y"
[ -z "$install_compton" ] && install_compton="y"
[ -z "$install_web" ] && install_web="y"
# remote commands (would use curl, but base debian does not come with curl)
dl_cmd="wget --no-check-certificate -O"
source_cmd="wget --no-check-certificate -qO-"
# export & printenv
export username
export password
export dot_files
export github_username
export create_ssh
export ssh_port
export system_hostname
export timezone
export jis
export cronfile
export remote_source
export install_processing_tools
export install_mongodb
export public_mongodb
export install_mariadb
export public_mariadb
export install_phpfpm
export public_phpfpm
export install_msmtp
export msmtp_username
export msmtp_password
export install_mdadm
export install_samba
export install_weechat
export install_wireless
export install_transmission
export install_openbox
export install_compton
export install_web
export dl_cmd
export source_cmd
env
# begin execution
[ -f "scripts/dev.sh" ] && . "scripts/dev.sh" || eval "$($source_cmd ${remote_source}scripts/dev.sh)"