# Dietpi-services mask failed

**URL:** https://dietpi.com/forum/t/dietpi-services-mask-failed/3778
**Category:** Troubleshooting
**Created:** [21 January 2020 03:56 UTC](https://dietpi.com/forum/t/dietpi-services-mask-failed/3778 "2020-01-21T03:56:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![aquliu](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/d2c977/32.png) [@aquliu](https://dietpi.com/forum/u/aquliu)
#### Post date: [21 January 2020 03:56 UTC](https://dietpi.com/forum/t/dietpi-services-mask-failed/3778/1 "2020-01-21T03:56:08Z")

</div>

I’m trying to mask/disable motioneye and gitea through dietpi-services mask motioneye/gitea because I needn’t it start at boot. But it failed.  
The other apps such as proftpd works well when I used dietpi-services mask proftpd.  
Is there anyting wrong with the gitea and motioneye?  
Looking forward to any solution.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 January 2020 09:38 UTC](https://dietpi.com/forum/t/dietpi-services-mask-failed/3778/2 "2020-01-21T09:38:17Z")

</div>

Hi,  
many thanks for your report

Yep looks like motioneye.service is located on wrong place. Therefore systemctl is not able to mask motioneye.

```nohighlight
root@DietPi3:~# systemctl mask motioneye.service
Failed to mask unit: File /etc/systemd/system/motioneye.service already exists.

```

As workaround you could relocate the service as follow

```nohighlight
cd /etc/systemd/system
systemctl stop motioneye.service
systemctl disable motioneye.service
mv motioneye.service /lib/systemd/system/motioneye.service
systemctl daemon-reload
systemctl enable motioneye.service
systemctl start motioneye.service
systemctl status motioneye.service

```

now you should be able to mask the service as follow or use dietpi-services

```nohighlight
systemctl stop motioneye.service
systemctl mask motioneye.service
systemctl status motioneye.service

```

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [22 January 2020 17:12 UTC](https://dietpi.com/forum/t/dietpi-services-mask-failed/3778/3 "2020-01-22T17:12:40Z")

</div>

Hey guys,

it is expected that most services, installed via dietpi-software, cannot be masked. They are intentionally installed to /etc/systemd/system, hence block the mask location. If you want to disable them, use dietpi-services, select e.g. motioneye and exclude it. It will then not be started on boot anymore, but can instead be manually started via systemctl start motioneye.

We already have an open request to allow masking our services as well via dietpi-services mask, but since this does not really add something that cannot be done another way and all solutions are at best ugly (move/rename the file or such), priority is low.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [22 January 2020 22:51 UTC](https://dietpi.com/forum/t/dietpi-services-mask-failed/3778/4 "2020-01-22T22:51:03Z")

</div>

ah ok I wasn’t aware that this is working as designed. But good to know.
