Line 213: |
Line 213: |
| ====Global steps==== | | ====Global steps==== |
| Create a db entry in configuration db: | | Create a db entry in configuration db: |
− | config set servicename service status enabled | + | config set '''servicename''' service status enabled |
| | | |
| ====only systemd .service file available==== | | ====only systemd .service file available==== |
Line 219: |
Line 219: |
| mkdir -p /etc/lib/systemd/system/'''servicename'''.service.d/ | | mkdir -p /etc/lib/systemd/system/'''servicename'''.service.d/ |
| printf "[Install]\nWantedBy=sme-server.target\n" > /etc/lib/systemd/system/'''servicename'''.service.d/50koozali.conf | | printf "[Install]\nWantedBy=sme-server.target\n" > /etc/lib/systemd/system/'''servicename'''.service.d/50koozali.conf |
| + | systemctl daemon-reload |
| /etc/e-smith/events/actions/systemd-default | | /etc/e-smith/events/actions/systemd-default |
| | | |
Line 238: |
Line 239: |
| | | |
| cd /etc/rc.d/rc7.d | | cd /etc/rc.d/rc7.d |
− | ln -s ../init.d/'''servicename''' S85'''servicename''' | + | ln -s ../init.d/'''e-smith-service''' S85'''servicename''' |
| + | |
| + | ====only run script in a daemontool runit /service/'''servicename''' folder==== |
| + | as previously replace servicename to the actual service name |
| + | |
| + | <syntaxhighlight lang="bash" >printf "[Unit] |
| + | Description=servicename |
| + | Requires=runit.service |
| + | |
| + | [Service] |
| + | Type=oneshot |
| + | ExecStartPre=/sbin/e-smith/service-status servicename |
| + | ExecStart=/usr/bin/sv u /service/servicename |
| + | ExecStop=/usr/bin/sv stop /service/servicename |
| + | ExecReload=/usr/bin/sv t /service/servicename |
| + | RemainAfterExit=yes |
| + | |
| + | [Install] |
| + | WantedBy=sme-server.target" > /etc/systemd/system/servicename.service |
| + | systemctl daemon-reload |
| + | /etc/e-smith//events/actions/systemd-default |
| + | </syntaxhighlight> |
| | | |
| ==Packages== | | ==Packages== |