startup/shutdown scripts

Reindl Harald h.reindl at thelounge.net
Wed Jul 4 09:45:03 UTC 2012



Am 04.07.2012 11:41, schrieb Christopher Svanefalk:
> Dear all,
> 
> if I want some custom commands to be run when my system boots up, and some other commands to be run when it powers
> down, what files do I have to modify to achieve this? Thanks in advance!

below a example-systemd-service whichs works fine except
that "vm-suspend-all.sh" is interrupted by systemd at
shutdown for whatever reason

but this is the way to go


[root at srv-rhsoft:~]$ cat /etc/systemd/system/vmware-default.service
[Unit]
Description=VMware-Default-Machines
After=vmware.service

[Service]
Type=oneshot
ExecStart=/bin/su -c "/scripts/vmware/vm-default-start.sh" vmware
ExecStop=/scripts/vmware/vm-suspend-all.sh
RemainAfterExit=yes
TimeoutSec=1800
SysVStartPriority=90

[Install]
WantedBy=multi-user.target

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20120704/19352557/attachment.sig>


More information about the users mailing list