You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 
        I did not follow your steps 100% I only used your new headers for the script and now I can see the description in yast. My problem is that the script is triggers before the reboot and after. I do not want it happen before.Radek– Radek2012-07-19 23:10:55 +00:00Commented Jul 19, 2012 at 23:10
- 
        YaST has probably added the script to the reboot and shutdown init. If you use the skeleton (check the openSuse link, it contains a simpler one, look in the 'Action' section). You have to be sure that when start is invoke, you call your PHP script. When stop is invoke, you don't call it. Or you can use @Petr-Uzel solution too, then you simply call your PHP script, no need to apply the skeleton structure.Huygens– Huygens2012-07-20 09:34:16 +00:00Commented Jul 20, 2012 at 9:34
- 
        Would you know how to check if calling the script is part of shutdown init?Radek– Radek2012-07-23 00:21:01 +00:00Commented Jul 23, 2012 at 0:21
- 
        1@Radek when shutting down or rebooting, the runlevel change to (respectively) 0 or 6. If you have the script in /etc/init.d/rcn.d/K* with n equal 0 or 6, then it is called during the shutdown. I have added a gist (see link in my answer) with a simple script you could re-use to call your PHP script.Huygens– Huygens2012-07-23 07:15:50 +00:00Commented Jul 23, 2012 at 7:15
- 
        After checking, the runlevel for shutting down and reboot are correct, however, the scripts are not place there. But in their respective start runlevel. So if you put the runlevel 3 to start the script, then in runlevel 3 you will see the shutdown script, the difference is that for startup, the link to the script is S<nn><filename> whereas for the shuttdown it is K<nn><filename>Huygens– Huygens2012-07-23 07:32:02 +00:00Commented Jul 23, 2012 at 7:32
                    
                        
                    
                 | 
            
                Show 2 more comments
            
        
         
    How to Edit
        - Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
        How to Format
    
    - 
                create code fences with backticks ` or tildes ~
                ```
 like so
 ```
- 
                add language identifier to highlight code
                ```python
 def function(foo):
 print(foo)
 ```
- put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes `like _so_`
- quote by placing > at start of line
- to make links (use https whenever possible)
                <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
            How to Tag
        
        A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. shell-script), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you