Dietpi-services mask failed Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
aquliu
Posts: 12
Joined: Thu Jan 09, 2020 12:10 pm

Dietpi-services mask failed

Post by aquliu »

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.
User avatar
Joulinar
Posts: 2617
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi-services mask failed

Post by Joulinar »

Hi,
many thanks for your report

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

Code: Select all

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

Code: Select all

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

Code: Select all

systemctl stop motioneye.service
systemctl mask motioneye.service
systemctl status motioneye.service
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2423
Joined: Sat Nov 18, 2017 6:21 pm

Re: Dietpi-services mask failed

Post by MichaIng »

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.
User avatar
Joulinar
Posts: 2617
Joined: Sat Nov 16, 2019 12:49 am

Re: Dietpi-services mask failed

Post by Joulinar »

ah ok I wasn't aware that this is working as designed. But good to know.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply