change services startup order?

Ask questions about Arch Linux ARM. Please search before making a new topic.

change services startup order?

Postby rev667 » Mon Jun 24, 2013 7:50 pm

Hi everyone,

I am getting headache trying to understand systemd and systemctl and units and stuff.

I have a Pogoplug V2, it's great.

Then for some reason I did a system update, had the issues with the filesystem woes, but it's fixed now, and boots fine.

However, hpptd service wasn't running, tried systemctl restart httpd and it failed.

After much headscratching, I discovered my pogoplug.service was taking port 80 (no idea why).

My solution was, stop the pogoplug.service, restart hpptd, then restart pogoplug.service.

This works, and leads me down the path of trying to figure out how to change the startup order of systemd

HELP! The man pages and various webpages are as cryptic as a very cryptic thing.

Could someone explain to this old geezer what i need to so to change the startup order of services?

Cheers

Rev667
rev667
 
Posts: 18
Joined: Tue May 07, 2013 8:19 am

Re: change services startup order?

Postby moonman » Tue Jun 25, 2013 3:29 am

Edit the pogoplug.service and add After=<your http daemon.service> under [Unit] section. However, if you do this, and your http service doesnt start, pogoplug service wont start as well.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: change services startup order?

Postby rev667 » Tue Jun 25, 2013 9:52 am

Thanks moonman!

found the file eventually, /etc/systemd/system/multi-user.target.wants/pogoplug.service

$this->bbcode_second_pass_code('', '[Unit]
Description=my.pogoplug.com service daemon
After=network.target
After=httpd.service

[Service]
User=root
Type=oneshot
ExecStart=/bin/sh /user/local/cloudengines/pogoplug.sh
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target')

Will try this when I get home later.

Rev
rev667
 
Posts: 18
Joined: Tue May 07, 2013 8:19 am

Re: change services startup order?

Postby pepedog » Tue Jun 25, 2013 10:00 am

An update will overwrite that, here is how to customise
https://wiki.archlinux.org/index.php/SystemD#Editing_provided_unit_files
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK


Return to User Questions

Who is online

Users browsing this forum: No registered users and 10 guests