Tag Info

Hot answers tagged

4

Run the rpm command with sudo: #!/bin/sh mkdir -p /data/workday/cred chown -R myuser:myuser /data sudo -u myuser rpm -Uvp --force --nodeps --prefix /data/place /data/RPMs/myrpm.rpm


3

The process ID is off by one because you have put an extra & after the $javaCommandLine. In other words, you have put two processes in the background before calling echo $!, thus getting the PID of >>$serviceLogFile 2>&1 rather than $javaCommandLine. Those two pieces should be put in one, as the old 2 line codes shows su ...


1

When you type ./scriptname.sh the ./ says "only look in this folder for scriptname.sh". And you are doing that, in a folder where scriptname.sh does not exist, so the shell returns "No such file or directory". The fact that your restart.sh script is calling ./shutdown.sh on your behalf makes no difference, you're still in a folder where shutdown.sh doesn't ...


1

su starts a shell. When you exit that shell, then the rpm command will execute. If you're changing user to execute the rpm command, then su -c 'rpm -Uvp --force --nodeps --prefix /data/place /data/RPMs/myrpm.rpm' myuser


1

This answer functions in a way which avoids you having to manipulate the dirty_bytes/dirty_background_bytes system global which may affect other applications when not doing a backup. Its a bit of a hack to be honest, but I leave it in case its useful to you. tar -zcv --one-file-system \ --exclude=/run \ --exclude=/tmp \ --exclude=/home \ ...


1

The stall occurs while dirty pages are being written to disk; you can get a quick introduction to the problem at this LWN article. Basically, the current default for the amount of memory used to cache writes is way too high. Try setting */proc/sys/vm/dirty_background_bytes* to 104857600 and */proc/sys/vm/dirty_bytes* to 209715200. You can do this for the ...



Only top voted, non community-wiki answers of a minimum length are eligible