[Bug] Systemd Shutdown

David Yoon <[email protected]>
Newsgroups gmane.linux.debian.devel.www
Message-ID <CAHmMDV15SMLAFO2+eRX_ygCLhAbNQk4S6c3aph0Vqnmyf27E+Q@mail.gmail.com>
Hello,

Before I start, I really like Debian 8.

I'm not an expert in Linux, but I think I found an issue.
I'm using Debian 8.7 and running in root.
I wanted to use systemd to copy meta-data file from ramdisk before I
shutdown.
Here's the steps that I did:
1) created a file called test.sh, which is a script stored in
/usr/local/bin/:

#!/bin/sh
cp -r /home/david/test/tt.log /home/david/test1/tt.log

2) created a file test.service and stored in /etc/systemd/system/
In test.service,
[Unit]
Description=The Shutdown

[Service]
Type=oneshot
ReaminAfterExit=true
ExecStart=/bin/true
ExecStop=/usr/local/bin/test.service.sh

[Install]
WantedBy=multi-user.target

3) I run systemctl daemon-reload and systemctl enable test.service.

4) When I checked "systemctl status test.service", it states active.

However, when I reboot or shutdown, it doesn't work.
There is no file found in /home/david/test1/

Please advise.
Thanks,

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.