1. Beatrix Willius
  2. Valentina Server
  3. Воскресенье, Май 14 2023, 10:58 AM
  4.  Подписаться через email
Since a while I use a custom installer for Valentina Server which is really nice.

Today I noticed that the verbose level is set to 2:

; Specifies how much information produce in logs:
; 0 - display error messages only.
; 1 - display errors and warnings.
; 2 - display errors, warnings and debugging messages.
; 3 - display errors, warnings, debugging messages and command level tracing.
VerboseLevel=2

Is there a simple way to set that to 1 when creating the installer?

Valentina Server latest version.
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Thanks for sharing
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Got it:


#copy the ini file if it doesn't exist
SRC_FILE="$1/vserver_x64.ini"
DEST_FILE="/Library/VServer_x64/vserver_x64.ini"

# Check if the file already exists in the destination directory
if [ -e "$DEST_FILE" ]; then
echo "File $DEST_FILE already exists, skipping copy."
else
# Copy the file from package resources to the destination directory
cp "$SRC_FILE" "$DEST_FILE"

# Make sure the file has the correct ownership and permissions
chown root:admin "$DEST_FILE"
chmod 644 "$DEST_FILE"
fi
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
As always I wanted to be lazy and not muck around with shell scripting.
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
I think you could be able to test if the file exist before copy it
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
After doing a test the parameters are indeed reset. Is there a way to tell the installer not to update a file?
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
@François Van Lerberghe: If I include the ini file in the installer wouldn't that reset the parameters when installing a new version?
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Also a good idea.
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Personally, I include in the installer the VServer.ini file with my parameters.
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Yes, that should work.
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
Well, you need something to differentiate the first-time script running moment - right?

Probably just check ini file existence?
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
I don't want Valentina Server to be installed with verbose level 2.

If I change the value with sed then the installer would reset the value whenever Valentina Server is installed. I would like to change the value only for the first installation and not when the installer is run again.
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
Hi Beatrix.

I'm not sure what you mean, but you may use something like this one:

sed -i -e 's/VerboseLevel=2/VerboseLevel=1/g' path_to_ini_file
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories