Help create systemd .service file for Teeworlds server

Hi there.
I maintain one package the provide server for the game Teeworlds (teeworlds-zcatch in AUR). I'd like to have a ".service" file to be able to run the server in background, maybe even in startup, and saving the log (it send some stuff to stdout that could be nice to keep). However I don't know how to make a ".service" script. Could somene create a script or point me out to informations about it?
Thanks in advance

Hi.
https://bbs.archlinux.org/viewtopic.php … 9#p1363959
There I explain a little a .service that I'm using. Maybe it be useful.
And in this wikipage there are several examples
https://wiki.archlinux.org/index.php/Systemd/Services

Similar Messages

  • [SOLVED] systemd .service file for ruby rainbows server

    I am trying to create a systemd .service file for a ruby rainbows server.
    http://rainbows.rubyforge.org/
    does anybody have experience with a forking deamon under systemd?
    Mine immediatley terminates after starting.
    Last edited by wabi (2013-01-03 11:11:02)

    This is a .service file that will work:
    [Unit]
    Description=Redmine Rainbows Rails server
    [Service]
    Type=forking
    SyslogIdentifier=redmine
    User=http
    PIDFile=/var/www/redmine/tmp/pids/rainbows.pid
    WorkingDirectory=/var/www/redmine
    ExecStart=/usr/bin/bundle exec rainbows --host 127.0.0.1 --port 8001 --env production --daemonize --config-file /var/www/redmine/config/rainbows.rb
    ExecReload=/bin/kill -HUP $MAINPID
    ExecStop=/bin/kill -QUIT $MAINPID
    [Install]
    WantedBy=multi-user.target
    Last edited by wabi (2013-01-03 11:11:38)

  • ITS 620 - how to create a service file for SAPGUI for HTML option

    Hi,
    We have the following configuration :
    ITS 620 installed
    IIS webserver
    NTLM Authentication on webserver
    SAP 46C
    We have some reports that use the IACs option of creating ITS reports and we are able to create the service files using webstudio where we can save a service id and password so that when the ITS page is called, it logs on the user directly into the system.
    Now, we are trying to create a new ITS page for a custom Z transaction and would like to use the SAPGUI for HTML option so that we do not have to use Webstudio to create and modify the HTML pages.
    When I call the ITS page for the new transaction, it brings up the logon screen for the user, which we want to avoid. If I create a new service file for this Z transaction without any HTML pages then I get an error.
    Is there a way to copy the WEBGUI.SRVC file to a custome SRVC file, I tried to create to copy it to a test file called ZTEST.SRVC for my test transaction called ZTEST and now I get an error.
    thanks in advance
    N.S.

    Hello N.S.
    You can create a service file, like ZSERVICE.SRVC.  The parameters should be:
    ~webgui 1
    ~transaction ztransaction
    ~client  001
    ~login   username
    ~password  password
    ~language  EN
    The "~webgui 1" allows the ITS to use the Webgui to dynamically generate the page (no IAC needed.)
    The "~transaction" is the transaction code of your service.
    The "~client" is the client number.
    The "~login" is the username.
    The "~password" is the user's password.
    the "~language" is the language for the users.
    Note that the last four are required for automatic logon.  If end users use a variety of languages though the ~language can be prepended to the URL to support different languages.  (Leave it blank in the srvc file then.)
    Edgar

  • Help creating custom XMP file for Photoshop CS5

    I was wondering if there is anyone out there that would be willing to help me create a custom XMP file for Photoshop CS5. What I need is very simple, I really just don't know how to go about creating it myself.
    Feel free to email me at [email protected]

    Hi Robert,
    please have a look at the "Generic Panel" example of the File Info SDK.
    Using that you only need to create a simple XML-file to create a simple custom panel.
    -- Stefan Makswit

  • [SOLVED] Trying to write HLDS systemd service file

    Hey,
    I want to write a systemd service file for my HLDS AUR package: https://aur.archlinux.org/packages/hlds/
    My environment file looks like this:
    HLDS_USER=root
    HLDS_WORKINGDIR=/opt/hlds
    HLDS_PARAMS="-game cstrike"
    HLDS_LOGFILE=/var/log/hlds_cstrike
    The service file like this:
    After=network.target
    [Service]
    #EnvironmentFile=/etc/conf.d/hlds
    #User=${HLDS_USER}
    #WorkingDirectory=${HLDS_WORKINGDIR}
    ExecStart=/opt/hlds/hlds_run -game cstrike
    ExecStop=/bin/kill $MAINPID
    [Install]
    WantedBy=multi-user.target
    But systemd fails to start the service:
    hlds.service - Half-Life Dedicated Server
              Loaded: loaded (/usr/lib/systemd/system/hlds.service; disabled)
              Active: failed (Result: exit-code) since Thu, 2013-01-03 06:20:49 CET; 2s ago
             Process: 567 ExecStop=/bin/kill $MAINPID (code=exited, status=1/FAILURE)
             Process: 564 ExecStart=/opt/hlds/hlds_run -game cstrike (code=killed, signal=INT)
              CGroup: name=systemd:/system/hlds.service
    Jan 03 06:20:49 playground systemd[1]: Starting Half-Life Dedicated Server...
    Jan 03 06:20:49 playground systemd[1]: Started Half-Life Dedicated Server.
    Jan 03 06:20:49 playground hlds_run[564]: Invalid game type 'cstrike' sepecified.
    Jan 03 06:20:49 playground hlds_run[564]: Thu Jan  3 06:20:49 CET 2013: Server Failed
    Jan 03 06:20:49 playground kill[567]: usage: kill [ -s signal | -p ] [ -a ] pid ...
    Jan 03 06:20:49 playground kill[567]: kill -l [ signal ]
    Jan 03 06:20:49 playground systemd[1]: Unit hlds.service entered failed state
    Running
    /opt/hlds/hlds_run -game cstrike
    manually works quote well
    Someone knows how to proceed? Thanks
    Last edited by onny (2013-01-03 05:43:49)

    Solved. It didn't recognized the workingdir correctly ...

  • Systemd - help with creating a service file

    Hi, I am trying to make a service file to execute "devmon --no-mount --exec-on-audio abcde". Basicly I want abcde to run when an audio cd is inserted into a headless computer. I have tried some udev rules but had no luck with that.
    I then found udevil and devmon, and it seems to do exectly what I want.
    So Ive made a systemd service file and put it in to /usr/lib/systemd/system
    here is it:
    /usr/lib/systemd/system/abcde-auto.service
    [Unit]
    Description=Virtual Distributed Ethernet
    [Service]
    Type=simple
    ExecStart=/usr/bin/devmon --no-mount --exec-on-audio abcde
    [Install]
    WantedBy=multi-user.target
    I have started this with
    systemctl start abcde-auto.service
    and I see that a devmon process has started with the same arguments I gave in the service file, so all is good.
    But now, I am not too sure about the "Type" in the service file, devmon starts abcde, but:
    systemctl stop abcde-auto.service
    does not stop abcde, only devmon.
    Is there a way to setup the service file so that abcde will end as well as devmon?
    *Edit
    Ive read this http://www.freedesktop.org/software/sys … rvice.html but Im still not too sure. Dont really know what most of it means.
    Last edited by jrussell (2012-10-20 18:09:23)

    I use type 'oneshot' and add an ExecStop= to start and stop scripts.
    Like here is the unit file I use to start and stop arno-iptables-firewall
    [Unit]
    Description=Arno iptables firewall
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/usr/sbin/arno-iptables-firewall start
    ExecStop=/usr/sbin/arno-iptables-firewall stop
    [Install]
    WantedBy=multi-user.target

  • Hi all, i'm new and facing a problem while creating a new file for Xcode. I can't select the box "with XIB for user interface" if the subclass is "UIViewController".this problem happen after i upgrade Xcode to 4.6 version.Appreciate for any help rendered.

    Hi all, i'm new to Mac book & Xcode. I'm learning and facing problems while creating a new file for Xcode. Before i upgrade the software, i have no issue to create simple steps in apps. After upgrade Xcode to 4.6 version, i'm facing lot's of issue eg.
    1) "the identity "iphone developer" doesn't match any valid certificate/ private key pair",
    2) can't select the box "with XIB for user interface" if the subclass is "UIViewController"..
    Appreciate for any help rendered.

    Mikko777 wrote:So what is the best?
    I wouldn't judge. I've been to Arch for a week, you know? But as said, it's VERY close to it.
    What I dislike after a week is makepkg not handling dependencies automatically (which would be overhead, so probably not appropriate).
    Mikko777 wrote:Also theres KDEmod for modular kde, dunno if its for 64 bits tho.
    Don't actually need that as said ... I see no real benefit of having that other than not beeing a KDE user or having Gentoos useflags.
    Mikko777 wrote:PS:You produce a lot of text and welcome smile
    Yeah. Wonder why I'm still employed? So do I ...

  • Looking for an off line version of the help file for lion server that I can print

    I would like to find an offline version of the help file for lion server
    Im a newbie trying to set up a home server for our macs and Iphones

    Go to this URL using Safari on your mac:
    https://help.apple.com/advancedserveradmin/mac/10.7/print.html?lang=en#printBook
    Then press cmd+p and from the print menue choose PDF and then Save as PDF and there you have it.

  • Creating an IBus systemd service file

    I currently start ibus-daemon with the following in my ~/.xprofile:
    ibus-daemon --daemonize --xim
    The thing is this does not display very nicely in the output of `systemctl status`; there're several ibus related processes listed, all in the same process Group ID. I figure if I write an ibus.service and manage it with systemctl, they would be grouped together in the output of `systemctl status`, correct?
    In any case, I'm trying to write an IBus systemd service file. What I have so far:
    [Unit]
    Description=Intelligent Input Bus
    Documentation=man:ibus-daemon(1)
    [Service]
    Type=dbus
    BusName=org.freedesktop.IBus
    ExecStart=/usr/bin/ibus-daemon --replace --xim --panel disable
    ExecReload=/usr/bin/ibus restart
    ExecStop=/usr/bin/ibus exit
    [Install]
    WantedBy=default.target
    I put the above in file ~/.config/systemd/user/ibus.service and tried
    % systemctl --user start ibus.service
    For 90 seconds the command didn't return. In that time, ibus-daemon was in fact started, I used the command `ibus` to check that the Bus part was working normally. 90 seconds later systemd bailed out,
    Job for ibus.service failed. See 'systemctl status ibus.service' and 'journalctl -xn' for details.
    Nothing useful in the journal, really,
    systemd[388]: Starting Intelligent Input Bus...
    systemd[388]: ibus.service start operation timed out. Terminating.
    systemd[388]: Failed to start Intelligent Input Bus.
    systemd[388]: Unit ibus.service entered failed state.
    What was not working during the 90 seconds was I couldn't actually use IBus to input anyting. I was able to switch engines with `ibus engine <foo>` but if then I started typing IBus was not used at all.
    Compare the process tree between manually running ibus-daemon and using systemctl start,
    ibus-daemon --replace --xim --panel disable
    systemd,1,1
    |-gnome-terminal-,485,440
    | |-zsh,7299,7299
    | | `-ibus-daemon,9732,9732 --replace --xim --panel disable
    | | |-ibus-dconf,9736,9732
    | | | |-{dconf worker},9743,9732
    | | | |-{gdbus},9742,9732
    | | | `-{gmain},9740,9732
    | | |-{gdbus},9739,9732
    | | `-{gmain},9733,9732
    `-ibus-x11,9738,9732 --kill-daemon
    |-{gdbus},9746,9732
    `-{gmain},9745,9732
    systemctl --user start ibus
    systemd,1,1
    `-systemd,388,388 --user
    |-(sd-pam),390,388
    `-ibus-daemon,9911,9911 --replace --xim --panel disable
    |-ibus-dconf,9914,9911
    | |-{dconf worker},9921,9911
    | |-{gdbus},9919,9911
    | `-{gmain},9917,9911
    |-{gdbus},9920,9911
    |-{gmain},9912,9911
    `-{pool},9926,9911
    I see two differences: 1) ibus-x11 is present only if ibus-daemon is run manually; 2) Note the {pool} process in the systemctl case.
    UPDATE²
    ibus-x11 will fail to start silently if the DISPLAY env is not set, which is the case in the systemd env. Damn. When I set Environment="DISPLAY=:0" ibus-x11 is started just fine.
    So the question remaining here, is why Type=dbus does not work?
    I also tried to comment use Type=simple without BusName= to the same result.
    UPDATE
    I forgot to systemctl daemon-reload!
    With Type=simple ibus-daemon *is* started. BUT, ibus-x11, which is supposed to be started with the --xim option, is not started. I guess it's because it forks? I'll try something.
    I do feel it should be Type=dbus though, and I also found a file, part of the gnome-settings-daemon package, /usr/share/dbus-1/services/org.freedesktop.IBus.service with the content:
    [D-BUS Service]
    Name=org.freedesktop.IBus
    Exec=/usr/bin/ibus-daemon --replace --xim --panel disable
    Any idea how to make systemd happy?
    Last edited by lolilolicon (2014-07-31 14:10:37)

    The first post is too long... Let me update the status with a new post.
    The user service file currently looks like this:
    # [email protected]
    [Unit]
    Description=Intelligent Input Bus
    Documentation=man:ibus-daemon(1)
    [Service]
    Environment="DISPLAY=%I"
    ExecStart=/usr/bin/ibus-daemon --replace --xim --panel disable
    ExecReload=/usr/bin/ibus restart
    ExecStop=/usr/bin/ibus exit
    [Install]
    WantedBy=default.target
    And you can enable it for the current DISPLAY via
    % systemctl --user enable "ibus@$DISPLAY.service"
    DISPLAY must be set for the --xim option to work.
    According to systemd.exec(5), "processes started by user systemd instances inherit all environment variables from the user systemd instance". But at the time the user systemd instance is started, the DISPLAY env is not set yet, so I'm using the %I place holder here.
    Although there doesn't seem to be much benefit, I still wonder why Type=dbus doesn't work. Is systemd looking for the wrong bus?

  • [solved] Writing systemd service file - forking no pidfile

    Hey all,
    I am trying to write .service files for TORQUE, but am having some difficulty and quite can't understand the docs.  Here's what I have so far for the server
    [Unit]
    Description=TORQUE server
    Wants=basic.target
    After=basic.target network.target
    [Service]
    Type=forking
    PIDFile=/run/torque-server.pid
    ExecStart=/usr/sbin/pbs_server
    [Install]
    WantedBy=multi-user.target
    The problem I'm having is with the PIDFile - pbs_server doesn't provide an option (as far as I can see) to specify a pid file... is this something that systemd can generate on its own, or what's the normal solution here?
    Without the PIDFile specified systemctl start returns immediately and no process exists, with the PIDFile systemctl start stalls for a while and then has an error saying it couldn't find the pid file (surprise), but pbs_server is left running.
    Thanks for any help
    Last edited by dandaman0061 (2012-12-13 19:58:36)

    Nevermind - it appears that pbs_server creates a pid file at $TORQUE_HOME/server_priv/server.lock where using torque from the AUR is /var/spool/torque
    Chaging the pidfile setting in the service file to this now works.

  • Getting sasc-ng to work properly with systemd service files [SOLVED]

    This thread is intended for getting the following AUR packages to work with each other with systemd service scripts:
    https://aur.archlinux.org/packages/open-sasc-ng-dkms/
    https://aur.archlinux.org/packages/open-sasc-ng/
    https://aur.archlinux.org/packages/oscam-svn/   (this is a related package as it must properly execute prior to sasc-ng)
    So my server is now on a fresh Arch install with systemd. All is well (& very fast) except I cannot get sasc-ng to function with systemd service init files. Prior to systemd the system worked fine with the rc initscripts & was very stable with the following setup:
    rc.local
    /etc/rc.d/oscam start
    sleep 15
    /etc/rc.d/sasc-ng start
    sleep 4
    /etc/rc.d/mythbackend start
    /etc/conf.d/sasc-ng.conf
    SASCNG_ARGS="-j 0:3 -j 1:4 -j 2:5" -b 16M --sid-allpid --sid-nocache --cam-budget"
    DVBLOOPBACK_ARGS="num_adapters=3"
    LOGDIR="/home/mythtv/logs/"
    CAMDIR="/etc/camdir"
    /etc/camdir/cardclient.conf
    camd35:localhost:15050:1/0000/0000:mythtv:mythtv
    I'll leave out the oscam stuff as that loads fine and doesn't appear to be a part of the problem
    I've tried this with the systemd service file that comes with the open-sasc-ng-dkms package and when it was not sucessful I tried a bunch of variants including using "Type=simple" ect. "Type=Forked" seems to be only option that actually tries to start the processes. I also "hardcoded" the service files for the 2 sasc-ng components to find a few issues with the EnvironmentFile variables. The log variable has been removed for now as this seems to cause a fatal error but the rest of the variables load fine now. I also tested spliting up the DVB loopback module from the sasc-ng binary but this also gives similar results as the following script stands now. Running them manually with systemctl start commands doesn't make a difference but that is not surprising. The service file I'm fiddling with now which I feel has the best potential become working is:
    sasc-ng.service
    [Unit]
    Description=Sasc-ng
    After=oscam.service
    [Service]
    Type=forking
    EnvironmentFile=/etc/conf.d/sasc-ng
    ExecStartPre=/sbin/modprobe dvbloopback $DVBLOOPBACK_ARGS
    TimeoutSec=2
    ExecStart=/usr/sbin/sasc-ng -D $SASCNG_ARGS --cam-dir=$CAMDIR
    TimeoutSec=4
    [Install]
    WantedBy=multi-user.target
    Mythbackend always runs fine (even without DTV via sasc-ng) with the following mythbackend.service:
    [Unit]
    Description=MythTV_backend
    After=sasc-ng.service
    [Service]
    Type=simple
    Environment=MYTHCONFDIR=/etc/conf.d/mythbackend
    Environment=HOME=/usr/share/mythtv
    User=mythtv
    ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv
    [Install]
    WantedBy=multi-user.target
    oscam.service taken mostly from AUR package also seems fine. I added the TimeoutSec=15 to give time for oscam to load the SC and client protocol before moving on or else sasc-ng fails
    Unit]
    Description=An Open Source Conditional Access Module software
    After=network.target
    [Service]
    Type=forking
    EnvironmentFile=/etc/conf.d/oscam
    ExecStart=/usr/bin/oscam $OSCAM_ARGS
    TimeoutSec=15
    [Install]
    WantedBy=multi-user.target
    Below is the output of the systemctl status commands. Despite the noise in the sasc-ng binary status, it is the loopback module that is " inactive (dead)" and there are no virtual DVB devices being created:
    [mythtv@server ~]$ sudo systemctl status oscam.service
    oscam.service - An Open Source Conditional Access Module software
    Loaded: loaded (/usr/lib/systemd/system/oscam.service; enabled)
    Active: active (running) since Tue, 2012-11-27 21:10:17 CET; 1min 7s ago
    Process: 338 ExecStart=/usr/bin/oscam $OSCAM_ARGS (code=exited, status=0/SUCCESS)
    Main PID: 377 (oscam)
    CGroup: name=systemd:/system/oscam.service
    ├ 377 /usr/bin/oscam -b -c /etc/oscam
    └ 378 /usr/bin/oscam -b -c /etc/oscam
    Nov 27 21:10:17 server systemd[1]: Started An Open Source Conditional Acces...e.
    [mythtv@server ~]$ sudo systemctl status loopback.service
    loopback.service - Sasc-ng DVB Loopback Module
    Loaded: loaded (/etc/systemd/system/loopback.service; enabled)
    Active: inactive (dead) since Tue, 2012-11-27 21:10:28 CET; 1min 27s ago
    Process: 907 ExecStart=/sbin/modprobe dvbloopback num_adapters=3 (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/loopback.service
    Nov 27 21:10:28 server systemd[1]: Started Sasc-ng DVB Loopback Module.
    [mythtv@server ~]$ sudo systemctl status sasc-ng.service
    sasc-ng.service - Sasc-ng
    Loaded: loaded (/etc/systemd/system/sasc-ng.service; enabled)
    Active: failed (Result: exit-code) since Tue, 2012-11-27 21:10:47 CET; 1min 45s ago
    Process: 913 ExecStart=/usr/sbin/sasc-ng -D -j 0:3 -j 1:4 -j 2:5" -b 16M --sid-allpid --sid-nocache --cam-budget --cam-dir=/etc/camdir -l /home/mythtv/logs/sasc-ng.log (code=exited, status=0/SUCCESS)
    Main PID: 921 (code=exited, status=255)
    CGroup: name=systemd:/system/sasc-ng.service
    Nov 27 21:10:39 server sasc-ng[921]: [921] [general.error] failed open /etc...ry
    Nov 27 21:10:40 server sasc-ng[921]: [921] [general.error] failed open /etc...ry
    Nov 27 21:10:40 server sasc-ng[921]: [921] [general.error] failed open /etc...ry
    Nov 27 21:10:40 server sasc-ng[921]: [921] [general.info] loading cardclien...nf
    Nov 27 21:10:42 server sasc-ng[921]: [1062] Netwatcher thread started (pid=...6)
    Nov 27 21:10:42 server sasc-ng[921]: [921] [general.error] no keys loaded f...m!
    Nov 27 21:10:46 server sasc-ng[921]: [1098] SC housekeeper thread started (...2)
    Nov 27 21:10:47 server sasc-ng[921]: [1062] Netwatcher thread ended (pid=92...6)
    Nov 27 21:10:47 server systemd[1]: sasc-ng.service: main process exited, co.../a
    Nov 27 21:10:47 server systemd[1]: Unit sasc-ng.service entered failed state
    [mythtv@server ~]$ sudo systemctl status sasc-ng.service
    sasc-ng.service - Sasc-ng
    Loaded: loaded (/etc/systemd/system/sasc-ng.service; enabled)
    Active: failed (Result: exit-code) since Tue, 2012-11-27 21:10:47 CET; 2min 9s ago
    Process: 913 ExecStart=/usr/sbin/sasc-ng -D -j 0:3 -j 1:4 -j 2:5" -b 16M --sid-allpid --sid-nocache --cam-budget --cam-dir=/etc/camdir -l /home/mythtv/logs/sasc-ng.log (code=exited, status=0/SUCCESS)
    Main PID: 921 (code=exited, status=255)
    CGroup: name=systemd:/system/sasc-ng.service
    Nov 27 21:10:39 server sasc-ng[921]: [921] [general.error] failed open /etc/camdir/smartcard.conf: No such file or directory
    Nov 27 21:10:40 server sasc-ng[921]: [921] [general.error] failed open /etc/camdir/cardslot.conf: No such file or directory
    Nov 27 21:10:40 server sasc-ng[921]: [921] [general.error] failed open /etc/camdir/SoftCam.Key: No such file or directory
    Nov 27 21:10:40 server sasc-ng[921]: [921] [general.info] loading cardclient config from /etc/camdir/cardclient.conf
    Nov 27 21:10:42 server sasc-ng[921]: [1062] Netwatcher thread started (pid=921, tid=140074379712256)
    Nov 27 21:10:42 server sasc-ng[921]: [921] [general.error] no keys loaded for softcam!
    Nov 27 21:10:46 server sasc-ng[921]: [1098] SC housekeeper thread started (pid=921, tid=140074371319552)
    Nov 27 21:10:47 server sasc-ng[921]: [1062] Netwatcher thread ended (pid=921, tid=140074379712256)
    Nov 27 21:10:47 server systemd[1]: sasc-ng.service: main process exited, code=exited, status=255/n/a
    Nov 27 21:10:47 server systemd[1]: Unit sasc-ng.service entered failed state
    [mythtv@server ~]$
    Any ideas?
    Last edited by wdirksen (2012-12-10 19:54:43)

    After some head scratching it seems to be all good now. Considering there have been no replies to this I've come to wonder if I might be the only one with this issue. I could get it working somewhat using service files but never ideal, ex. sasc-ng only using a few of the entitlements from oscam because it started too quick etc. Anyway this might help a few and I'm hoping the linux savvy who find what I'm writing here painfully newbie like or flawed will reply and educate me a bit if what's provided here needs some sharpening up:
    1) Systemd was confusing the sasc-ng binary shorthand arguments with Linux init arguments and a few were misinterpreted if they were not nested into the environment specifiers. So the -l (log) was causing problems and -b (buffer) wasn't loading. To be safe I'm using only the sasc-ng longhand specifiers from now on (two "--" and more verbose) so that they can never be confused even if safely nested in an environment parameter. That means that /etc/conf.d/sasc-ng will also need to be changed to reflect this. I also decided to simplify the LOGFILE parameter to include the whole argument syntax.
    2) Oscam.service needs to be initiated with oneshot and RemainAfterExit=yes to make sure the delay (15 seconds in my config) gets counted out before sasc-ng initiates.
    [EDIT 12/12/2012: Initially I had a second TimeoutSec=2 after ExecStart in sasc-ng.service but this had no function. Turns out that it almost always does work without this delay but not always with my setup. Adding TimeoutSec=2 to mythbackend.service prior to ExecStart command does function and makes things init more consistant]
    sasc-ng.service
    [Unit]
    Description=Sasc-ng
    After=oscam.service
    [Service]
    Type=simple
    EnvironmentFile=/etc/conf.d/sasc-ng
    ExecStartPre=/sbin/modprobe dvbloopback $DVBLOOPBACK_ARGS
    TimeoutSec=2
    ExecStart=/usr/sbin/sasc-ng $SASCNG_ARGS --cam-dir $CAMDIR --log $LOGFILE
    [Install]
    WantedBy=multi-user.target
    /etc/conf.d/sasc-ng
    SASCNG_ARGS="--join 0:3 --join 1:4 --join 2:5 --buffer 16M --sid-allpid --sid-nocache --cam-budget"
    DVBLOOPBACK_ARGS="num_adapters=3"
    LOGFILE="/home/mythtv/logs/sasc-ng.log"
    CAMDIR="/etc/camdir"
    oscam.service
    [Unit]
    Description=An Open Source Conditional Access Module software
    After=network.target
    [Service]
    Type=oneshot
    EnvironmentFile=/etc/conf.d/oscam
    ExecStart=/usr/bin/oscam $OSCAM_ARGS
    TimeoutSec=15
    RemainAfterExit=yes
    [Install]
    WantedBy=multi-user.target
    mythbackend.service
    [Unit]
    Description=MythTV_backend
    After=sasc-ng.service
    [Service]
    Type=simple
    TimeoutSec=2
    Environment=MYTHCONFDIR=/etc/conf.d/mythbackend
    Environment=HOME=/usr/share/mythtv
    User=mythtv
    ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv
    [Install]
    WantedBy=multi-user.target
    I will make the related changes to the open-sasc-ng AUR package which I currently maintain
    Last edited by wdirksen (2012-12-23 14:40:43)

  • [SOLVED] Help with systemd .service script

    Hello,
    I have been using ArchLinux (ARM version) on some “plug computers” for over a year and love it.  Recently I forced myself to move to systemd by upgrading all my computers from scratch.  I migrated all my applications and learned new ways of doing things but am having trouble with one last migration.  I run a c++ communication program that monitors a TCP port for traffic.  In the past I started this program (daemon) from an entry in rc.conf.  I have read all I can about systemd’s new approach to starting daemons (https://wiki.archlinux.org/index.php/Systemd and https://wiki.archlinux.org/index.php/Systemd/Services)
    So far I created what I thought is the correct systemd .service file listed below.
    [Unit]
    Description=EQBCS
    After=network.target
    [Service]
    Type=simple
    ExecStart=/home/public/EQBCS/eqbcs -p 12947 -d &> /dev/null
    [Install]
    WantedBy=multi-user.target
    I put this file in /usr/lib/systemd/system/eqbcs.service.  I then ran the following commands in the following order:
    systemctl daemon-reload
    systemctl enable eqbcs.service (created a link in /etc/systemd/system/multi-user.target.wants)
    systemctl start eqbcs.service
    Here is output from systemctl (status)
    eqbcs.service                                 loaded failed failed    EQBCS
    I thought this would start the service but no luck.  I also thought maybe a reboot would work but no luck.  I verified I can start the daemon manually if I run /home/public/EQBCS/eqbcs -p 12947 -d &> /dev/null from the command line.
    I think I am close, but after several hours of looking at examples of .service files and other posts, I am at a loss.  I am not one of those types who posts a question without taking the time to read the wealth of information on these boards, but I am truly out of ideas and can’t figure out what to do next.  I sincerely could use some help/advice.
    Last edited by calzon65 (2013-06-01 21:18:20)

    Thank you for the suggestions, I believe I am getting closer to success. When I run systemctl start eqbcs.servcie it starts the service but the only way I can get out of systemctl is to ^c out.
    Here is my current .service file:
    [Unit]
    Description=EQBCS
    After=network.target
    [Service]
    ExecStart=/home/public/EQBCS/eqbcs -p 12947
    Type=forking
    [Install]
    WantedBy=multi-user.target
    Output from systemctl status eqbcs:
    eqbcs.service - EQBCS
       Loaded: loaded (/etc/systemd/system/eqbcs.service; enabled)
       Active: failed (Result: timeout) since Sat 2013-06-01 12:48:43 PDT; 2min 11s ago
      Process: 427 ExecStart=/home/public/EQBCS/eqbcs -p 12947 (code=killed, signal=TERM)
    Main PID: 396 (code=killed, signal=KILL)
       CGroup: name=systemd:/system/eqbcs.service
    Jun 01 12:47:13 alarm systemd[1]: Starting EQBCS...
    Jun 01 12:47:13 alarm eqbcs[427]: WARNING: Running as root NOT recommended.
    Jun 01 12:47:13 alarm eqbcs[427]: EQ Box Chat Server 10.12.18
    Jun 01 12:47:13 alarm eqbcs[427]: Waiting for connections on port: 12947...
    Jun 01 12:48:43 alarm systemd[1]: eqbcs.service operation timed out. Terminating.
    Jun 01 12:48:43 alarm systemd[1]: Failed to start EQBCS.
    Jun 01 12:48:43 alarm systemd[1]: Unit eqbcs.service entered failed state.
    Are there any other suggestions for settings in my .service file?

  • Connect Azure Pack to Service Bus for Windows Server with Custom DNS

    Hello! I'm trying to configure Azure Pack to use Service Bus for Windows Server 1.1 with Custom DNS.
    All runs on one virtual machine (Windows Server 2012 R2) in Windows Azure.
    I following this post:
    roysvork.wordpress.com/2014/06/14/developing-against-service-bus-for-windows-1-1
    Replace FramDNS "servicebus" to "mymachine.cloudapp.net", and create certificate:
    SelfSSL /N:CN=mymachine.cloudapp.net /V:1000 /T
    On Windows Azure Virtual Machine:
    1.I'll set publuc DNS: mymachine.cloudapp.net
    2.Open ports: 10354,10355,10356,10359,10000-10004
    3.In hosts file: 127.0.0.1 mymachine.cloudapp.net
    4.Create certificate:
    SelfSSL /N:CN=mymachine.cloudapp.net /V:1000 /T
    PowerShell:
    Stop-SBFarm –Verbose
    Set-SBFarm -FarmDns 'mymachine.cloudapp.net'
    Update-SBHost –Verbose
    Start-SBFarm –Verbose
    New-SBAuthorizationRule -NamespaceName ServiceBusDefaultNamespace -Name MainRule -Rights Manage, Send, Listen
    Afther that i can connect to my ServiceBusDefaultNamespace with SAS.
    It's work perfect. But, When I try to create Service Bus Namespace from Azure Pack Tenant portal - in Log an Exception:
    Namespace Provisioning Exception. TrackingId: . SystemId: . Namespace: SomeNamespace.
    Method: Activating. Exception: System.Net.Http.HttpRequestException: An error occurred while
    sending the request. ---> System.Net.WebException: The underlying connection was closed:
    Could not establish trust relationship for the SSL/TLS secure channel. --->
    System.Security.Authentication.AuthenticationException: The remote certificate is invalid according
    to the validation procedure.
    And status of namespace - Activating.
    Please help!

    Hi Alexander,
    According to the log, it seems that the validation process of the certificate failed.
    Please make sure that the certificate is installed in the client properly.
    Usually, self-signed certificate should be installed in the Computer Account-->Trusted Root Certificate Authorities.
    Best Regards.
    Steven Lee Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • [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).

  • How to create different log files for each of web applications deployed in OC4J

    Hi All,
    I am using OC4J(from Oracle) v1.0.2.2 and Windows2000. Now I want to know
    1. how to create different log files for each of my deployed web applications ?
    2. what are the advantages in running multiple instances of oc4j and in what case we should run
    multiple instances of OC4J ?
    3. how to run OC4J as Windows2000 Service rather than Windows2000 Application ?
    Thanks and Regards,
    Kumar.

    Hi Avi,
    First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
    I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
    I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
    Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
    Thanks and Regards,
    Ravi.

Maybe you are looking for

  • Can't adjust clip duration of still photos in iMovie '11

    Anyone having the same problem? I inserted a still photo in one of my projects in iMovie which has a a clip duration of 5s when added. I clicked the cogwheel icon then chose the inspector to adjust the duration. I've managed to changed it to 3s but a

  • My ipad 2 wont recieve emails, but it can send emails

    It seems that I can send emails but I can't revceive them.  I'm wondering how to fix it.

  • Best Practise for CRM

    Hi, I have installed BP for CRM and doing config for SAP CRM Standalone Integration. I have selected all scenarios in the scope including interactive reporting. Our main focus is interactive reporting which needs another client in same CRM system. I

  • CMS Inbox folder missed

    Hi, I am getting error Directory not found (check existence and permissions ): Inbox while click on check-in tab and also found check-in button is disabled, then found inbox folder not there in EPS folder. I would like to know what would be the impac

  • Reminder Database

    Hi, I have accidentally overwritten one of my reminders in the new Mountain Lion Reminders application.  I want to roll back using my time machine, but not sure what directory, file I should be rolling back.  I cant roll everything back as it was a c