diff options
author | Jake | 2017-01-15 13:45:20 +0100 |
---|---|---|
committer | Jake | 2017-01-15 13:45:20 +0100 |
commit | 552f8e98d74f520ca7018dcbee27d2b17739dc76 (patch) | |
tree | 8fb2cacd254719cb8218ab75162e97f4847f347f /octoprint.install | |
download | aur-552f8e98d74f520ca7018dcbee27d2b17739dc76.tar.gz |
Initial import
Diffstat (limited to 'octoprint.install')
-rwxr-xr-x | octoprint.install | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/octoprint.install b/octoprint.install new file mode 100755 index 000000000000..cdb6d888c8b7 --- /dev/null +++ b/octoprint.install @@ -0,0 +1,22 @@ +post_install() { + local HOMEDIR=/var/lib/octoprint + getent group octoprint > /dev/null || groupadd octoprint + getent passwd octoprint > /dev/null || useradd -d $HOMEDIR -g octoprint -s /usr/bin/nologin octoprint + usermod -a -G octoprint,network,uucp,tty octoprint + mkdir -p $HOMEDIR + chmod 700 $HOMEDIR + chown -R octoprint:octoprint $HOMEDIR + + echo "To start octoprint, run: systemctl start octoprint" + echo "To enable octoprint at boot, run: systemctl enable octoprint" +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + echo "To stop octoprint, run: systemctl stop octoprint" + echo "To disable octoprint at boot, run: systemctl disable octoprint" + echo "You may want to remove octoprint user and group" +} |