blob: 2e8bd48982b1f31ccc130d23c96e5791e022e001 (
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
|
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/web"
note ''
note "The backend service can be enabled (and started) by: systemctl enable --now start owncast"
note ''
note "The frontend will need to be built by running: "
note ' $ sudo chown -R owncast:owncast /usr/share/webapps/owncast'
note ' $ sudo -u owncast /usr/share/webapps/owncast/bundleWeb.sh'
note ''
note 'You can test the front-end by running: '
note ' $ sudo -u owncast npm run dev --prefix /usr/share/webapps/owncast/web'
note ''
note 'for production environments use a proper webserver for the front-end (ie. apache/nginx)'
note ''
note 'for documentation, visit https://owncast.online/docs/'
note '****************************************************************************************'
}
post_upgrade() {
post_install
}
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
}
|