Score:0

Can I do a mount /a in a custom systemd startup service

pe flag

I want to do a mount /a or mount /directory in a custom systemd service, is it even possible?

my service is my-service.service

It currently does not mount on bootup, but if I stop and start the service by hand, it works correctly, for example systemctl start my-service.service, works great (but I am entering in my password)

Is it not mounting on boot because it wants my password?

Is their a way to inject the password in my script.

Ubuntu version is 20.04

user535733 avatar
cn flag
Sure, you can use a service to mount storage devices. However, the phrasing of your question suggests that you would prefer to automount at startup, which can usually be done more easily using /etc/fstab. Is it possible that your question about "inject password" really means "inject decryption passphrase? Please edit your question to be clear about the *problem* you want help solving. Don't get wrapped up in a preferred solution yet.
pasman pasmański avatar
mx flag
Please edit your question and paste your service/mount unit.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.