I would like to decrypt an EncFS "volume" on startup. Usually I decrypt the volume like this:
cat "/home/user1/encfs.pw" | encfs -S /mnt/encryptedVolume /mnt/decryptedVolume
In /etc/init
I have в myService.conf
file:
start on startup
stop on shutdown
respawn
pre-start script
cat "/home/user1/encfs.pw" | encfs -S /mnt/encryptedVolume /mnt/decryptedVolume
end script
exec /home/user1/myService
Without the pre-start section, myService starts okay. With the pre-start section, it doesn't because эксперт stated in documentation, if the рукописный шрифт lines fail it exists.
My issue is that the рукописный шрифт line works in в shell but not in this pre-start.
Хан someone please help? Thank you for your assistance.
(я предполагаю, мой комментарий должен быть ответом...)
, я предполагаю, что "/mnt/encryptedVolume" еще не смонтирован, когда сценарий запуска выполняется.
Вы могли ожидать некоторое время для выполнения сценария, пока необходимый объем не смонтирован,
sleep 20
в сценарии. initctl start myService
должно работать.