diff --git a/.github/workflows/mus-fuse.install b/.github/workflows/mus-fuse.install new file mode 100644 index 0000000..22c7c38 --- /dev/null +++ b/.github/workflows/mus-fuse.install @@ -0,0 +1,13 @@ +#!/bin/sh + +post_install() { + + if systemctl | grep -Fq 'mus-fuse'; then + sudo systemctl stop mus-fuse.service + fi + + sudo useradd --system --user-group --no-create-home --home-dir /run/mus-fuse mus-fuse + mkdir -p /srv/mus-fuse + chown mus-fuse:mus-fuse /srv/mus-fuse + echo ":: You need to uncomment 'user_allow_other' in /etc/fuse.conf" +} diff --git a/debian/preinst b/debian/preinst index 22c7c38..2bec704 100755 --- a/debian/preinst +++ b/debian/preinst @@ -1,13 +1,10 @@ -#!/bin/sh +#!/bin/bash -post_install() { +if systemctl | grep -Fq 'mus-fuse'; then + sudo systemctl stop mus-fuse.service +fi - if systemctl | grep -Fq 'mus-fuse'; then - sudo systemctl stop mus-fuse.service - fi +adduser --quiet --system --group --no-create-home --home /run/mus-fuse mus-fuse +mkdir -p /srv/mus-fuse +chown mus-fuse:mus-fuse /srv/mus-fuse - sudo useradd --system --user-group --no-create-home --home-dir /run/mus-fuse mus-fuse - mkdir -p /srv/mus-fuse - chown mus-fuse:mus-fuse /srv/mus-fuse - echo ":: You need to uncomment 'user_allow_other' in /etc/fuse.conf" -}