Systemd service to run command before stopping connman.service?

[This is my first time creating a thread, I apoligize if there is a more suitable category]
Hello,
I would like to run a command at shutdown before stopping a specific service (connman). I need the command to finish before stopping connman as well.
Is there a good way to do this? I tried searching, but it seems systemd is a bit finnicky when it comes to shutdowns.
I'd like to achieve this without modifying connman.service (Though this would probably work for me)
What is the best way to do this?
Thanks,
Jacob
Last edited by frash23 (2014-12-21 13:59:03)

Hi
I'm not sure if it would work, but from logic, creating a service file for your command with an "After=" dependency to connman might do it. Assuming that systemd passes the dependencies in reverse order when shutting down...
Plus use "ExecStop=" to make your command execute at stopping.
You gotta try this out.
Regards
Edit: To test/debug you can probably simply stop connman and see if it pulls the dep (instead of shutting down completely).
Edit2: Maybe better better use "ExecStop=" inside the connman service files. As you mentioned you copy the original service file from /usr/lib/systemd/system to /etc/systemd/system and make your modifications there. This is the correct way to modify service files.
Or then do it with a "config" directory, analog to how it's done here: https://wiki.archlinux.org/index.php/au … al_console
Reference 'man systemd.service':
ExecStop=
Commands to execute to stop the service started via ExecStart=. This argument takes
multiple command lines, following the same scheme as described for ExecStart= above. Use of
this setting is optional. After the commands configured in this option are run, all
processes remaining for a service are terminated according to the KillMode= setting (see
systemd.kill(5)). If this option is not specified, the process is terminated immediately
when service stop is requested. Specifier and environment variable substitution is
supported (including $MAINPID, see above).
Evtl. make sure your links in the .wants directory reference to the correct service file. (Disable and reenable once.)
Last edited by rebootl (2014-12-21 16:51:18)

