Probaste con After=network.target
(o bien el nombre del servicio que tengas antes) en la definicion? On Fri, Dec 28, 2018 at 12:28 AM Alvaro Herrera <alvhe...@alvh.no-ip.org> wrote: > > Buenas, > > Estoy tratando de hacer que systemd haga andar getmail automáticamente. > Esta parte ya funciona; para eso, hice un .service en > .config/systemd/user/getmail@.service que dice así: > > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > [Unit] > Description=getmail %i > > [Service] > Type=simple > ExecStart=/usr/bin/getmail -v -iINBOX --rcfile rc-%i > Restart=always > > [Install] > WantedBy=default.target > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > Luego hice "systemctl --user enable getmail@fastmail" y como tengo un > archivo .getmail/rc-fastmail, parece funcionar perfectamente. > > Lo que no entiendo es cómo hacer que esto se levante sólo si es que > network.target está arriba. El network.target es del systemd de > sistema, no del usuario (--user), así que veo lo siguiente en el status si es > que agrego "Requires=network.target" en el archivo .service: > > ● getmail@fastmail.service - getmail fastmail > Loaded: loaded (/home/alvherre/.config/systemd/user/getmail@.service; > enabled; vendor preset: enabled) > Active: failed (Result: exit-code) since Fri 2018-12-28 00:19:20 -03; 5min > ago > Process: 3725 ExecStart=/usr/bin/getmail -v -iINBOX --rcfile rc-fastmail > (code=exited, status=127) > Main PID: 3725 (code=exited, status=127) > > dic 28 00:19:19 alvin systemd[3720]: getmail@fastmail.service: Main process > exited, code=exited, status=127/n/a > dic 28 00:19:19 alvin systemd[3720]: getmail@fastmail.service: Unit entered > failed state. > dic 28 00:19:19 alvin systemd[3720]: getmail@fastmail.service: Failed with > result 'exit-code'. > dic 28 00:19:20 alvin systemd[3720]: getmail@fastmail.service: Service > hold-off time over, scheduling restart. > dic 28 00:19:20 alvin systemd[3720]: getmail@fastmail.service: Failed to > schedule restart job: Unit network.target not found. > dic 28 00:19:20 alvin systemd[3720]: getmail@fastmail.service: Unit entered > failed state. > dic 28 00:19:20 alvin systemd[3720]: getmail@fastmail.service: Failed with > result 'exit-code'. > > > ¿Alguna idea cómo resolver esto? > > -- > Álvaro Herrera -- Juan C. Inostroza <j...@codemonkey.cl> "You're a ghost driving a meat coated skeleton made from stardust. What do you have to be afraid of?"