project-abigail / abigail-device

This is the code that runs on abigail's device
0 stars 1 forks source link

setup script fails to configure abigail-device service #25

Open russnicoletti opened 7 years ago

russnicoletti commented 7 years ago

This line:

sudo sed "s/<SOURCEDIR>/${source_dir////\\/}/g" $source_dir/config-files/abigail-device.service.in > /lib/systemd/system/abigail-device.service

fails with "permission denied" It appears 'sed' runs as root but the redirection of the output does not run as root. The script should so something like:

sed "s/<SOURCEDIR>/${source_dir////\\/}/g" $source_dir/config-files/abigail-device.service.in > abigail-device.service
sudo mv abigail-device.service /lib/systemd/system
julienw commented 7 years ago

Mmm actually I ran the full script using sudo as said in https://github.com/project-abigail/device-setup and that's why I didn't see the issue. So either we use sudo in the script and we remove sudo in the README, or we remove sudo in the script and we use sudo in the README :)

I'd prefer the latter, because as a user I don't like that a script runs sudo on my behalf. But happy to discuss :)

russnicoletti commented 7 years ago

I'm fine with removing sudo in the script and leaving it in the README