# Start A Service at Boot

**URL:** <https://forums.suse.com/t/start-a-service-at-boot/26663>\
**Category:** SLES Configure-Administer\
**Created:** [February 6, 2015, 4:46pm UTC](https://forums.suse.com/t/start-a-service-at-boot/26663 "2015-02-06T16:46:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carnold6](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@carnold6](https://forums.suse.com/u/carnold6)\
**Post date:** [February 6, 2015, 4:46pm UTC](https://forums.suse.com/t/start-a-service-at-boot/26663/1 "2015-02-06T16:46:27Z")

</div>

SLEs 12. We use a webapp called alfresco. During installation alfresco asks if you want to install a service, we answered yes but it does not start at boot. I suspect it is because of SLES 12 using system. How do we start this webapp at boot using system? I ran systemctl enable alfresco.service but that does not start alfresco at boot. I manually start alfresco by cd /opt/alfresco then ./alfresco.sh start. There is also an alfresco script in /etc/init.d

---

<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:** [February 6, 2015, 5:08pm UTC](https://forums.suse.com/t/start-a-service-at-boot/26663/2 "2015-02-06T17:08:44Z")

</div>

> [@](#):
>
> On Fri 06 Feb 2015 02:54:01 PM CST, carnold6 wrote:
> 
> SLEs 12. We use a webapp called alfresco. During installation alfresco  
> asks if you want to install a service, we answered yes but it does not  
> start at boot. I suspect it is because of SLES 12 using system. How do  
> we start this webapp at boot using system? I ran systemctl enable  
> alfresco.service but that does not start alfresco at boot. I manually  
> start alfresco by cd /opt/alfresco then ./alfresco.sh start. There is  
> also an alfresco script in /etc/init.d

Hi  
Create a simple systemd sevice file pointing at the init file  
in /etc/systemd/system called alfresco.service

```auto
# /etc/systemd/system/alfresco.service
#

[Unit]
Description=Start the alfresco web service

[Service]
Type=forking
ExecStart=/bin/sh -c "/etc/init.d/alfresco start"
ExecStop=/bin/sh -c "/etc/init.d/alfresco stop"

[Install]
WantedBy=multi-user.target
```

Then start, check and then finally enable if all ok;

```auto
systemctl start alfresco.service
systemctl status alfresco.service
(if all ok, then enable to start on a reboot)
systemctl enable alfresco.service
```

–  
Cheers Malcolm Â°Â¿Â° LFCS, SUSE Knowledge Partner (Linux Counter #276890)  
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.36-38-default  
If you find this post helpful and are logged into the web interface,  
please show your appreciation and click on the star below… Thanks!

---

<div class="post-metadata">

**Author:** ![carnold6](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@carnold6](https://forums.suse.com/u/carnold6)\
**Post date:** [February 6, 2015, 6:05pm UTC](https://forums.suse.com/t/start-a-service-at-boot/26663/3 "2015-02-06T18:05:13Z")

</div>

[QUOTE=malcolmlewis;26243]Hi  
Create a simple systemd sevice file pointing at the init file  
in /etc/systemd/system called alfresco.service

```auto
# /etc/systemd/system/alfresco.service
#

[Unit]
Description=Start the alfresco web service

[Service]
Type=forking
ExecStart=/bin/sh -c "/etc/init.d/alfresco start"
ExecStop=/bin/sh -c "/etc/init.d/alfresco stop"

[Install]
WantedBy=multi-user.target
```

Then start, check and then finally enable if all ok;

`
systemctl start alfresco.service
systemctl status alfresco.service
(if all ok, then enable to start on a reboot)
systemctl enable alfresco.service
`[QUOTE]

Worked like a charm. Thank you Malcolm
