FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 07-04-2012, 09:41 AM
Christopher Svanefalk
 
Default startup/shutdown scripts

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!

--
Best,
Christopher Svanefalk


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 07-04-2012, 09:45 AM
Reindl Harald
 
Default startup/shutdown scripts

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@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

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 07-04-2012, 10:01 AM
Christopher Svanefalk
 
Default startup/shutdown scripts

Thanks a lot!*

On Wed, Jul 4, 2012 at 11:45 AM, Reindl Harald <h.reindl@thelounge.net> wrote:





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@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




--

users mailing list

users@lists.fedoraproject.org

To unsubscribe or change subscription options:

https://admin.fedoraproject.org/mailman/listinfo/users

Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Have a question? Ask away: http://ask.fedoraproject.org




--
Best,
Christopher Svanefalk

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 07:42 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org