summarylogtreecommitdiffstats
path: root/FcronQ.install
blob: 28dd988494296eca08842c23be4a14979305ae74 (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
# FcronQ: Installer: Arch
# Contributor: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>

post_install() {
	# Change file permissions
	chmod 777 /usr/share/FcronQ/Source/
	chmod 644 /etc/fcron/fcron.conf

	# Remove old files
	user_remove

	#/bin/true
}

post_upgrade() {
	post_install
	#/bin/true
}

pre_remove() {
	/bin/true
}

user_remove() {
	# User
	if [ ${USER} ]; then
		export USER=${LOGNAME}
	fi

	# Home
	if [ ${SUDO_USER} ]; then
		export HOME=/home/${SUDO_USER}
	else
		export HOME=/home/${USER}
	fi
}

post_remove() {
	rm -rf /usr/share/FcronQ/

	user_remove

	#/bin/true
}

op=$1
shift

$op "$@"