1. Beatrix Willius
  2. Valentina Server
  3. 日, 5月 14 2023, 10:58 AM
  4.  メールで購読
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.
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.
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 承諾済みの回答
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 承諾済みの回答
Yes, that should work.
コメント
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 承諾済みの回答
Also a good idea.
コメント
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 承諾済みの回答
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.
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 承諾済みの回答
As always I wanted to be lazy and not muck around with shell scripting.
コメント
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.
François Van Lerberghe 承諾済みの回答
Thanks for sharing
コメント
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.