Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Porting script from Systemd to OpenRC
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
reikdas
Apprentice
Apprentice


Joined: 27 Nov 2018
Posts: 238

PostPosted: Sun Jan 06, 2019 8:33 am    Post subject: Porting script from Systemd to OpenRC Reply with quote

This is the script I want to port to openrc-

Code:
[Unit]
Description=Apply undervolt settings

[Timer]
Unit=undervolt.service
# Wait 2 minutes after boot before first applying
OnBootSec=2min
# Run every 30 seconds
OnUnitActiveSec=30

[Install]
WantedBy=multi-user.target


The undervolt.service script mentioned-
Code:
[Unit]
Description=undervolt

[Service]
Type=oneshot
ExecStart=undervolt -v --core -160 --cache -160 --gpu -60


Is there a way to wrap code around this to make OpenRC work with this? (Also, do I need to store the script in a particular location?)
Or do I have to rewrite the scripts completely with start(), stop() and status() functions as mentioned here - https://github.com/OpenRC/openrc/blob/master/service-script-guide.md
_________________
[19:18] <@NeddySeagoon> Gentoo has an installer. Just like other distros. Go to the bathroom, look in the mirror. You will see the Gentoo installer :)
Back to top
View user's profile Send private message
grumblebear
Apprentice
Apprentice


Joined: 26 Feb 2008
Posts: 202

PostPosted: Sun Jan 06, 2019 8:58 am    Post subject: Reply with quote

That is a systemd timer, a kind of replacement for cron. No need (and no way) to port this to openrc. Just put the undervolt command in your system crontab.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum