I’ve been running with the Nexcloud snap installation successfully for a while now with my data on an external drive. I’d like to now LUKS encrypt this external drive, which would require me to manually mount it before nextcloud-snap can use. Is there a clean way to ensure the nextcloud snap does not start at boot, expecting this drive to be mounted? I know this snap uses the removable-media
interface.
Okay did a bit more digging. It looks like snapd offers some control in this area.
Running a snap stop --disable nextcloud
and rebooting showed:
$ sudo snap services
Service Startup Current Notes
nextcloud.apache disabled inactive -
nextcloud.mdns-publisher disabled inactive -
nextcloud.mysql disabled inactive -
nextcloud.nextcloud-cron disabled inactive -
nextcloud.nextcloud-fixer disabled inactive -
nextcloud.php-fpm disabled inactive -
nextcloud.redis-server disabled inactive -
nextcloud.renew-certs disabled inactive -
Then after a snap start nextcloud
:
$ sudo snap services
Service Startup Current Notes
nextcloud.apache disabled active -
nextcloud.mdns-publisher disabled active -
nextcloud.mysql disabled active -
nextcloud.nextcloud-cron disabled active -
nextcloud.nextcloud-fixer disabled active -
nextcloud.php-fpm disabled active -
nextcloud.redis-server disabled active -
nextcloud.renew-certs disabled active -
This seems to persist between reboots as well.