Similar Messages

  • Run custom systemd service before NetworkManager

    Hi, I am trying to write a systemd service that runs and completes before NetworkManager.service starts.
    I tried this:
    [Unit]
    Description=Custom service test
    Before=NetworkManager.service
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/echo Custom service test 1
    ExecStart=/usr/bin/sleep 5
    ExecStart=/usr/bin/echo Custom service test 2
    [Install]
    WantedBy=network.target
    While the custom service does start, I got this rather strange output:
    Jan 22 00:12:46 localhost echo[1166]: Custom service test 1
    Jan 22 00:12:48 localhost kernel: NVRM: GPU at 0000:02:00: GPU-(snip)
    ... some unrelated messages (acpid, kdm, etc) ...
    Jan 22 00:12:49 localhost systemd-logind[1170]: Linked /tmp/.X11-unix/X0 to /run/user/1000/X11-display.
    Jan 22 00:13:13 localhost echo[1254]: Custom service test 2
    Jan 22 00:12:50 localhost systemd[1]: Started Custom service test.
    Jan 22 00:12:50 localhost systemd[1]: Starting Network Manager...
    As you can see, while everything appears in the expected order in the log, the timestamps look very wrong. The "Custom service test 2" says "00:13:13", yet it is in the middle of "00:12:49" and "00:12:50". What gives?
    Also, notice that the first echo was at 00:12:46, but NetworkManager started at 00:12:50, which is only 4 seconds later. The "sleep" in the custom services should have made it start at 00:12:51 at the earliest. I don't understand why things are not being respected.
    The output I'd expect to see is something like this:
    Jan 22 00:12:46 localhost echo[1166]: Custom service test 1
    Jan 22 00:12:51 localhost echo[1254]: Custom service test 2
    Jan 22 00:12:51 localhost systemd[1]: Started Custom service test.
    Jan 22 00:12:51 localhost systemd[1]: Starting Network Manager...
    I have also made sure that it shows up in NetworkManager.service's After list:
    $ systemctl show -p After NetworkManager.service
    After=mycustomservice.service syslog.target systemd-journald.socket dbus.socket basic.target

    falconindy wrote:Sooooo this begs the question: what are you really trying to do?
    I'm trying to write a script that changes the interface's MAC address before NetworkManager gets a chance to take over the network interface. I'm aware that there's a page about exactly that on the wiki. I started with the systemd service from the bottom of the page, which says "Before=dhcpcd@%i.service". I changed that line to use "NetworkManager.service", and I changed the ExecStart line to "/usr/bin/macchanger -A myinterface" in order to get a random MAC address, instead of setting a fixed one like the example shows. Then I saw that macchanger's output was being mixed with NetworkManager's output in the journal, so I decided to try and write a custom service just for testing, making it start before NetworkManager, in order to see if it really was systemd's fault or if it was something macchanger-specific. Then I noticed the strange behavior described in the OP, didn't really know what to do about it, so I posted this topic. That's the story so far...
    Last edited by WindPower (2013-01-23 00:13:22)

  • Command to Stop and Start the SBO Mailer Service

    Good day,
    I have an issue on my SAP server (SAP 2007 SP01 PL10) where the SBO Mailer server is intermittently stopping.  This is causing Emailed Alerts and emails from SAP to stop working.
    I want to create a Scheduled Task in Windows to run a batch file which will stop then restart the SBO Mailer service.
    Do you know the DOS command to stop and also start the SBO Mailer service?
    Thank you
    EvS

    Good Day,
    We have had the same problem. I Added this scheduled task to Validate if service is running and to Restart if Necessary..
    We are still working on this issue. I have a feeling itu2019s the SMTP rejecting the emails
    @echo off
    rem ***********************************************************************
    rem *                                                                     *
    rem *   This script will stop & restart the SAP SBO Mailer service        *
    rem *                                                                     *
    rem *   Created by Anthony Galvano from Syntax to recycle the service     *
    rem *   on Mar 22 2011                                                    *
    rem *                                                                     *
    rem ***********************************************************************
    call wmic /locale:ms_409 service where (name="B1LicenseService") get state /value | findstr State=Running
    if %ErrorLevel% EQU 0 (
        echo Running
    ) else (
        echo **** Now restarting SBOMailer service  ***
    net start SBOMail
    timeout /T 5
    Anthony

  • [invalid] Run systemd service after specific device is initialized

    Hi.
    Is there any way to run systemd service only after specific device is initialized/kernel module is loaded?
    The task I'm trying to solve is applying trackpoint speed and sensitivity settings on boot in my X220.
    Service code (trackpoint.service) is quite simple
    [Unit]
    Description=Trackpoint configuration
    [Service]
    Type=oneshot
    EnvironmentFile=/etc/conf.d/trackpoint.conf
    ExecStart=/bin/sh -c 'echo ${sensitivity} > /sys/devices/platform/i8042/serio1/serio2/sensitivity'
    ExecStart=/bin/sh -c 'echo ${speed} > /sys/devices/platform/i8042/serio1/serio2/speed'
    [Install]
    WantedBy=graphical.target
    The issue is that trackpoint.service gets executed before trackpoint device gets initialized and thus fails.
    Jun 14 23:12:10 xi sh[414]: /bin/sh: /sys/devices/platform/i8042/serio1/serio2/sensitivity: No such file or directory
    Jun 14 23:12:10 xi systemd[1]: Unit trackpoint.service entered failed state.
    Jun 14 23:12:18 xi kernel: psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 3/3
    Jun 14 23:12:18 xi kernel: input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/serio2/input/input13
    What have I tried already
    1. Specified systemd-modules-load in After= and Requires= directives and added psmouse module to /etc/modules-load.d
    2. Tried path activation (perhaps, I did it wrong) by creating i8042.path
    [Path]
    PathExists=/sys/devices/platform/i8042
    Unit=trackpoint.service
    However, this changed nothing.
    I don't know what else should I try.
    Please suggest solution for this.
    Thanks in advance.
    Last edited by eDio (2013-06-15 13:28:36)

    Thank you very much.
    I've finally managed this to work
    $ cat /etc/udev/rules.d/10-trackpoint.rules
    SUBSYSTEM=="input", KERNEL=="event13", ACTION=="add", RUN+="/usr/bin/trackpoint_apply"
    $ cat /etc/conf.d/trackpoint.conf
    speed=255
    sensitivity=255
    $ cat /usr/bin/trackpoint_apply
    #!/usr/bin/env sh
    . /etc/conf.d/trackpoint.conf
    /usr/bin/echo $speed > /sys/devices/platform/i8042/serio1/serio2/sensitivity
    /usr/bin/echo $sensitivity > /sys/devices/platform/i8042/serio1/serio2/speed

  • [SOLVED] A custom systemd service doesn't execute a specific command

    I have made a custom service which should set screen brightness.
    file: /etc/systemd/system/backlight100.service
    [Unit]
    Description=Set screen brightness
    [Service]
    Type=oneshot
    ExecStart=/bin/echo 100 > /sys/class/backlight/intel_backlight/brightness
    ExecStart=/usr/bin/beep
    [Install]
    WantedBy=multi-user.target
    (beep is there so I can know for sure that the script runs)
    The problem is, when I run "# systemctl start backlight100.service" I can hear the beep but it doesn't change the brightness. When I run "/bin/echo 100 > /sys/class/backlight/intel_backlight/brightness" in terminal it does change the brightness... but not when I start or restart the service.
    Here's the output of systemctl status backlight100.service after starting it
    backlight100.service - Set screen brightness
    Loaded: loaded (/etc/systemd/system/backlight100.service; enabled)
    Active: inactive (dead) since Fri 2013-04-05 20:17:32 AMT; 3min 19s ago
    Process: 27698 ExecStart=/usr/bin/beep (code=exited, status=0/SUCCESS)
    Process: 27696 ExecStart=/bin/echo 100 > /sys/class/backlight/intel_backlight/brightness (code=exited, status=0/SUCCESS)
    Apr 05 20:17:32 work systemd[1]: Starting Set screen brightness...
    Apr 05 20:17:32 work echo[27696]: 100 > /sys/class/backlight/intel_back...ss
    Apr 05 20:17:32 work systemd[1]: Started Set screen brightness.
    What am I doing wrong here? Any help appreciated.
    Last edited by axper (2013-04-05 18:35:24)

    msthev wrote:$ man systemd.service
    ExecStart=
    Note that this setting does not directly support shell command
    lines. If shell command lines are to be used they need to be passed
    explicitly to a shell implementation of some kind. Example:
    ExecStart=/bin/sh -c 'dmesg | tac'
    Thanks, changing ExecStart line to
    ExecStart=/bin/bash -c '/bin/echo 100 > /sys/class/backlight/intel_backlight/brightness'
    solved the issue. Though I can recall seeing ExecStart lines with direct shell commands.
    Raynman wrote:
    You should look at tmpfiles.d.
    https://wiki.archlinux.org/index.php/Sy … rary_files
    I'll do that, thanks!

  • [solved] run program before network is available and stop boot on fail

    Hi everyone,
    Let's say I have an program that is absolutely essential to my system, and I want it to run before netctl even tries initialising my network connection (in fact, I want the network to be unavailable until the program has finished its execution). I _always_ want to see the program's output on the console, and if it exits with a non-zero exit code, I want the whole boot process to be aborted (or at least all of netctl's units to be disabled). Is this possible in systemd?
    Last edited by popoffka (2014-04-18 13:07:09)

    popoffka wrote:Hi everyone,
    Hi.
    popoffka wrote:Let's say I have an program that is absolutely essential to my system, ...
    Sure.
    popoffka wrote:and I want it to run before netctl even tries initialising my network connection (in fact, I want the network to be unavailable until the program has finished its execution).
    Use 'Before=' in your unit file. Make sure it does not fork.
    popoffka wrote:I _always_ want to see the program's output on the console,
    Pipe it's output to /dev/console directly. Maybe there is a cleaner why, I'm not sure. SystemD actually supports the redirect directive in it's native language (nice).
    popoffka wrote:and if it exits with a non-zero exit code, I want the whole boot process to be aborted (or at least all of netctl's units to be disabled)
    Use 'RequiredBy=' in your unit file. That could be used to prevent netctl from starting. Preventing the whole boot isn't a bit drastic isn't it?
    popoffka wrote:. Is this possible in systemd?
    Yes. Consult the systemd.service and systemd.unit manpages.

  • Systemd service starts command twice

    Hello,
    i have a problem with systemd service for inotifywait check my mails.
    service:
    [Unit]
    Description=Start mailnotify as a daemon
    Requires=offlineimap.service
    After=offlineimap.service
    [Service]
    User=matija
    ExecStart=/home/matija/bin/mailnotify.sh
    [Install]
    WantedBy=multi-user.target
    and when i start it:
    sudo systemctl status mailnotify.service
    mailnotify.service - Start mailnotify as a daemon
    Loaded: loaded (/usr/lib/systemd/system/mailnotify.service; disabled)
    Active: active (running) since Wed, 2012-12-12 15:46:00 CET; 6s ago
    Main PID: 13650 (mailnotify.sh)
    CGroup: name=systemd:/system/mailnotify.service
    ├─13650 /bin/bash /home/matija/bin/mailnotify.sh
    ├─13652 /bin/bash /home/matija/bin/mailnotify.sh
    └─13653 inotifywait -e create -e moved_to /home/matija/Maildir/Archives.2012/new /home/matija/Maildir/Archives/new /hom...
    Dec 12 15:46:00 workarch systemd[1]: Starting Start mailnotify as a daemon...
    Dec 12 15:46:00 workarch systemd[1]: Started Start mailnotify as a daemon.
    but it doesn't work.
    when i start /home/matija/bin/mailnotify.sh it works as expected.
    Could you please help me with that?
    Thanks

    You'll have to run journalctl as root. It should be logged as UNIT=bar.service, SYSLOG_IDENTIFIER=systemd, one example from me:
    sudo systemctl start chrony.service
    sudo systemctl stop chrony.service
    sudo journalctl -o verbose --since today UNIT=chrony.service SYSLOG_IDENTIFIER=systemd
    Sa 2014-09-06 01:19:32.432387 CEST [s=###########################;i=#####;b=###########################;m=#######;t=##########;x=#############]
    PRIORITY=6
    _UID=0
    _GID=0
    _MACHINE_ID=###########################
    _HOSTNAME=pamobile
    SYSLOG_FACILITY=3
    SYSLOG_IDENTIFIER=systemd
    _TRANSPORT=journal
    _PID=1
    _COMM=systemd
    _EXE=/usr/lib/systemd/systemd
    _CMDLINE=/sbin/init
    _CAP_EFFECTIVE=3fffffffff
    _SYSTEMD_CGROUP=/
    CODE_FILE=src/core/job.c
    CODE_LINE=721
    CODE_FUNCTION=job_log_status_message
    MESSAGE_ID=#######################
    RESULT=done
    UNIT=chrony.service
    MESSAGE=Started Chrony Network Time Daemon.
    _BOOT_ID=############################
    _SOURCE_REALTIME_TIMESTAMP=###########
    Sa 2014-09-06 01:19:40.538847 CEST [s=###############################;i=#####;b=###############################;m=########;t=############;x=#########################]
    PRIORITY=6
    _UID=0
    _GID=0
    _MACHINE_ID=###############################
    _HOSTNAME=pamobile
    SYSLOG_FACILITY=3
    SYSLOG_IDENTIFIER=systemd
    _TRANSPORT=journal
    _PID=1
    _COMM=systemd
    _EXE=/usr/lib/systemd/systemd
    _CMDLINE=/sbin/init
    _CAP_EFFECTIVE=3fffffffff
    _SYSTEMD_CGROUP=/
    CODE_FILE=src/core/job.c
    CODE_FUNCTION=job_log_status_message
    RESULT=done
    UNIT=chrony.service
    CODE_LINE=729
    MESSAGE_ID=###############################
    MESSAGE=Stopped Chrony Network Time Daemon.
    _BOOT_ID=###############################
    _SOURCE_REALTIME_TIMESTAMP=###################

  • How to Run Operating System Command Before/After Message Processing SAP PI

    Hi,
    We are trying to execute multiple commands via "Operating System Command Before/After Message Processing".
    When we use single command say for example cp or mv (copy or move) the commands get executed fine.
    eg: cp %F /var/opt/data/outbound/Test/Dummy.txt 
    /this works fine/
    when we club commands together or try to redirect the outputs of commands, none of the commands get executed.
    eg:
    cp %F /var/opt/data/outbound/Test/Dummy.txt ; rm %F
    or
    wc -l %F > /var/opt/data/outbound/Test/Dummy.txt
    Is it possible to execute multiple commands or redirect the output  of commands without using a shell script? The PI server we are working on iis hosted on UNIX environment.

    Hi Harleen,
    try like this
    cp %F /var/opt/data/outbound/Test/Dummy.txt ; rm %F
    instead of semicolon try this
    (1) &
    command1 & command2
    Execute Command1 and then execute Command2
    (2) &&
    command1 && command2
    Runs the command2 only when command1 doesn't Complete successfully
    (3) ||
    command1 || command2
    Runs the second command if the first command had an error
    (4) ()
    (command1 || command2) || (command3 & command4)
    Defines the order in which commands are to be executed
    Regards
    Suraj

  • FTP - Run OS Command before file processing

    Hi,
    I have a requirement wherein I need to FTP a file from XI to a folder in a FTP server . Now FTP Server is set up in such a way that I cannot put the file directly. Before transferring the file , I have to use CD ( change directory command ) to access a particular folder and then transfer the file. This means that I cannot give the folder information directly to TARGET DIRECTORY.
    To address this, I decided to use the feature "Run OS Command BEFORE file processing " . And wrote a command 'cd <foldername> .It is not working. Then I tried using "Run OS Command AFTER file processing "  and it also didnot work.
    Does anyone have any clue how can I address this requirement using FILE Adapter.
    thanks,
    rakesh

    HI,
    OS commands will be executed in XI server not in the FTP server. So first you need to connect into FTP server and then you need execute CD command.
    option 1) Get the absolute path ie direct path from FTP server so that you can directly connect to FTP server's specific directoty
    22) In this case , write the file into your XI server itself by NFS File Transport protocol. Then ftp this file from your XI server into FTP server using Shell Script.
    So write a shell script which will be executed in the XI server, inside this write a logic of tranfer of files with FTP protocol. This shell script is executed from the Reciever File adapter with the option OS command.
    Hope this helps,
    Regards,
    Moorthy

  • RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESSING

    hi.
    just i want to know what is the purpose of run operating system command before message processing,after message processing under file sender adapter.
    waiting for your great answer.
    bye.
    regards.
    seeta ram.

    Hello Seeta,
    let me see if I give it using a simple scenario that I implamented : i nedd to transfer a very large file from one server to the other by XI.
    to save space and network traffic I use an OS command before picking up the file to run a zip command to zip the file.
    after I transfer the file to the target server I run another OS command after the transfer to unzip the file.
    now to your second question:
    the before Os command on the target server is used mostly for checks (make sure there isn't a file by that name or backing up existing data)
    and the after sender OS command is usualy for backing up or erasing existing files (cause it is done only after the first part was finished succesfully).
    Uri Lifshitz.
    p.s.
    there was a blog obout this titled "XI as a huge file mover"
    and you can see a description and my scripts at https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/03/additionaltipsforusingXIasahugefiletransfer%28withbatchscripts%29&

  • Running Multiple LIRC/[Other App] Instances in systemd Service

    I'm trying to run multiple LIRC instances (one for each device) as a systemd service. This is what my service file looks like:
    [Unit]
    Description=LIRC Daemon
    After=network.target
    [Service]
    Type=oneshot
    EnvironmentFile=/etc/sysconfig/lirc
    ExecStartPre=/bin/mkdir -p /run/lirc
    ExecStartPre=/bin/rm -f /dev/lircd /dev/lircd1
    ExecStartPre=/bin/rm -f /run/lirc/lircd /run/lirc/lircd1
    ExecStartPre=/bin/ln -s /run/lirc/lircd /dev/lircd
    ExecStartPre=/bin/ln -s /run/lirc/lircd1 /dev/lircd1
    ExecStart=/usr/sbin/lircd --device=/dev/input/event12 --output=/run/lirc/lircd1 --pidfile=/run/lirc/lircd1.pid --driver=devinput --listen=8765 /etc/lirc/lircd.conf
    ExecStart=/usr/sbin/lircd --device=/dev/input/event10 --output=/run/lirc/lircd --pidfile=/run/lirc/lircd.pid --driver=devinput --connect=localhost:8765 /etc/lirc/lircd.conf
    ExecStopPost=/bin/rm -f /dev/lircd /dev/lircd1
    ExecStopPost=/bin/rm -fR /run/lirc
    [Install]
    WantedBy=multi-user.target
    I'm having some trouble with it as the service runs the first time but not properly. Restarting the service results in an Permissions error. I'm presuming because the socket is till running despite having manually deleted all LIRC sockets.
    At the moment I'm thinking this is because service file excludes a PID assignment like:
    PIDFile=/run/lirc/lircd.pid
    Yet the two instances have their own PID assignments. What should I be putting or what's a better way to run two instances of LIRC as a service?
    Last edited by archbawks (2013-04-13 16:58:59)

    Anyone?

  • [SOLVED] Running Systemd service on login (encrypted home partition)

    Hi,
    I have a dm-crypt/LUKS encrypted home partition that's mounted via PAM on login. I'm trying to use a systemd service (profile-sync-daemon), but the service tries to start and access the home partition before the partition is mounted. The service does seem to start successfully, but it doesn't gain access to necessary files on the home partition and malfunctions later on. Is there a sane hack to somehow delay the start of the service until the relevant partition gets mounted (basically after login)? Manually starting the service after login works just as intended in this case - I'm just looking for a way to automate this process.
    I have an idea of starting the service via Openbox autostart, but I've currently failed in my attempts.
    Last edited by ggg377 (2015-05-28 18:31:10)

    Things got quite complicated and hacky as I researched this so I went out of the box a bit (or took the easy way out, whichever you prefer) and reinstalled Arch with a full disk encryption. All is fine now and I also expect to see less problems overall in the future. If anyone wants to continue researching this it would probably be a good idea to start a new thread.

  • [solved] hook to run commands when user logs in? (before bash profile)

    Is there any way to run commands when a user logs in but before the bash profile is sourced?
    For example, I have a user account with a home directory on /tmp. When the user logs in, the home directory might not exist so there will be no .bash_profile to source. I want to run a script to create the directory if necessary and copy some files into it. How can that be done?
    I thought of putting something in /etc/profile or /etc/profile.d/, but I would like to run something before the user's shell and environment become active.
    I can use /etc/rc.local to do what I want, but I would prefer a hook to ensure that everything is set right when the user logs in.
    Any ideas?
    *edit*
    Solution
    In my case, I found that I could write my own shell script and set it as a login shell. In the script, I can configure everything I need before launching the interactive shell, then clean up anything after it exits.
    Last edited by Xyne (2011-12-10 19:34:07)

    Thanks, dammannj. PAM could probably do what I need but I think I have found a simpler solution (see original post).

  • [solved] systemd service files don't allow quotes

    Why is it not possible to use quotes in
    ExecStart=
    section of systemd service files?
    For example, I can't use service file like this
    [Unit]
    Description=Pacman mirrorlist update
    [Service]
    Type=oneshot
    ExecStart=wget -O /etc/pacman.d/mirrorlist.backup "https://www.archlinux.org/mirrorlist/?country=DE&country=NL&country=PL&protocol=http&ip_version=4" && cp /etc/pacman.d/mirrorlist.backup /etc/pacman.d/mirrorlist && reflector --verbose -l 50 -p http --sort rate --save /etc/pacman.d/mirrorlist
    because systemd will not run it because of presence of quotes:
    Feb 26 08:48:36 nanoBox systemd[1]: [/etc/systemd/system/reflector.service:7] Executable path is not absolute, ignoring: wget -O /etc/pacman.d/mirrorlist.backup "URL=http...
    Feb 26 08:48:36 nanoBox systemd[1]: reflector.service lacks both ExecStart= and ExecStop= setting. Refusing.
    I can remove quotes and then the service will run, but the URL parsed to the command will be cut in half, ie it will stop on the first "&" sign and only DE mirrors will be probed.
    Is there some way around it other than creating a separate executable file and calling it from the service? I don't want to multiply unnecessary files if there's way around it.
    Last edited by Lockheed (2015-02-26 09:37:25)

    Lockheed wrote:
    Raynman wrote:"from command line" is you feeding a (command) string to a shell. Your assumption is that systemd will treat whatever you put in ExecStart exactly the same as your shell would.
    Not "is" but "was". Disappearance of that assumption was precisely the reason of starting this thread.
    I had to read this a few times, but I think you mean it as follows. You assumed you could copy from the shell to the service file and it would work the same way. Then you got an error (about the abolute path) so that assumption "disappeared". So far so good. But you didn't exactly figure out what was different, you formed a new assumption and based your thread on that:
    "systemd service files don't allow quotes" (title)
    "Why is it not possible to use quotes in ExecStart= section of systemd service files"
    "because systemd will not run it because of presence of quotes:"
    Like frank604 says, quotes were never the issue (in fact, they are one of the few things with special meaning for both the shell and systemd), yet you still seem to think they were:
    Lockheed wrote wrote:The actual wrong assumption on my part was that this command would run without quotes as service. It does not.
    It is a shame you only quote the first part of my last reply and ignore the questions in the second part. You did almost the same thing with my reply before that and I suspect you also didn't read the man page I mentioned the first time. You basically give me the impression that you think you have it all figured out (even though you come here looking for help) and my follow-up questions aren't worth your time. That usually makes me "move along" pretty quickly, but I'm trying one last time, because even though "The service now works", I'd like to see that you actually understand why it didn't work before.
    The only thing you really answered was "Changing paths to absolute made no difference.", but that shouldn't be, so when you mentioned empirical evidence, I basically repeated the question asking for some of this evidence (as in exact error messages for one or more modified ExecStart lines).
    When I take your service file and give wget an absolute path, systemd happily executes wget, but then wget complains because it gets "&&" and "cp" and "--save" etc. as arguments. Those errors are what I see in systemctl status/journal, no longer anything about an absolute path. This is because "&&" has no special meaning. You can use semicolons (";") to separate commands instead (explained in the man page section on command lines) or multiple ExecStart lines like frank604 used (which is cleaner IMO).

  • BO Edge 4.0 Installer stuck on "Run command-line executable"

    Hi,
    Our BO Edge BI Server 4.0 Installer on Windows Server 2008R2 is stuck on one of the last steps; "Run command-line executable".
    Before is was stuck on "WaitForCMSForTheFirstTime". We upped the RAM to 16GB and then the installer went past this, but after a full reset of the server and trying again it is now stuck a few steps later on "Run command-line executable". This is very frustrating, especially since there is no error message at all, no install log and the installer is just stuck indefinitely and we had to cancel it.
    At that point the Central Configuration Manager shows this:
    Apache Tomcat - Running
    BW Publisher Service - Stopped
    SAP BO Mobile Authentication Server - Stopped
    SAP BO Mobile Processing Server - Stopped
    Server Intelligence Agent - Running
    We can't deinstall from Windows to start over at this point because the installer says an install is in progress.
    What is going on?
    Help urgently needed and appreciated
    Edited by: J. Knulst on Jan 11, 2012 7:48 AM
    Edited by: J. Knulst on Jan 11, 2012 7:50 AM

    Hello,
    Yes, certain stages run for a long duration. "Run command-line executbale" runs for atleast 45 mins. It's normal.
    My suggestion would be to leave it for 45 mins-90 mins.
    Now that you have interrupted your installtion, try uninstalling it through the control panel.
    In case you can't see the software there, then you have to edit registry entries, which is very tiresome.
    Regards,
    Sonia

Maybe you are looking for