You did execute the unit file. That does not work. It's not a script.
a) Change your unit file to:
b) Change your script(check.sh)
Don't sent websockify to background, let it run in foreground. Both is possible, but letting it run in foreground is simpler. Run the tests before websockify not after. (tests are not needed really needed anyway, you have systemctl status). You may add set -x to the start of your script to see what's being run with systemctl status. (or journalctl -u check.service)
You may add debug command line options to the websockify call. Anything that is printed on stdout will be in the log you get with systemctl status / journalctl.
New in Unix, I am adding a line "route add 57.14.y.y 57.14.x.x" every day after rebooting the system. Where can I add the line so during boot up (the system is re-started every day by design (???) the line is executed? (I tried the /etc/rc2.d/S90 but for some reason the line needs to be added... (2 Replies)
Hi friends i have a script "backup.sh" which is stored in "/var/lib/pgsql" directory.
I want it to run as a cron so that it executes every time the system starts.
I tried the follwing method
I logged in as the root user and typed "crontab -e"
The file was completly blank so i put the... (3 Replies)
Hi,
I would like to know in which file I can get the option of enabling/disabling of running fsck on particular file system.
As I know in /etc/filesystems these parameter should be there just like in Linux /etc/fstab
I have created file system aix test but unable to find the option of... (1 Reply)
Hi
I need the below script to be started whenever I reboot my aix server ?
#cat cdbegin
/cdirect/cdunix/ndm/bin/cdpmgr -i /cdirect/cdunix/ndm/cfg/cbspsdb01/initparm.cfg
Please suggest how to add this to the startup ? (2 Replies)
Hi, I am using scientific linux with is a red hat cloning.
I have written a script and I want it to be run during startup before the user log in.
How do I do that?
I know that there is some connection to the run level and the directory /etc/rc.d.
But I don't know how exactly to do it ?... (4 Replies)
Hi all,
i have a small simple perl that i cant make it work it is really stupid but i cant find solution and i needed fast.
im trying to copy running to startup on a cisco router and show me the output like is ok
Destination filename ?
Building configuration...
so the code i have is ... (0 Replies)
I copied the script from an AskUbuntu post -
#!/bin/bash
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop Tomcat server
### END INIT INFO
... (14 Replies)
I can't quite find a clear answer on how to properly write a start up script. Does anybody have any ideas?? (3 Replies)
Discussion started by: Huitzilopochtli
3 Replies
LEARN ABOUT X11R4
systemd.target
SYSTEMD.TARGET(5) systemd.target SYSTEMD.TARGET(5)NAME
systemd.target - Target unit configuration
SYNOPSIS
target.target
DESCRIPTION
A unit configuration file whose name ends in ".target" encodes information about a target unit of systemd, which is used for grouping units
and as well-known synchronization points during start-up.
This unit type has no specific options. See systemd.unit(5) for the common options of all unit configuration files. The common
configuration items are configured in the generic [Unit] and [Install] sections. A separate [Target] section does not exist, since no
target-specific options may be configured.
Target units do not offer any additional functionality on top of the generic functionality provided by units. They exist merely to group
units via dependencies (useful as boot targets), and to establish standardized names for synchronization points used in dependencies
between units. Among other things, target units are a more flexible replacement for SysV runlevels in the classic SysV init system. (And
for compatibility reasons special target units such as runlevel3.target exist which are used by the SysV runlevel compatibility code in
systemd. See systemd.special(7) for details).
IMPLICIT DEPENDENCIES
There are no implicit dependencies for target units.
DEFAULT DEPENDENCIES
The following dependencies are added unless DefaultDependencies=no is set:
o Target units will automatically complement all configured dependencies of type Wants= or Requires= with dependencies of type After=
unless DefaultDependencies=no is set in the specified units. Note that Wants= or Requires= must be defined in the target unit itself --
if you for example define Wants=some.target in some.service, the automatic ordering will not be added.
o Target units automatically gain Conflicts= dependency against shutdown.target.
EXAMPLE
Example 1. Simple standalone target
# emergency-net.target
[Unit]
Description=Emergency Mode with Networking
Requires=emergency.target systemd-networkd.service
After=emergency.target systemd-networkd.service
AllowIsolate=yes
When adding dependencies to other units, it's important to check if they set DefaultDependencies=. Service units, unless they set
DefaultDependencies=no, automatically get a dependency on sysinit.target. In this case, both emergency.target and systemd-networkd.service
have DefaultDependencies=no, so they are suitable for use in this target, and do not pull in sysinit.target.
You can now switch into this emergency mode by running systemctl isolate emergency-net.target or by passing the option
systemd.unit=emergency-net.target on the kernel command line.
Other units can have WantedBy=emergency-net.target in the [Install] section. After they are enabled using systemctl enable, they will be
started before emergency-net.target is started. It is also possible to add arbitrary units as dependencies of emergency.target without
modifying them by using systemctl add-wants.
SEE ALSO systemd(1), systemctl(1), systemd.unit(5), systemd.special(7), systemd.directives(7)systemd 237SYSTEMD.TARGET(5)