summarylogtreecommitdiffstats
path: root/octoprint.install
blob: 81f901c83335ba90e92cedbff835507a96d6d925 (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
post_install()
{
	systemd-sysusers

	mkdir -p /var/lib/octoprint
	chown -R octoprint:octoprint /var/lib/octoprint /usr/lib/octoprint/lib

	echo "To start octoprint, run: systemctl start octoprint"
	echo "To enable octoprint at boot, run: systemctl enable octoprint"
}

post_upgrade()
{
	systemctl daemon-reload
}

pre_remove()
{
	systemctl stop octoprint
	systemctl disable octoprint
}

post_remove()
{
	# cleanup
	rm -rf /usr/lib/octoprint
}