New answers tagged

3

Redshift is tied to an X server. While you can start it as part of the system startup, that's fragile; the robust way to start it is within the context of the X server session (which is broader than the X login session). There can be multiple X servers running on the same machine at a given time. They are assigned display numbers on a first-come, ...


1

Alright, being able to start the service manually sounds good. You also have to enable the service with systemctl enable radio? From the systemctl status radio it looks like the service is not enabled and thus doesn't start.


0

According to the error message, some other process (probably Apache, but maybe some other HTTP server) is running, and is listening on TCP port 80. The first step is to identify that process and stop it. The second step is to either sudo to run perforce, or to su to root, and then run perfoce, configured to listen on TCP port 80. You have to do this ...


1

Copy the postgresql unit file: cp /usr/lib/systemd/system/postgresql.service \ /etc/systemd/system/postgresql-userxy.service Then edit postgresql-userxy.service and add User= and WorkingDirectory= to the [Service] section. After that enable the service: systemctl daemon-reload systemctl enable postgresql-userxy.service


0

There are several answers to this question. If you want to check, whether a specifc device is mounted or not (i.e. your backup device), then you should check it by its UUID, which you can find out by issuing blkid. UUID="place the UUID here" TRIES=0 DEVFILE="" while [[ -z $DEVFILE ]] && [[ $TRIES -lt 5 ]]; do DEVFILE=$(blkid -U $UUID) ...


0

You're pretty close. How about: ### START CHECK start_check_mtpt() { local volume="$1" local delay=5 local tries=$[ 60 / delay ] local mounted=0 while [[ 0 = $mounted ]] && [[ $tries -ge 0 ]]; do if cut -d' ' -f2 /etc/mtab | grep -qF "${volume}" ; then mounted=1 # optional: break else sleep $delay let tries=tries-1 ...


1

while ! mount | grep "on ${volume} type" > /dev/null; do sleep $delay if [ "$delay" -gt 60 ]; then exit fi delay=$((delay+5)) done using /proc/mounts You might consider using /proc/mounts instead of the output of mount (which is just /etc/mtab). while ! grep " ${volume} " /proc/mounts &>/dev/null; do


0

Debian is using systemd now, and that has no "runlevels". Legacy commands like the one you use should work, for some value of "work".


0

The EnvironmentFile option should be set to the full path of the file containing any necessary environment variables needed for proper operation of the executable. Arguments to the executable can be included in the "ExecStart" parameter. You can find more documentation at http://www.freedesktop.org/software/systemd/man/systemd.service.html


0

Have you tried including Requires=network.target? Both my Arch and CentOS installations have this target by default. Since it's a target, it indicates that the system has reached a particular milestone in the boot process as opposed to just a single service starting. If that doesn't do it try comparing against another service unit that you know requires a ...


0

I don't know specifically about systemd, but if you're using NetworkManager, you can use nm-online at the top of your script to wait until the network is up. if nm-online; then echo "Online" # do my stuff else echo "Network error" fi By default, it'll wait 30 seconds for a network connection to become active, and return 0 (true) if it does, ...


0

I'd start with which systemctl and which service, and then look at the output of ls -l for both to see if they are the same file (via symlink) or look similar (size, etc). At least here (Fedora 23) /usr/bin/systemctl is a binary, /usr/sbin/service is a shell script that uses systemd commands to emulate the SysVinit command.


0

As the saying goes, "There's more than one way to cat a file". In this case, it's not absolutely clear what you mean by 'the same process running', so I'll explain both possible issues. If what you mean is that you have the same process ID running if you first do a 'systemctl ngix start', and then do a 'service ngix start'. This would be because if a ...


2

Usually that is ntp (the daemon named ntpd) for Network Time Protcol. For example: Network Time Protocol daemon (Arch) RHEL7: How to set up the NTP service. In Fedora, you may be looking for timedatex.service which is related to this package: timedatex is a D-Bus service that implements the org.freedesktop.timedate1 interface. It can be used to read ...


0

sudo strace -f -e trace=process service nginx status 2>&1 | grep systemctl


1

Custom services should stay in /etc/systemd/system. Since you are doing forking, what I would do is use the PIDFile= directive. When the service is stopped, it will delete the file. However, on startup, it will not write to the file. It's up to your service to write to it. The recommended place to have it write to is /run.


0

You really need to dig to find the root cause. Blindly putting chkconfig on every runlevel is not going to resolve the issue. Check /var/log/messages for startup issues/errors. Put set -x right after #!/bin/sh in /etc/init.d/openfire -- It will debug the script for you.



Top 50 recent answers are included