I've recently setup Fedora 22 onto a machine and it's using the systemd init system.I've been reading up on it and now I need to create a systemd start up script for postgresqlFor testing I created the following shell script, hello_world#! /bin/sh#  testing systemctl scriptstart() {   echo Executing Start   echo Testing 01   echo Testing 02   echo Testing 03}stop() {   echo Stopping Hello World Script}case $1 in   start)      start   ;;   stop)      stop   ;;   restart)      stop      sleep 2      start   ;;    *) exit 1esacWhich when I run it using the terminal it does what I expect and echos the strings. hello_world startThis echos Starting Hello World Script then I placed it inside /usr/lib/systemd/scriptsThen I tried to create the systemd service script as follows, hello_world.service[Unit]Description=Hello World Testing Script[Service]Type=oneshotExecStart=/usr/lib/systemd/scripts/hello_world startExecStop=/usr/lib/systemd/scripts/hello_world stopRemainAfterExit=yes[Install]WantedBy=multi-user.targetWhich I placed inside /usr/lib/systemd/system and tried to execute withsystemctl start hello_world.serviceWhich did not give any errors but I did not get the echo string that I expected when i executed the hello_world script alone.So I can't tell if it is actually working, did I miss something? why is the systemctl command not echoing the string from the script?
Systemd Service Script Not Echoing
fedora;scripting;systemd
It seems that the output for the script is not sent to the terminal it is instead redirected to the status commandAfter the service is running# systemctl start hello_world.serviceI can view my outputs in the status# systemctl status hello_world.serviceWhich will include any outputs from the script like bellowApr 28 10:18:00 centos7.adminserv systemd[1]: Starting Hello World Testing S....Apr 28 10:18:00 centos7.adminserv hello_world[18164]: Executing StartApr 28 10:18:00 centos7.adminserv hello_world[18164]: Testing 01Apr 28 10:18:00 centos7.adminserv hello_world[18164]: Testing 02Apr 28 10:18:00 centos7.adminserv hello_world[18164]: Testing 03Apr 28 10:18:00 centos7.adminserv systemd[1]: Started Hello World Testing Sc.... 