Launcher service doesn't auto start on Ubuntu 14.04 - install4j

For Linux installer, we have added a custom launcher for auto start of service (see pic below).
We are using install4j v5.1.6. It creates a link in /etc/init.d/myService.sh which points to the /bin/myService.sh .
It works properly in Ubuntu 13. On system restart, service auto starts properly.
On Ubuntu 14 this doesn't work. Service starts first time after installation. But on system restart, service doesn't auto start.
On further investigation, running these commands on Ubuntu 14 enabled auto start.
after installation
cd /etc/init.d
sudo update-rc.d myService.sh defaults
Under installer, install a service, auto start is set to true.
Is this a limitation of install4j that it doesn't register with update-rc.d ?
Do we know on which Linux systems copying to /etc/init.d/ is sufficient ?
Our script is similar to : www.shayanderson.com/linux/add-startup-script-or-service-with-linux-on-bootup.htm . What we don't have is update-rc.d and chkconfig. And install4j does the task of copying it to /etc/init.d/
Thanks !
http://s27.postimg.org/o5bih55kz/Launcher_Configuration.png
http://s3.postimg.org/icitxy96b/Launcher_Setup.png

As of 5.1.x, install4j does not integrate services into runlevels, it only creates the symlink to the start script in /etc/init.d.
Integrating it into runlevels has to be done manually, such as by calling update-rc.d or whatever other tool the particular distribution provides.

Related

Problem running post-install step. Installation may not complete correctly The database cluster initialisation failed

Installing PostgreSQL v12.3 on Windows 10 with Windows x86-64 installer. I can't find a solution anywhere. Installer allows me to click ok and continue installation. I even have access to all the apps that come with Postgres, including the pgAdmin4 app, but I the 'psql' command in my command line doesn't work.
Anyone know how to resolve this?

Setting up Vagrant Windows

I am new to vagrant and I keep getting this error.
How can I properly run vagrant up so that I can continue with the setup process?
so once you have Vagrant and VirtualBox installed, the next steps are to create a Vagrantfile which basically is the configuration file for the VM you will build. It contains box information as well as network, sync folder and any provisioning you'll do on the VM.
for example, if you want to create an ubuntu VM:
$ vagrant init <ubuntu/wily64>
$ vagrant up
The first command (vagrant init) might take some time as it will download a VM from internet but you only run it once. then vagrant up will boot the VM

How do I install the Matlab MCR in Ubuntu 14.04 without "killing" Unity?

Background: I have created an Ubuntu VirtualBox from LAPP stack and added the Ubuntu desktop (Unity: sudo apt-get install ubuntu-desktop). Now I am attempting to install the MCR without loosing Unity.
Download MCR zip and extract to MCR_SOURCE
Go to my folder that contains the files: cd /media/sf_shared/MCR_ SOURCE
Change installer_input.txt file:
destinationFolder=/opt/MCR
agreeToLicense=yes
outputFile=/opt/install.log
mode=silent
product.MATLAB
product.MATLAB_Builder_JA
# Note: To find out the required toolboxes >> start Matlab >> run your code and find out which toolboxes were used with: license('inuse')
Install MCR: sudo ./install -inputFile /media/sf_shared/MCR_SOURCE/installer_input.txt >> success
Restart Ubuntu >> test whether Ubuntu’s Unity still exists >> everything is fine
Attention the next step will “ kill ” your Ubuntu desktop configuration!!! (i.e. copy your hardisk, anything you must do to recover quickly) – now configure: sudo gedit /etc/environment
LD_LIBRARY_PATH="/opt/MCR/v84/runtime/glnxa64:/opt/MCR/v84/bin/glnxa64:/opt/MCR/v84/sys/os/glnxa64:${LD_LIBRARY_PATH}"
XAPPLRESDIR="/opt/MCR/v84/X11/app-defaults"
# Note: X11/app-defaults folder has not been created during installation
Restart Ubuntu >> Unity is gone, recovery attempts such as deleting the above lines do not recover Unity; reinstalling the Ubuntu desktop does not help either.
I have tried an alternative route with exporting the variables, which also "kills" Unity. By the way this affects all users.
Any ideas?
It is not necessary to register these environment variables in /etc/environment, which means that the Unity sidebar will not be affected.
Instead register the environment variables temporarily either as local user or via sudo -i:
export LD_LIBRARY_PATH="/opt/MCR/v84/runtime/glnxa64:/opt/MCR/v84/bin/glnxa64:/opt/MCR/v84/sys/os/glnxa64:${LD_LIBRARY_PATH}"
export XAPPLRESDIR="/opt/MCR/v84/X11/app-defaults"
Now it is possible to run Matlab Apps without "killing" Ubuntu's desktop. For instance to run the Java compiled makesqr.m file.
java -classpath "/opt/MCR/v84/toolbox/javabuilder/jar/javabuilder.jar:/media/sf_shared/for_testing/makesqr.jar" makesqr.Class1 5
The Java package makesqr was created using Matlab's JavaBuilder tutorial. This was done on my Windows 7 machine, which runs Matlab R2014b.
Please ensure that the owner and permissions of the /opt/MCR and /media/sf_shared/for_testing folders are set correctly (see here for details).

How to automatically set DART_FLAGS=' ' on every Chromium startup

I use Ubuntu 14 and I want to run Chromium(which is called Dartium) from the Launcher and it automatically set DART_FLAGS='--enable_type_checks --enable_asserts' on every startup. At the moment I run Chromium using:
cd dartium
DART_FLAGS='--enable_type_checks --enable_asserts' ./chrome
But it's really annoying(
You can set environment variables in each supported operating system.
In windows you can configure them using the control panel. In Linux using for example the ~/.bashrc file by adding export DART_FLAGS='--enable_type_checks --enable_asserts'. OSX probably similar.
Changes might require a reboot (or just . ~/.bashrc in Linux).

Can Upstart be installed side-by-side with other init script?

Can upstart be installed along side other init system? Upstart is quite handy in creating a daemon script written in PHP as it can respawn process. Unfortunately, it will be replace with systemd in the next ubuntu release. And how about other Linux distro? Centos, RedHat.
Yes, Upstart can be installed alongside system V init scripts. But, I would recommend using other process monitoring tools like "monit" over upstart because of the following reasons:
a. upstart scripts are too low level.
b. All debian systems(includes ubuntu) will be moving away from upstart back to systemd. Reference here.