On Mo, 20.08.18 18:00, Radoslaw Garbacz (radoslaw.garbacz@xxxxxxxxxxxxxxxxx) wrote: > Hi, > > Could you please advise me with regard to systemd configuration for service > type=oneshot. > It does not execute stop on shutdown/reboot, but works as intended when > called manually. > > Online discussions indicate that the configuration below should be working. > > 1) service configuration: > [Unit] > Description= ### service test ### > > [Service] > ExecStart=/tmp/aaa.sh start > ExecStop=/tmp/aaa.sh stop > Type=oneshot > RemainAfterExit=yes > TimeoutStopSec=100 > > [Install] > WantedBy=multi-user.target default.target > > > 2) Tried also: > WantedBy=shutdown.target ... Did you enable the service? You need to call "systemctl enable …" on the unit so that the WantedBy= is actually honoured and the unit linked into the initial and final transaction. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel