blob: 13c690699809f5034e1b43e18eaeba6bc2878890 (
plain)
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
|
note() {
all_off="$(tput sgr0)"
bold="${all_off}$(tput bold)"
blue="${bold}$(tput setaf 4)"
yellow="${bold}$(tput setaf 3)"
echo "${blue}==>${yellow} NOTE:${bold} ${1}${all_off}"
}
post_install() {
note '****************************************************************************************'
note 'Default admin login is at localhost:8080/admin with user = admin and password = abc123.'
note 'It is highly recommended to change this from the default.'
note ''
note "Owncast's webroot (front-end) is /usr/share/webapps/owncast"
note ''
note "The backend service can be enabled (and started) by: systemctl enable --now start owncast"
note ''
note 'for production environments use a proper webserver for the front-end (ie. apache/nginx)'
note 'a sample nginx config file is at /usr/share/owncast/nginx.sample.conf'
note ''
note 'for documentation, visit https://owncast.online/docs/'
note '****************************************************************************************'
}
post_upgrade() {
post_install
}
pre_upgrade() {
#old files from 0.2.1 rel 2/3
if [ -d /usr/share/webapps/owncast/static ]; then
rm -rf /usr/share/webapps/owncast/static
fi
if [ -d /usr/share/webapps/owncast/web ]; then
rm -rf /usr/share/webapps/owncast/web
fi
}
post_remove() {
# Check if the /var/lib/owncast/web directory exists
if [ -d /usr/share/webapps/owncast ]; then
note 'automatically removing /usr/share/webapps/owncast files'
rm -rf /usr/share/webapps/owncast # remove some stray npm files
fi
if [ -d /var/lib/owncast ]; then
if [ -d /var/lib/owncast/.npm ]; then
note 'found and removing owncast .npm files '
rm -rf /var/lib/owncast/.npm # remove some stray npm files
fi
note 'owncast data still exists in /var/lib/owncast'
note 'to remove this, run: sudo rm -rf /var/lib/owncast '
fi
}
|