# The method of making startup script

**URL:** https://forums.suse.com/t/the-method-of-making-startup-script/35285
**Category:** SUSE Linux Enterprise Server
**Created:** [September 17, 2020, 12:21am UTC](https://forums.suse.com/t/the-method-of-making-startup-script/35285 "2020-09-17T00:21:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![K11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@K11](https://forums.suse.com/u/K11)
#### Post date: [September 17, 2020, 12:21am UTC](https://forums.suse.com/t/the-method-of-making-startup-script/35285/1 "2020-09-17T00:21:54Z")

</div>

Dear all,

I want to make the startup script which run the command Âip route add 192.168.1.0/24 dev eth0Â.  
But I canÂt find the method in the Guide.  
Could you tell me the method of making startup script?

Best regard,

---

<div class="post-metadata">

### Author: ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)
#### Post date: [September 17, 2020, 12:35am UTC](https://forums.suse.com/t/the-method-of-making-startup-script/35285/2 "2020-09-17T00:35:00Z")

</div>

Hi and welcome to the Forum 🙂  
If using wicked, you should just be able to go into YaST Network Settings and add. Else just create a simple systemd service to call your script after the network interface is up and running.

```auto
#!/bin/bash
ip route add 192.168.1.0/24 dev eth0

# /etc/systemd/system/add_my_route.service
[Unit]
Description=Add route to eth0
After=wickedd.service

[Service]
Type=simple
ExecStart=/bin/sh -c "/path/to/script/add_my_route

[Install]
WantedBy=multi-user.target

```

---

<div class="post-metadata">

### Author: ![K11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@K11](https://forums.suse.com/u/K11)
#### Post date: [September 17, 2020, 3:00am UTC](https://forums.suse.com/t/the-method-of-making-startup-script/35285/3 "2020-09-17T03:00:00Z")

</div>

Hi malcolmlewis,

> you should just be able to go into YaST Network Settings and add  
> I set the 2 route by YaST.  
> ![](https://forums.suse.com/uploads/editor/id/i4vbfcvcjses.png)  
> I checked the route, and 192.168.2.0/24 is not reflected.  
> ![](https://forums.suse.com/uploads/editor/3r/byps8cwf6jsw.png)

Can’t we set the Gateway on the Yast?

Thank you and regards,

---

<div class="post-metadata">

### Author: ![KrajuKral](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@KrajuKral](https://forums.suse.com/u/KrajuKral)
#### Post date: [March 4, 2024, 9:57am UTC](https://forums.suse.com/t/the-method-of-making-startup-script/35285/4 "2024-03-04T09:57:02Z")

</div>

what worked for me: it’\s creating a simple bash script
