I have a service installed on an old server and it is started using;
service load-simulator start medium
The value medium
acts as a profile of sorts. It can have values like low
, medium
, high
, and extreme
. I need to make it run on a new updated Linux server.
It has a script in init.d
which takes the argument at the end and sets a USED_PROFILE environment variable. I have installed this service in the new server, but the same service command mentioned before gets me an error No Profile Specified
and it fails to start.
As it is using systemctl
to start now, in what order do I need to provide the argument to make it work?
The script has something like;
case "$1" in
start)
if [ $# -eq 2 ]; then
export USED_PROFILE=$2
else
printNoProfileSpecified
exit 1
fi
$1
;;
Sorry if this is a newbie question. I am quite new to this. Tried different ordering with service
and systemctl
command but nothing worked. Any help or tip is much appreciated. Many thanks in advance.