summaryrefslogtreecommitdiff
path: root/community/mythtv/mythtv.install
blob: 90ad79d28c57575d5e6774ac43c743707c76554b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
post_upgrade() {
	if ! getent passwd mythtv &>/dev/null; then
		getent group mythtv &>/dev/null || groupadd -r mythtv >/dev/null
		useradd -rmd /var/lib/mythtv -g mythtv -G video,audio,optical -s /bin/bash mythtv >/dev/null
	fi

	echo -e "You may need to load time zone tables in MySQL.\nSee http://www.mythtv.org/wiki/MySQL_Time_Zone_Tables"
}

post_install() {
	echo -e "For installation information, visit:\nhttps://wiki.archlinux.org/index.php/MythTV"

	post_upgrade
}

post_remove() {
	echo -e "The MythTV database was not removed. To remove it, run:\n  mysql -u root -e 'drop database mythconverg;'"
	[ -d var/lib/mythtv ] && echo "The MythTV home directory /var/lib/mythtv can also be removed."

	getent passwd mythtv &>/dev/null && userdel mythtv >/dev/null
	getent group mythtv &>/dev/null && groupdel mythtv >/dev/null
}